diff options
Diffstat (limited to 'Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h')
-rw-r--r-- | Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h | 432 |
1 files changed, 432 insertions, 0 deletions
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h new file mode 100644 index 0000000..c3c4498 --- /dev/null +++ b/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h @@ -0,0 +1,432 @@ +/* + * Copyright 2017 Google + * + * 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. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/firestore/v1beta1/write.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import <Protobuf/GPBProtocolBuffers.h> +#else + #import "GPBProtocolBuffers.h" +#endif + +#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 +#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. +#endif +#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION +#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. +#endif + +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +CF_EXTERN_C_BEGIN + +@class GCFSDocument; +@class GCFSDocumentMask; +@class GCFSDocumentTransform; +@class GCFSDocumentTransform_FieldTransform; +@class GCFSPrecondition; +@class GCFSValue; +@class GPBTimestamp; + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - Enum GCFSDocumentTransform_FieldTransform_ServerValue + +/** A value that is calculated by the server. */ +typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_ServerValue) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + GCFSDocumentTransform_FieldTransform_ServerValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + /** Unspecified. This value must not be used. */ + GCFSDocumentTransform_FieldTransform_ServerValue_ServerValueUnspecified = 0, + + /** The time at which the server processed the request. */ + GCFSDocumentTransform_FieldTransform_ServerValue_RequestTime = 1, +}; + +GPBEnumDescriptor *GCFSDocumentTransform_FieldTransform_ServerValue_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL GCFSDocumentTransform_FieldTransform_ServerValue_IsValidValue(int32_t value); + +#pragma mark - GCFSWriteRoot + +/** + * Exposes the extension registry for this file. + * + * The base class provides: + * @code + * + (GPBExtensionRegistry *)extensionRegistry; + * @endcode + * which is a @c GPBExtensionRegistry that includes all the extensions defined by + * this file and all files that it depends on. + **/ +@interface GCFSWriteRoot : GPBRootObject +@end + +#pragma mark - GCFSWrite + +typedef GPB_ENUM(GCFSWrite_FieldNumber) { + GCFSWrite_FieldNumber_Update = 1, + GCFSWrite_FieldNumber_Delete_p = 2, + GCFSWrite_FieldNumber_UpdateMask = 3, + GCFSWrite_FieldNumber_CurrentDocument = 4, + GCFSWrite_FieldNumber_Verify = 5, + GCFSWrite_FieldNumber_Transform = 6, +}; + +typedef GPB_ENUM(GCFSWrite_Operation_OneOfCase) { + GCFSWrite_Operation_OneOfCase_GPBUnsetOneOfCase = 0, + GCFSWrite_Operation_OneOfCase_Update = 1, + GCFSWrite_Operation_OneOfCase_Delete_p = 2, + GCFSWrite_Operation_OneOfCase_Verify = 5, + GCFSWrite_Operation_OneOfCase_Transform = 6, +}; + +/** + * A write on a document. + **/ +@interface GCFSWrite : GPBMessage + +/** The operation to execute. */ +@property(nonatomic, readonly) GCFSWrite_Operation_OneOfCase operationOneOfCase; + +/** A document to write. */ +@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *update; + +/** + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + **/ +@property(nonatomic, readwrite, copy, null_resettable) NSString *delete_p; + +/** + * The name of a document on which to verify the `current_document` + * precondition. + * This only requires read access to the document. + **/ +@property(nonatomic, readwrite, copy, null_resettable) NSString *verify; + +/** + * Applies a tranformation to a document. + * At most one `transform` per document is allowed in a given request. + * An `update` cannot follow a `transform` on the same document in a given + * request. + **/ +@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentTransform *transform; + +/** + * The fields to update in this write. + * + * This field can be set only when the operation is `update`. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + **/ +@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *updateMask; +/** Test to see if @c updateMask has been set. */ +@property(nonatomic, readwrite) BOOL hasUpdateMask; + +/** + * An optional precondition on the document. + * + * The write will fail if this is set and not met by the target document. + **/ +@property(nonatomic, readwrite, strong, null_resettable) GCFSPrecondition *currentDocument; +/** Test to see if @c currentDocument has been set. */ +@property(nonatomic, readwrite) BOOL hasCurrentDocument; + +@end + +/** + * Clears whatever value was set for the oneof 'operation'. + **/ +void GCFSWrite_ClearOperationOneOfCase(GCFSWrite *message); + +#pragma mark - GCFSDocumentTransform + +typedef GPB_ENUM(GCFSDocumentTransform_FieldNumber) { + GCFSDocumentTransform_FieldNumber_Document = 1, + GCFSDocumentTransform_FieldNumber_FieldTransformsArray = 2, +}; + +/** + * A transformation of a document. + **/ +@interface GCFSDocumentTransform : GPBMessage + +/** The name of the document to transform. */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *document; + +/** + * The list of transformations to apply to the fields of the document, in + * order. + **/ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSDocumentTransform_FieldTransform*> *fieldTransformsArray; +/** The number of items in @c fieldTransformsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger fieldTransformsArray_Count; + +@end + +#pragma mark - GCFSDocumentTransform_FieldTransform + +typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_FieldNumber) { + GCFSDocumentTransform_FieldTransform_FieldNumber_FieldPath = 1, + GCFSDocumentTransform_FieldTransform_FieldNumber_SetToServerValue = 2, +}; + +typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase) { + GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_GPBUnsetOneOfCase = 0, + GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_SetToServerValue = 2, +}; + +/** + * A transformation of a field of the document. + **/ +@interface GCFSDocumentTransform_FieldTransform : GPBMessage + +/** + * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax + * reference. + **/ +@property(nonatomic, readwrite, copy, null_resettable) NSString *fieldPath; + +/** The transformation to apply on the field. */ +@property(nonatomic, readonly) GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase transformTypeOneOfCase; + +/** Sets the field to the given server value. */ +@property(nonatomic, readwrite) GCFSDocumentTransform_FieldTransform_ServerValue setToServerValue; + +@end + +/** + * Fetches the raw value of a @c GCFSDocumentTransform_FieldTransform's @c setToServerValue property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t GCFSDocumentTransform_FieldTransform_SetToServerValue_RawValue(GCFSDocumentTransform_FieldTransform *message); +/** + * Sets the raw value of an @c GCFSDocumentTransform_FieldTransform's @c setToServerValue property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetGCFSDocumentTransform_FieldTransform_SetToServerValue_RawValue(GCFSDocumentTransform_FieldTransform *message, int32_t value); + +/** + * Clears whatever value was set for the oneof 'transformType'. + **/ +void GCFSDocumentTransform_FieldTransform_ClearTransformTypeOneOfCase(GCFSDocumentTransform_FieldTransform *message); + +#pragma mark - GCFSWriteResult + +typedef GPB_ENUM(GCFSWriteResult_FieldNumber) { + GCFSWriteResult_FieldNumber_UpdateTime = 1, + GCFSWriteResult_FieldNumber_TransformResultsArray = 2, +}; + +/** + * The result of applying a write. + **/ +@interface GCFSWriteResult : GPBMessage + +/** + * The last update time of the document after applying the write. Not set + * after a `delete`. + * + * If the write did not actually change the document, this will be the + * previous update_time. + **/ +@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *updateTime; +/** Test to see if @c updateTime has been set. */ +@property(nonatomic, readwrite) BOOL hasUpdateTime; + +/** + * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the + * same order. + **/ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSValue*> *transformResultsArray; +/** The number of items in @c transformResultsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger transformResultsArray_Count; + +@end + +#pragma mark - GCFSDocumentChange + +typedef GPB_ENUM(GCFSDocumentChange_FieldNumber) { + GCFSDocumentChange_FieldNumber_Document = 1, + GCFSDocumentChange_FieldNumber_TargetIdsArray = 5, + GCFSDocumentChange_FieldNumber_RemovedTargetIdsArray = 6, +}; + +/** + * A [Document][google.firestore.v1beta1.Document] has changed. + * + * May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that + * ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document]. + * + * Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical + * change, if multiple targets are affected. + **/ +@interface GCFSDocumentChange : GPBMessage + +/** + * The new state of the [Document][google.firestore.v1beta1.Document]. + * + * If `mask` is set, contains only fields that were updated or added. + **/ +@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document; +/** Test to see if @c document has been set. */ +@property(nonatomic, readwrite) BOOL hasDocument; + +/** A set of target IDs of targets that match this document. */ +@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *targetIdsArray; +/** The number of items in @c targetIdsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger targetIdsArray_Count; + +/** A set of target IDs for targets that no longer match this document. */ +@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *removedTargetIdsArray; +/** The number of items in @c removedTargetIdsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger removedTargetIdsArray_Count; + +@end + +#pragma mark - GCFSDocumentDelete + +typedef GPB_ENUM(GCFSDocumentDelete_FieldNumber) { + GCFSDocumentDelete_FieldNumber_Document = 1, + GCFSDocumentDelete_FieldNumber_ReadTime = 4, + GCFSDocumentDelete_FieldNumber_RemovedTargetIdsArray = 6, +}; + +/** + * A [Document][google.firestore.v1beta1.Document] has been deleted. + * + * May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the + * last of which deleted the [Document][google.firestore.v1beta1.Document]. + * + * Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical + * delete, if multiple targets are affected. + **/ +@interface GCFSDocumentDelete : GPBMessage + +/** The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted. */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *document; + +/** A set of target IDs for targets that previously matched this entity. */ +@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *removedTargetIdsArray; +/** The number of items in @c removedTargetIdsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger removedTargetIdsArray_Count; + +/** + * The read timestamp at which the delete was observed. + * + * Greater or equal to the `commit_time` of the delete. + **/ +@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime; +/** Test to see if @c readTime has been set. */ +@property(nonatomic, readwrite) BOOL hasReadTime; + +@end + +#pragma mark - GCFSDocumentRemove + +typedef GPB_ENUM(GCFSDocumentRemove_FieldNumber) { + GCFSDocumentRemove_FieldNumber_Document = 1, + GCFSDocumentRemove_FieldNumber_RemovedTargetIdsArray = 2, + GCFSDocumentRemove_FieldNumber_ReadTime = 4, +}; + +/** + * A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets. + * + * Sent if the document is no longer relevant to a target and is out of view. + * Can be sent instead of a DocumentDelete or a DocumentChange if the server + * can not send the new value of the document. + * + * Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical + * write or delete, if multiple targets are affected. + **/ +@interface GCFSDocumentRemove : GPBMessage + +/** The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view. */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *document; + +/** A set of target IDs for targets that previously matched this document. */ +@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *removedTargetIdsArray; +/** The number of items in @c removedTargetIdsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger removedTargetIdsArray_Count; + +/** + * The read timestamp at which the remove was observed. + * + * Greater or equal to the `commit_time` of the change/delete/remove. + **/ +@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime; +/** Test to see if @c readTime has been set. */ +@property(nonatomic, readwrite) BOOL hasReadTime; + +@end + +#pragma mark - GCFSExistenceFilter + +typedef GPB_ENUM(GCFSExistenceFilter_FieldNumber) { + GCFSExistenceFilter_FieldNumber_TargetId = 1, + GCFSExistenceFilter_FieldNumber_Count = 2, +}; + +/** + * A digest of all the documents that match a given target. + **/ +@interface GCFSExistenceFilter : GPBMessage + +/** The target ID to which this filter applies. */ +@property(nonatomic, readwrite) int32_t targetId; + +/** + * The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id]. + * + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + **/ +@property(nonatomic, readwrite) int32_t count; + +@end + +NS_ASSUME_NONNULL_END + +CF_EXTERN_C_END + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) |