UAScheduleDeferredData
Objective-C
@interface UAScheduleDeferredData : NSObject
Swift
class ScheduleDeferredData : NSObject
Deferred schedule data.
-
The URL.
Declaration
Objective-C
@property (nonatomic, readonly) NSURL *_Nonnull URL;
Swift
var url: URL { get }
-
Flag for retrying the URL if the request times out.
Declaration
Objective-C
@property (nonatomic, readonly, getter=isRetriableOnTimeout) BOOL retriableOnTimeout;
Swift
var isRetriableOnTimeout: Bool { get }
-
The deferred type.
Declaration
Objective-C
@property (nonatomic, readonly) UAScheduleDataDeferredType type;
Swift
var type: ScheduleDataDeferredType { get }
-
Factory method.
Declaration
Objective-C
+ (nonnull instancetype)deferredDataWithURL:(nonnull NSURL *)URL retriableOnTimeout:(BOOL)retriableOnTimeout;
Parameters
URL
The URL.
retriableOnTimeout
YES
to retry on timeout, otherwiseNO
.Return Value
A deferred data instance.
-
Factory method.
Declaration
Objective-C
+ (nonnull instancetype)deferredDataWithURL:(nonnull NSURL *)URL retriableOnTimeout:(BOOL)retriableOnTimeout type:(UAScheduleDataDeferredType)type;
Parameters
URL
The URL.
retriableOnTimeout
YES
to retry on timeout, otherwiseNO
.type
The deferred type.
Return Value
A deferred data instance.
-
Class factory method for constructing deferred data from JSON.
Declaration
Objective-C
+ (nullable instancetype)deferredDataWithJSON:(nonnull id)json error:(NSError *_Nullable *_Nullable) error;
Swift
convenience init(json: Any) throws
Parameters
json
JSON object that defines the data.
error
An NSError pointer for storing errors, if applicable.
Return Value
A fully configured instance of UAScheduleDeferredData or nil if JSON parsing fails.
-
Method to return the data as its JSON representation.
@returns JSON representation of the data.
Declaration
Objective-C
- (nonnull NSDictionary *)toJSON;
Swift
func toJSON() -> [AnyHashable : Any]