Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame^] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | // source: google/protobuf/field_mask.proto |
| 3 | |
| 4 | #import "GPBProtocolBuffers.h" |
| 5 | |
| 6 | #if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
| 7 | #error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources. |
| 8 | #endif |
| 9 | |
| 10 | // @@protoc_insertion_point(imports) |
| 11 | |
| 12 | CF_EXTERN_C_BEGIN |
| 13 | |
| 14 | NS_ASSUME_NONNULL_BEGIN |
| 15 | |
| 16 | #pragma mark - GPBFieldMaskRoot |
| 17 | |
| 18 | @interface GPBFieldMaskRoot : GPBRootObject |
| 19 | |
| 20 | // The base class provides: |
| 21 | // + (GPBExtensionRegistry *)extensionRegistry; |
| 22 | // which is an GPBExtensionRegistry that includes all the extensions defined by |
| 23 | // this file and all files that it depends on. |
| 24 | |
| 25 | @end |
| 26 | |
| 27 | #pragma mark - GPBFieldMask |
| 28 | |
| 29 | typedef GPB_ENUM(GPBFieldMask_FieldNumber) { |
| 30 | GPBFieldMask_FieldNumber_PathsArray = 1, |
| 31 | }; |
| 32 | |
| 33 | // `FieldMask` represents a set of symbolic field paths, for example: |
| 34 | // |
| 35 | // paths: "f.a" |
| 36 | // paths: "f.b.d" |
| 37 | // |
| 38 | // Here `f` represents a field in some root message, `a` and `b` |
| 39 | // fields in the message found in `f`, and `d` a field found in the |
| 40 | // message in `f.b`. |
| 41 | // |
| 42 | // Field masks are used to specify a subset of fields that should be |
| 43 | // returned by a get operation or modified by an update operation. |
| 44 | // Field masks also have a custom JSON encoding (see below). |
| 45 | // |
| 46 | // # Field Masks in Projections |
| 47 | // |
| 48 | // When used in the context of a projection, a response message or |
| 49 | // sub-message is filtered by the API to only contain those fields as |
| 50 | // specified in the mask. For example, if the mask in the previous |
| 51 | // example is applied to a response message as follows: |
| 52 | // |
| 53 | // f { |
| 54 | // a : 22 |
| 55 | // b { |
| 56 | // d : 1 |
| 57 | // x : 2 |
| 58 | // } |
| 59 | // y : 13 |
| 60 | // } |
| 61 | // z: 8 |
| 62 | // |
| 63 | // The result will not contain specific values for fields x,y and z |
| 64 | // (their value will be set to the default, and omitted in proto text |
| 65 | // output): |
| 66 | // |
| 67 | // |
| 68 | // f { |
| 69 | // a : 22 |
| 70 | // b { |
| 71 | // d : 1 |
| 72 | // } |
| 73 | // } |
| 74 | // |
| 75 | // A repeated field is not allowed except at the last position of a |
| 76 | // field mask. |
| 77 | // |
| 78 | // If a FieldMask object is not present in a get operation, the |
| 79 | // operation applies to all fields (as if a FieldMask of all fields |
| 80 | // had been specified). |
| 81 | // |
| 82 | // Note that a field mask does not necessarily applies to the |
| 83 | // top-level response message. In case of a REST get operation, the |
| 84 | // field mask applies directly to the response, but in case of a REST |
| 85 | // list operation, the mask instead applies to each individual message |
| 86 | // in the returned resource list. In case of a REST custom method, |
| 87 | // other definitions may be used. Where the mask applies will be |
| 88 | // clearly documented together with its declaration in the API. In |
| 89 | // any case, the effect on the returned resource/resources is required |
| 90 | // behavior for APIs. |
| 91 | // |
| 92 | // # Field Masks in Update Operations |
| 93 | // |
| 94 | // A field mask in update operations specifies which fields of the |
| 95 | // targeted resource are going to be updated. The API is required |
| 96 | // to only change the values of the fields as specified in the mask |
| 97 | // and leave the others untouched. If a resource is passed in to |
| 98 | // describe the updated values, the API ignores the values of all |
| 99 | // fields not covered by the mask. |
| 100 | // |
| 101 | // In order to reset a field's value to the default, the field must |
| 102 | // be in the mask and set to the default value in the provided resource. |
| 103 | // Hence, in order to reset all fields of a resource, provide a default |
| 104 | // instance of the resource and set all fields in the mask, or do |
| 105 | // not provide a mask as described below. |
| 106 | // |
| 107 | // If a field mask is not present on update, the operation applies to |
| 108 | // all fields (as if a field mask of all fields has been specified). |
| 109 | // Note that in the presence of schema evolution, this may mean that |
| 110 | // fields the client does not know and has therefore not filled into |
| 111 | // the request will be reset to their default. If this is unwanted |
| 112 | // behavior, a specific service may require a client to always specify |
| 113 | // a field mask, producing an error if not. |
| 114 | // |
| 115 | // As with get operations, the location of the resource which |
| 116 | // describes the updated values in the request message depends on the |
| 117 | // operation kind. In any case, the effect of the field mask is |
| 118 | // required to be honored by the API. |
| 119 | // |
| 120 | // ## Considerations for HTTP REST |
| 121 | // |
| 122 | // The HTTP kind of an update operation which uses a field mask must |
| 123 | // be set to PATCH instead of PUT in order to satisfy HTTP semantics |
| 124 | // (PUT must only be used for full updates). |
| 125 | // |
| 126 | // # JSON Encoding of Field Masks |
| 127 | // |
| 128 | // In JSON, a field mask is encoded as a single string where paths are |
| 129 | // separated by a comma. Fields name in each path are converted |
| 130 | // to/from lower-camel naming conventions. |
| 131 | // |
| 132 | // As an example, consider the following message declarations: |
| 133 | // |
| 134 | // message Profile { |
| 135 | // User user = 1; |
| 136 | // Photo photo = 2; |
| 137 | // } |
| 138 | // message User { |
| 139 | // string display_name = 1; |
| 140 | // string address = 2; |
| 141 | // } |
| 142 | // |
| 143 | // In proto a field mask for `Profile` may look as such: |
| 144 | // |
| 145 | // mask { |
| 146 | // paths: "user.display_name" |
| 147 | // paths: "photo" |
| 148 | // } |
| 149 | // |
| 150 | // In JSON, the same mask is represented as below: |
| 151 | // |
| 152 | // { |
| 153 | // mask: "user.displayName,photo" |
| 154 | // } |
| 155 | @interface GPBFieldMask : GPBMessage |
| 156 | |
| 157 | // The set of field mask paths. |
| 158 | // |pathsArray| contains |NSString| |
| 159 | @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *pathsArray; |
| 160 | @property(nonatomic, readonly) NSUInteger pathsArray_Count; |
| 161 | |
| 162 | @end |
| 163 | |
| 164 | NS_ASSUME_NONNULL_END |
| 165 | |
| 166 | CF_EXTERN_C_END |
| 167 | |
| 168 | // @@protoc_insertion_point(global_scope) |