Diffusion Apple API
6.10.1
Unified Client Library for iOS, tvOS and OS X / macOS
|
Extension adding support to partial JSON update constraints for requiring primitive values at locations referenced with a JSON pointer.
Instance Methods | |
(nullable instancetype) | - withDoubleValue:atPointer:error: |
(nullable instancetype) | - withDoubleValue:atPointer:comparisonOperator:error: |
(nullable instancetype) | - withDoubleFloatNumberValue:atPointer:error: |
(nullable instancetype) | - withDoubleFloatNumberValue:atPointer:comparisonOperator:error: |
(nullable instancetype) | - withLongLongValue:atPointer:error: |
(nullable instancetype) | - withLongLongValue:atPointer:comparisonOperator:error: |
(nullable instancetype) | - withInt64NumberValue:atPointer:error: |
(nullable instancetype) | - withInt64NumberValue:atPointer:comparisonOperator:error: |
(nullable instancetype) | - withStringValue:atPointer:error: |
(nullable instancetype) | - withStringValue:atPointer:comparisonOperator:error: |
(nullable instancetype) | - withBooleanValue:atPointer:comparisonOperator:error: |
- (nullable instancetype) withBooleanValue: | (bool) | value | |
atPointer: | (nonnull NSString *) | pointer | |
comparisonOperator: | (nonnull PTDiffusionUpdateConstraintOperator *) | comparisonOperator | |
error: | (NSError *__autoreleasing *const) | error | |
Compares a location within the JSON topic value to a boolean specified value.
If there is no value found at the specified pointer position, the constraint will be unsatisfied.
If the operator is EQ, the topic value at the given pointer will be compared to the boolean value. Other operators are not permitted with a boolean value.
value | The value to be compared against the topic value. |
pointer | A JSON Pointer) syntax reference locating the value in the JSON object. comparisonOperator The comparison operator. See PTDiffusionUpdateConstraintOperator. |
error | Location to store a reason in case of failure. May be nil . |
nil
on failure.Extends class PTDiffusionPartialJSONUpdateConstraint.
- (nullable instancetype) withDoubleFloatNumberValue: | (nonnull NSNumber *) | number | |
atPointer: | (nonnull NSString *) | pointer | |
comparisonOperator: | (nonnull PTDiffusionUpdateConstraintOperator *) | comparisonOperator | |
error: | (NSError *__autoreleasing *const) | error | |
Compares a location within the JSON topic value to a double-precision floating point (Eight-byte IEEE 754) specified number.
If there is no value found at the specified pointer position, the constraint will be unsatisfied.
The value will be compared with the number value at the topic location. This will work with JSON string or number values only. JSON strings can only be compared if they contain a value that can be parsed as a number. If a string value at the location cannot be parsed as a number, the constraint will be unsatisfied.
Any of the operators (other than IS) can be used with such number comparisons.
Decimal numbers can be compared with integral numbers so 1
is equal to 1.0
, "1"
, or "1.0"
.
If a null
value is supplied and the operator is EQ or NE, the topic value at the given pointer will be compared to JSON null. Other operators (other than IS) are not permitted with a null
value.
value | The value to be compared against the topic value. |
pointer | A JSON Pointer) syntax reference locating the value in the JSON object. comparisonOperator The comparison operator. See PTDiffusionUpdateConstraintOperator. |
error | Location to store a reason in case of failure. May be nil . |
nil
on failure.Extends class PTDiffusionPartialJSONUpdateConstraint.
- (nullable instancetype) withDoubleFloatNumberValue: | (NSNumber *) | number | |
atPointer: | (NSString *) | pointer | |
error: | (NSError **) | error | |
Require a double-precision floating point (Eight-byte IEEE 754) number value at a specific position in the JSON object.
number | The value expected at the location referenced by pointer. |
pointer | A JSON Pointer syntax reference locating the value in the JSON object. |
error | Location to store a reason in case of failure. May be nil . |
NSInvalidArgumentException | If number or pointer is nil . |
null
at the referenced location use withNullAt:error: (PTDiffusionPartialJSONUpdateConstraint)Extends class PTDiffusionPartialJSONUpdateConstraint.
- (nullable instancetype) withDoubleValue: | (double) | value | |
atPointer: | (nonnull NSString *) | pointer | |
comparisonOperator: | (nonnull PTDiffusionUpdateConstraintOperator *) | comparisonOperator | |
error: | (NSError *__autoreleasing *const) | error | |
Compares a location within the JSON topic value to a double-precision floating point (Eight-byte IEEE 754) specified number.
If there is no value found at the specified pointer position, the constraint will be unsatisfied.
The value will be compared with the number value at the topic location. This will work with JSON string or number values only. JSON strings can only be compared if they contain a value that can be parsed as a number. If a string value at the location cannot be parsed as a number, the constraint will be unsatisfied.
Any of the operators (other than IS) can be used with such number comparisons.
Decimal numbers can be compared with integral numbers so 1
is equal to 1.0
, "1"
, or "1.0"
.
value | The value to be compared against the topic value. |
pointer | A JSON Pointer) syntax reference locating the value in the JSON object. comparisonOperator The comparison operator. See PTDiffusionUpdateConstraintOperator. |
error | Location to store a reason in case of failure. May be nil . |
nil
on failure.Extends class PTDiffusionPartialJSONUpdateConstraint.
- (nullable instancetype) withDoubleValue: | (double) | value | |
atPointer: | (NSString *) | pointer | |
error: | (NSError **) | error | |
Require a double-precision floating point (Eight-byte IEEE 754) value at a specific position in the JSON object.
value | The value expected at the location referenced by pointer. |
pointer | A JSON Pointer syntax reference locating the value in the JSON object. |
error | Location to store a reason in case of failure. May be nil . |
NSInvalidArgumentException | If pointer is nil . |
Extends class PTDiffusionPartialJSONUpdateConstraint.
- (nullable instancetype) withInt64NumberValue: | (nonnull NSNumber *) | number | |
atPointer: | (nonnull NSString *) | pointer | |
comparisonOperator: | (nonnull PTDiffusionUpdateConstraintOperator *) | comparisonOperator | |
error: | (NSError *__autoreleasing *const) | error | |
Compares a location within the JSON topic value to a 64-bit integer specified value.
If there is no value found at the specified pointer position, the constraint will be unsatisfied.
The value will be compared with the number value at the topic location. This will work with JSON string or number values only. JSON strings can only be compared if they contain a value that can be parsed as a number. If a string value at the location cannot be parsed as a number, the constraint will be unsatisfied.
Any of the operators (other than IS) can be used with such number comparisons.
Decimal numbers can be compared with integral numbers so 1
is equal to 1.0
, "1"
, or "1.0"
.
If a null
value is supplied and the operator is EQ or NE, the topic value at the given pointer will be compared to JSON null. Other operators (other than IS) are not permitted with a null
value.
value | The value to be compared against the topic value. |
pointer | A JSON Pointer) syntax reference locating the value in the JSON object. comparisonOperator The comparison operator. See PTDiffusionUpdateConstraintOperator. |
error | Location to store a reason in case of failure. May be nil . |
nil
on failure.Extends class PTDiffusionPartialJSONUpdateConstraint.
- (nullable instancetype) withInt64NumberValue: | (NSNumber *) | number | |
atPointer: | (NSString *) | pointer | |
error: | (NSError **) | error | |
Require a 64-bit integer number value at a specific position in the JSON object.
number | The value expected at the location referenced by pointer. |
pointer | A JSON Pointer syntax reference locating the value in the JSON object. |
error | Location to store a reason in case of failure. May be nil . |
NSInvalidArgumentException | If number or pointer is nil . |
null
at the referenced location use withNullAt:error: (PTDiffusionPartialJSONUpdateConstraint)Extends class PTDiffusionPartialJSONUpdateConstraint.
- (nullable instancetype) withLongLongValue: | (long long) | value | |
atPointer: | (nonnull NSString *) | pointer | |
comparisonOperator: | (nonnull PTDiffusionUpdateConstraintOperator *) | comparisonOperator | |
error: | (NSError *__autoreleasing *const) | error | |
Compares a location within the JSON topic value to a 64-bit integer specified value.
If there is no value found at the specified pointer position, the constraint will be unsatisfied.
The value will be compared with the number value at the topic location. This will work with JSON string or number values only. JSON strings can only be compared if they contain a value that can be parsed as a number. If a string value at the location cannot be parsed as a number, the constraint will be unsatisfied.
Any of the operators (other than IS) can be used with such number comparisons.
Decimal numbers can be compared with integral numbers so 1
is equal to 1.0
, "1"
, or "1.0"
.
value | The value to be compared against the topic value. |
pointer | A JSON Pointer) syntax reference locating the value in the JSON object. comparisonOperator The comparison operator. See PTDiffusionUpdateConstraintOperator. |
error | Location to store a reason in case of failure. May be nil . |
nil
on failure.Extends class PTDiffusionPartialJSONUpdateConstraint.
- (nullable instancetype) withLongLongValue: | (long long) | value | |
atPointer: | (NSString *) | pointer | |
error: | (NSError **) | error | |
Require a 64-bit integer value at a specific position in the JSON object.
value | The value expected at the location referenced by pointer. |
pointer | A JSON Pointer syntax reference locating the value in the JSON object. |
error | Location to store a reason in case of failure. May be nil . |
NSInvalidArgumentException | If pointer is nil . |
Extends class PTDiffusionPartialJSONUpdateConstraint.
- (nullable instancetype) withStringValue: | (nonnull NSString *) | string | |
atPointer: | (nonnull NSString *) | pointer | |
comparisonOperator: | (nonnull PTDiffusionUpdateConstraintOperator *) | comparisonOperator | |
error: | (NSError *__autoreleasing *const) | error | |
Compares a location within the JSON topic value to a string specified value.
If there is no value found at the specified pointer position, the constraint will be unsatisfied.
If the operator is EQ or NE, the string representation of the topic value at the given pointer will be compared to the supplied value.
If the value at the pointer position is not a string or number the constraint will be unsatisfied. Other operators (other than IS) are not permitted with String values.
If a null
value is supplied and the operator is EQ or NE, the topic value at the given pointer will be compared to JSON null. Other operators (other than IS) are not permitted with a null
value.
value | The value to be compared against the topic value. |
pointer | A JSON Pointer) syntax reference locating the value in the JSON object. comparisonOperator The comparison operator. See PTDiffusionUpdateConstraintOperator. |
error | Location to store a reason in case of failure. May be nil . |
nil
on failure.Extends class PTDiffusionPartialJSONUpdateConstraint.
- (nullable instancetype) withStringValue: | (NSString *) | string | |
atPointer: | (NSString *) | pointer | |
error: | (NSError **) | error | |
Require a string value at a specific position in the JSON object.
string | The value expected at the location referenced by pointer. |
pointer | A JSON Pointer syntax reference locating the value in the JSON object. |
error | Location to store a reason in case of failure. May be nil . |
NSInvalidArgumentException | If string or pointer is nil . |
null
at the referenced location use withNullAt:error: (PTDiffusionPartialJSONUpdateConstraint)Extends class PTDiffusionPartialJSONUpdateConstraint.