Skip to content

Commit

Permalink
Updated specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Cobbe committed Sep 12, 2016
1 parent de897db commit 81c918f
Show file tree
Hide file tree
Showing 420 changed files with 7,942 additions and 5,788 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@
///
/// The `LaunchEmptyResult` union.
///
/// Result returned by methods that may either launch an asynchronous job or complete synchronously.
/// Upon synchronous completion of the job, no additional information is returned.
/// Result returned by methods that may either launch an asynchronous job or
/// complete synchronously. Upon synchronous completion of the job, no
/// additional information is returned.
///
/// This class implements the `DBSerializable` protocol (serialize and deserialize instance
/// methods), which is required for all Obj-C SDK API route objects.
/// This class implements the `DBSerializable` protocol (serialize and
/// deserialize instance methods), which is required for all Obj-C SDK API route
/// objects.
///
@interface DBASYNCLaunchEmptyResult : NSObject <DBSerializable>

#pragma mark - Instance fields

/// The `DBASYNCLaunchEmptyResultTag` enum type represents the possible tag states with which the
/// `DBASYNCLaunchEmptyResult` union can exist.
/// The `DBASYNCLaunchEmptyResultTag` enum type represents the possible tag
/// states with which the `DBASYNCLaunchEmptyResult` union can exist.
typedef NS_ENUM(NSInteger, DBASYNCLaunchEmptyResultTag) {
/// This response indicates that the processing is asynchronous. The string is an id that can be
/// used to obtain the status of the asynchronous job.
/// This response indicates that the processing is asynchronous. The string
/// is an id that can be used to obtain the status of the asynchronous job.
DBASYNCLaunchEmptyResultAsyncJobId,

/// The job finished synchronously and successfully.
Expand All @@ -37,21 +39,24 @@ typedef NS_ENUM(NSInteger, DBASYNCLaunchEmptyResultTag) {
/// Represents the union's current tag state.
@property(nonatomic, readonly) DBASYNCLaunchEmptyResultTag tag;

/// This response indicates that the processing is asynchronous. The string is an id that can be
/// used to obtain the status of the asynchronous job. @note Ensure the `isAsyncJobId` method
/// returns true before accessing, otherwise a runtime exception will be raised.
/// This response indicates that the processing is asynchronous. The string is
/// an id that can be used to obtain the status of the asynchronous job. @note
/// Ensure the `isAsyncJobId` method returns true before accessing, otherwise a
/// runtime exception will be raised.
@property(nonatomic, readonly, copy) NSString * _Nonnull asyncJobId;

#pragma mark - Constructors

///
/// Initializes union class with tag state of "async_job_id".
///
/// Description of the "async_job_id" tag state: This response indicates that the processing is
/// asynchronous. The string is an id that can be used to obtain the status of the asynchronous job.
/// Description of the "async_job_id" tag state: This response indicates that
/// the processing is asynchronous. The string is an id that can be used to
/// obtain the status of the asynchronous job.
///
/// @param asyncJobId This response indicates that the processing is asynchronous. The string is an
/// id that can be used to obtain the status of the asynchronous job.
/// @param asyncJobId This response indicates that the processing is
/// asynchronous. The string is an id that can be used to obtain the status of
/// the asynchronous job.
///
/// @return An initialized instance.
///
Expand All @@ -60,7 +65,8 @@ typedef NS_ENUM(NSInteger, DBASYNCLaunchEmptyResultTag) {
///
/// Initializes union class with tag state of "complete".
///
/// Description of the "complete" tag state: The job finished synchronously and successfully.
/// Description of the "complete" tag state: The job finished synchronously and
/// successfully.
///
/// @return An initialized instance.
///
Expand All @@ -71,8 +77,8 @@ typedef NS_ENUM(NSInteger, DBASYNCLaunchEmptyResultTag) {
///
/// Retrieves whether the union's current tag state has value "async_job_id".
///
/// @note Call this method and ensure it returns true before accessing the `asyncJobId` property,
/// otherwise a runtime exception will be thrown.
/// @note Call this method and ensure it returns true before accessing the
/// `asyncJobId` property, otherwise a runtime exception will be thrown.
///
/// @return Whether the union's current tag state has value "async_job_id".
///
Expand Down Expand Up @@ -106,16 +112,16 @@ typedef NS_ENUM(NSInteger, DBASYNCLaunchEmptyResultTag) {
///
/// @param instance An instance of the `DBASYNCLaunchEmptyResult` API object.
///
/// @return A json-compatible dictionary representation of the `DBASYNCLaunchEmptyResult` API
/// object.
/// @return A json-compatible dictionary representation of the
/// `DBASYNCLaunchEmptyResult` API object.
///
+ (NSDictionary * _Nonnull)serialize:(DBASYNCLaunchEmptyResult * _Nonnull)instance;

///
/// Deserializes `DBASYNCLaunchEmptyResult` instances.
///
/// @param dict A json-compatible dictionary representation of the `DBASYNCLaunchEmptyResult` API
/// object.
/// @param dict A json-compatible dictionary representation of the
/// `DBASYNCLaunchEmptyResult` API object.
///
/// @return An instantiation of the `DBASYNCLaunchEmptyResult` object.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,49 @@
///
/// The `LaunchResultBase` union.
///
/// Result returned by methods that launch an asynchronous job. A method who may either launch an
/// asynchronous job, or complete the request synchronously, can use this union by extending it, and
/// adding a 'complete' field with the type of the synchronous response. See LaunchEmptyResult for
/// an example.
/// Result returned by methods that launch an asynchronous job. A method who may
/// either launch an asynchronous job, or complete the request synchronously,
/// can use this union by extending it, and adding a 'complete' field with the
/// type of the synchronous response. See LaunchEmptyResult for an example.
///
/// This class implements the `DBSerializable` protocol (serialize and deserialize instance
/// methods), which is required for all Obj-C SDK API route objects.
/// This class implements the `DBSerializable` protocol (serialize and
/// deserialize instance methods), which is required for all Obj-C SDK API route
/// objects.
///
@interface DBASYNCLaunchResultBase : NSObject <DBSerializable>

#pragma mark - Instance fields

/// The `DBASYNCLaunchResultBaseTag` enum type represents the possible tag states with which the
/// `DBASYNCLaunchResultBase` union can exist.
/// The `DBASYNCLaunchResultBaseTag` enum type represents the possible tag
/// states with which the `DBASYNCLaunchResultBase` union can exist.
typedef NS_ENUM(NSInteger, DBASYNCLaunchResultBaseTag) {
/// This response indicates that the processing is asynchronous. The string is an id that can be
/// used to obtain the status of the asynchronous job.
/// This response indicates that the processing is asynchronous. The string
/// is an id that can be used to obtain the status of the asynchronous job.
DBASYNCLaunchResultBaseAsyncJobId,

};

/// Represents the union's current tag state.
@property(nonatomic, readonly) DBASYNCLaunchResultBaseTag tag;

/// This response indicates that the processing is asynchronous. The string is an id that can be
/// used to obtain the status of the asynchronous job. @note Ensure the `isAsyncJobId` method
/// returns true before accessing, otherwise a runtime exception will be raised.
/// This response indicates that the processing is asynchronous. The string is
/// an id that can be used to obtain the status of the asynchronous job. @note
/// Ensure the `isAsyncJobId` method returns true before accessing, otherwise a
/// runtime exception will be raised.
@property(nonatomic, readonly, copy) NSString * _Nonnull asyncJobId;

#pragma mark - Constructors

///
/// Initializes union class with tag state of "async_job_id".
///
/// Description of the "async_job_id" tag state: This response indicates that the processing is
/// asynchronous. The string is an id that can be used to obtain the status of the asynchronous job.
/// Description of the "async_job_id" tag state: This response indicates that
/// the processing is asynchronous. The string is an id that can be used to
/// obtain the status of the asynchronous job.
///
/// @param asyncJobId This response indicates that the processing is asynchronous. The string is an
/// id that can be used to obtain the status of the asynchronous job.
/// @param asyncJobId This response indicates that the processing is
/// asynchronous. The string is an id that can be used to obtain the status of
/// the asynchronous job.
///
/// @return An initialized instance.
///
Expand All @@ -61,8 +65,8 @@ typedef NS_ENUM(NSInteger, DBASYNCLaunchResultBaseTag) {
///
/// Retrieves whether the union's current tag state has value "async_job_id".
///
/// @note Call this method and ensure it returns true before accessing the `asyncJobId` property,
/// otherwise a runtime exception will be thrown.
/// @note Call this method and ensure it returns true before accessing the
/// `asyncJobId` property, otherwise a runtime exception will be thrown.
///
/// @return Whether the union's current tag state has value "async_job_id".
///
Expand All @@ -89,15 +93,16 @@ typedef NS_ENUM(NSInteger, DBASYNCLaunchResultBaseTag) {
///
/// @param instance An instance of the `DBASYNCLaunchResultBase` API object.
///
/// @return A json-compatible dictionary representation of the `DBASYNCLaunchResultBase` API object.
/// @return A json-compatible dictionary representation of the
/// `DBASYNCLaunchResultBase` API object.
///
+ (NSDictionary * _Nonnull)serialize:(DBASYNCLaunchResultBase * _Nonnull)instance;

///
/// Deserializes `DBASYNCLaunchResultBase` instances.
///
/// @param dict A json-compatible dictionary representation of the `DBASYNCLaunchResultBase` API
/// object.
/// @param dict A json-compatible dictionary representation of the
/// `DBASYNCLaunchResultBase` API object.
///
/// @return An instantiation of the `DBASYNCLaunchResultBase` object.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@
///
/// Arguments for methods that poll the status of an asynchronous job.
///
/// This class implements the `DBSerializable` protocol (serialize and deserialize instance
/// methods), which is required for all Obj-C SDK API route objects.
/// This class implements the `DBSerializable` protocol (serialize and
/// deserialize instance methods), which is required for all Obj-C SDK API route
/// objects.
///
@interface DBASYNCPollArg : NSObject <DBSerializable>

#pragma mark - Instance fields

/// Id of the asynchronous job. This is the value of a response returned from the method that
/// launched the job.
/// Id of the asynchronous job. This is the value of a response returned from
/// the method that launched the job.
@property(nonatomic, readonly, copy) NSString * _Nonnull asyncJobId;

#pragma mark - Constructors

///
/// Full constructor for the struct (exposes all instance variables).
///
/// @param asyncJobId Id of the asynchronous job. This is the value of a response returned from the
/// method that launched the job.
/// @param asyncJobId Id of the asynchronous job. This is the value of a
/// response returned from the method that launched the job.
///
/// @return An initialized instance.
///
Expand All @@ -51,14 +52,16 @@
///
/// @param instance An instance of the `DBASYNCPollArg` API object.
///
/// @return A json-compatible dictionary representation of the `DBASYNCPollArg` API object.
/// @return A json-compatible dictionary representation of the `DBASYNCPollArg`
/// API object.
///
+ (NSDictionary * _Nonnull)serialize:(DBASYNCPollArg * _Nonnull)instance;

///
/// Deserializes `DBASYNCPollArg` instances.
///
/// @param dict A json-compatible dictionary representation of the `DBASYNCPollArg` API object.
/// @param dict A json-compatible dictionary representation of the
/// `DBASYNCPollArg` API object.
///
/// @return An instantiation of the `DBASYNCPollArg` object.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@
///
/// The `PollEmptyResult` union.
///
/// Result returned by methods that poll for the status of an asynchronous job. Upon completion of
/// the job, no additional information is returned.
/// Result returned by methods that poll for the status of an asynchronous job.
/// Upon completion of the job, no additional information is returned.
///
/// This class implements the `DBSerializable` protocol (serialize and deserialize instance
/// methods), which is required for all Obj-C SDK API route objects.
/// This class implements the `DBSerializable` protocol (serialize and
/// deserialize instance methods), which is required for all Obj-C SDK API route
/// objects.
///
@interface DBASYNCPollEmptyResult : NSObject <DBSerializable>

#pragma mark - Instance fields

/// The `DBASYNCPollEmptyResultTag` enum type represents the possible tag states with which the
/// `DBASYNCPollEmptyResult` union can exist.
/// The `DBASYNCPollEmptyResultTag` enum type represents the possible tag states
/// with which the `DBASYNCPollEmptyResult` union can exist.
typedef NS_ENUM(NSInteger, DBASYNCPollEmptyResultTag) {
/// The asynchronous job is still in progress.
DBASYNCPollEmptyResultInProgress,
Expand All @@ -41,7 +42,8 @@ typedef NS_ENUM(NSInteger, DBASYNCPollEmptyResultTag) {
///
/// Initializes union class with tag state of "in_progress".
///
/// Description of the "in_progress" tag state: The asynchronous job is still in progress.
/// Description of the "in_progress" tag state: The asynchronous job is still in
/// progress.
///
/// @return An initialized instance.
///
Expand All @@ -50,7 +52,8 @@ typedef NS_ENUM(NSInteger, DBASYNCPollEmptyResultTag) {
///
/// Initializes union class with tag state of "complete".
///
/// Description of the "complete" tag state: The asynchronous job has completed successfully.
/// Description of the "complete" tag state: The asynchronous job has completed
/// successfully.
///
/// @return An initialized instance.
///
Expand Down Expand Up @@ -93,15 +96,16 @@ typedef NS_ENUM(NSInteger, DBASYNCPollEmptyResultTag) {
///
/// @param instance An instance of the `DBASYNCPollEmptyResult` API object.
///
/// @return A json-compatible dictionary representation of the `DBASYNCPollEmptyResult` API object.
/// @return A json-compatible dictionary representation of the
/// `DBASYNCPollEmptyResult` API object.
///
+ (NSDictionary * _Nonnull)serialize:(DBASYNCPollEmptyResult * _Nonnull)instance;

///
/// Deserializes `DBASYNCPollEmptyResult` instances.
///
/// @param dict A json-compatible dictionary representation of the `DBASYNCPollEmptyResult` API
/// object.
/// @param dict A json-compatible dictionary representation of the
/// `DBASYNCPollEmptyResult` API object.
///
/// @return An instantiation of the `DBASYNCPollEmptyResult` object.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@
///
/// Error returned by methods for polling the status of asynchronous job.
///
/// This class implements the `DBSerializable` protocol (serialize and deserialize instance
/// methods), which is required for all Obj-C SDK API route objects.
/// This class implements the `DBSerializable` protocol (serialize and
/// deserialize instance methods), which is required for all Obj-C SDK API route
/// objects.
///
@interface DBASYNCPollError : NSObject <DBSerializable>

#pragma mark - Instance fields

/// The `DBASYNCPollErrorTag` enum type represents the possible tag states with which the
/// `DBASYNCPollError` union can exist.
/// The `DBASYNCPollErrorTag` enum type represents the possible tag states with
/// which the `DBASYNCPollError` union can exist.
typedef NS_ENUM(NSInteger, DBASYNCPollErrorTag) {
/// The job ID is invalid.
DBASYNCPollErrorInvalidAsyncJobId,

/// Something went wrong with the job on Dropbox's end. You'll need to verify that the action
/// you were taking succeeded, and if not, try again. This should happen very rarely.
/// Something went wrong with the job on Dropbox's end. You'll need to
/// verify that the action you were taking succeeded, and if not, try again.
/// This should happen very rarely.
DBASYNCPollErrorInternalError,

/// (no description).
Expand All @@ -53,9 +55,9 @@ typedef NS_ENUM(NSInteger, DBASYNCPollErrorTag) {
///
/// Initializes union class with tag state of "internal_error".
///
/// Description of the "internal_error" tag state: Something went wrong with the job on Dropbox's
/// end. You'll need to verify that the action you were taking succeeded, and if not, try again.
/// This should happen very rarely.
/// Description of the "internal_error" tag state: Something went wrong with the
/// job on Dropbox's end. You'll need to verify that the action you were taking
/// succeeded, and if not, try again. This should happen very rarely.
///
/// @return An initialized instance.
///
Expand All @@ -71,9 +73,11 @@ typedef NS_ENUM(NSInteger, DBASYNCPollErrorTag) {
#pragma mark - Tag state methods

///
/// Retrieves whether the union's current tag state has value "invalid_async_job_id".
/// Retrieves whether the union's current tag state has value
/// "invalid_async_job_id".
///
/// @return Whether the union's current tag state has value "invalid_async_job_id".
/// @return Whether the union's current tag state has value
/// "invalid_async_job_id".
///
- (BOOL)isInvalidAsyncJobId;

Expand Down Expand Up @@ -112,14 +116,16 @@ typedef NS_ENUM(NSInteger, DBASYNCPollErrorTag) {
///
/// @param instance An instance of the `DBASYNCPollError` API object.
///
/// @return A json-compatible dictionary representation of the `DBASYNCPollError` API object.
/// @return A json-compatible dictionary representation of the
/// `DBASYNCPollError` API object.
///
+ (NSDictionary * _Nonnull)serialize:(DBASYNCPollError * _Nonnull)instance;

///
/// Deserializes `DBASYNCPollError` instances.
///
/// @param dict A json-compatible dictionary representation of the `DBASYNCPollError` API object.
/// @param dict A json-compatible dictionary representation of the
/// `DBASYNCPollError` API object.
///
/// @return An instantiation of the `DBASYNCPollError` object.
///
Expand Down
Loading

0 comments on commit 81c918f

Please sign in to comment.