//////////////////////////////////////////////////////////////////////////// // // Copyright 2016 Realm Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////// #import #import NS_ASSUME_NONNULL_BEGIN /** This model is used to apply permission changes defined in the permission offer object represented by the specified token, which was created by another user's `RLMSyncPermissionOffer` object. It should be used in conjunction with an `RLMSyncUser`'s Management Realm. See https://realm.io/docs/realm-object-server/#permissions for general documentation. */ @interface RLMSyncPermissionOfferResponse : RLMObject /// The globally unique ID string of this permission offer response object. @property (readonly) NSString *id; /// The date this object was initially created. @property (readonly) NSDate *createdAt; /// The date this object was last modified. @property (readonly) NSDate *updatedAt; /// The status code of the object that was processed by Realm Object Server. @property (nullable, readonly) NSNumber *statusCode; /// An error or informational message, typically written to by the Realm Object Server. @property (nullable, readonly) NSString *statusMessage; /// Sync management object status. @property (readonly) RLMSyncManagementObjectStatus status; /// The received token which uniquely identifies another user's `RLMSyncPermissionOffer`. @property (readonly) NSString *token; /// The remote URL to the realm on which these permission changes were applied. /// Generated by the server. @property (nullable, readonly) NSString *realmUrl; /** Construct a permission offer response object used to apply permission changes defined in the permission offer object represented by the specified token, which was created by another user's `RLMSyncPermissionOffer` object. @param token The received token which uniquely identifies another user's `RLMSyncPermissionOffer`. */ + (instancetype)permissionOfferResponseWithToken:(NSString *)token; @end NS_ASSUME_NONNULL_END