///
/// Copyright (c) 2016 Dropbox, Inc. All rights reserved.
///
/// Auto-generated by Stone, do not modify.
///

#import <Foundation/Foundation.h>

#import "DBSerializableProtocol.h"

@class DBCLOUDDOCSGetMetadataResult;
@class DBCLOUDDOCSUserInfo;
@class DBCLOUDDOCSUserPermissions;

NS_ASSUME_NONNULL_BEGIN

#pragma mark - API Object

///
/// The `GetMetadataResult` struct.
///
/// This class implements the `DBSerializable` protocol (serialize and
/// deserialize instance methods), which is required for all Obj-C SDK API route
/// objects.
///
@interface DBCLOUDDOCSGetMetadataResult : NSObject <DBSerializable, NSCopying>

#pragma mark - Instance fields

/// (no description).
@property (nonatomic, readonly, copy) NSString *fileId;

/// Title of the Cloud Doc without extension.
@property (nonatomic, readonly, copy) NSString *title;

/// MIME type of the Cloud Doc.
@property (nonatomic, readonly, copy) NSString *mimeType;

/// Opaque string representing the version of the document stored in Dropbox
/// (only set for Dropbox-stored Documents).
@property (nonatomic, readonly, copy) NSString *version;

/// Application specific string representing the revision of a document (only
/// set for App-stored Documents).
@property (nonatomic, readonly, copy) NSString *providerVersion;

/// User identified by the auth token.
@property (nonatomic, readonly, nullable) DBCLOUDDOCSUserInfo *user;

/// true if the document is deleted or purged.
@property (nonatomic, readonly) NSNumber *isDeleted;

/// Actions that the user identified by the auth token can performn. This
/// message will not be populated for deleted documents.
@property (nonatomic, readonly, nullable) DBCLOUDDOCSUserPermissions *userPermissions;

#pragma mark - Constructors

///
/// Full constructor for the struct (exposes all instance variables).
///
/// @param fileId (no description).
/// @param title Title of the Cloud Doc without extension.
/// @param mimeType MIME type of the Cloud Doc.
/// @param version Opaque string representing the version of the document stored
/// in Dropbox (only set for Dropbox-stored Documents).
/// @param providerVersion Application specific string representing the revision
/// of a document (only set for App-stored Documents).
/// @param user User identified by the auth token.
/// @param isDeleted true if the document is deleted or purged.
/// @param userPermissions Actions that the user identified by the auth token
/// can performn. This message will not be populated for deleted documents.
///
/// @return An initialized instance.
///
- (instancetype)initWithFileId:(nullable NSString *)fileId
                         title:(nullable NSString *)title
                      mimeType:(nullable NSString *)mimeType
                       version:(nullable NSString *)version
               providerVersion:(nullable NSString *)providerVersion
                          user:(nullable DBCLOUDDOCSUserInfo *)user
                     isDeleted:(nullable NSNumber *)isDeleted
               userPermissions:(nullable DBCLOUDDOCSUserPermissions *)userPermissions;

///
/// Convenience constructor (exposes only non-nullable instance variables with
/// no default value).
///
///
/// @return An initialized instance.
///
- (instancetype)initDefault;

- (instancetype)init NS_UNAVAILABLE;

@end

#pragma mark - Serializer Object

///
/// The serialization class for the `GetMetadataResult` struct.
///
@interface DBCLOUDDOCSGetMetadataResultSerializer : NSObject

///
/// Serializes `DBCLOUDDOCSGetMetadataResult` instances.
///
/// @param instance An instance of the `DBCLOUDDOCSGetMetadataResult` API
/// object.
///
/// @return A json-compatible dictionary representation of the
/// `DBCLOUDDOCSGetMetadataResult` API object.
///
+ (nullable NSDictionary<NSString *, id> *)serialize:(DBCLOUDDOCSGetMetadataResult *)instance;

///
/// Deserializes `DBCLOUDDOCSGetMetadataResult` instances.
///
/// @param dict A json-compatible dictionary representation of the
/// `DBCLOUDDOCSGetMetadataResult` API object.
///
/// @return An instantiation of the `DBCLOUDDOCSGetMetadataResult` object.
///
+ (DBCLOUDDOCSGetMetadataResult *)deserialize:(NSDictionary<NSString *, id> *)dict;

@end

NS_ASSUME_NONNULL_END
