google-cloud-translate-v3 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Translate
23
+ module V3
24
+ module TranslationService
25
+ # Path helper methods for the TranslationService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Glossary resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/glossaries/{glossary}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param glossary [String]
37
+ #
38
+ # @return [::String]
39
+ def glossary_path project:, location:, glossary:
40
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
42
+
43
+ "projects/#{project}/locations/#{location}/glossaries/#{glossary}"
44
+ end
45
+
46
+ ##
47
+ # Create a fully-qualified Location resource string.
48
+ #
49
+ # The resource will be in the following format:
50
+ #
51
+ # `projects/{project}/locations/{location}`
52
+ #
53
+ # @param project [String]
54
+ # @param location [String]
55
+ #
56
+ # @return [::String]
57
+ def location_path project:, location:
58
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
59
+
60
+ "projects/#{project}/locations/#{location}"
61
+ end
62
+
63
+ extend self
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,233 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/translate/v3/translation_service.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/longrunning/operations_pb'
11
+ require 'google/protobuf/timestamp_pb'
12
+ Google::Protobuf::DescriptorPool.generated_pool.build do
13
+ add_file("google/cloud/translate/v3/translation_service.proto", :syntax => :proto3) do
14
+ add_message "google.cloud.translation.v3.TranslateTextGlossaryConfig" do
15
+ optional :glossary, :string, 1
16
+ optional :ignore_case, :bool, 2
17
+ end
18
+ add_message "google.cloud.translation.v3.TranslateTextRequest" do
19
+ repeated :contents, :string, 1
20
+ optional :mime_type, :string, 3
21
+ optional :source_language_code, :string, 4
22
+ optional :target_language_code, :string, 5
23
+ optional :parent, :string, 8
24
+ optional :model, :string, 6
25
+ optional :glossary_config, :message, 7, "google.cloud.translation.v3.TranslateTextGlossaryConfig"
26
+ map :labels, :string, :string, 10
27
+ end
28
+ add_message "google.cloud.translation.v3.TranslateTextResponse" do
29
+ repeated :translations, :message, 1, "google.cloud.translation.v3.Translation"
30
+ repeated :glossary_translations, :message, 3, "google.cloud.translation.v3.Translation"
31
+ end
32
+ add_message "google.cloud.translation.v3.Translation" do
33
+ optional :translated_text, :string, 1
34
+ optional :model, :string, 2
35
+ optional :detected_language_code, :string, 4
36
+ optional :glossary_config, :message, 3, "google.cloud.translation.v3.TranslateTextGlossaryConfig"
37
+ end
38
+ add_message "google.cloud.translation.v3.DetectLanguageRequest" do
39
+ optional :parent, :string, 5
40
+ optional :model, :string, 4
41
+ optional :mime_type, :string, 3
42
+ map :labels, :string, :string, 6
43
+ oneof :source do
44
+ optional :content, :string, 1
45
+ end
46
+ end
47
+ add_message "google.cloud.translation.v3.DetectedLanguage" do
48
+ optional :language_code, :string, 1
49
+ optional :confidence, :float, 2
50
+ end
51
+ add_message "google.cloud.translation.v3.DetectLanguageResponse" do
52
+ repeated :languages, :message, 1, "google.cloud.translation.v3.DetectedLanguage"
53
+ end
54
+ add_message "google.cloud.translation.v3.GetSupportedLanguagesRequest" do
55
+ optional :parent, :string, 3
56
+ optional :display_language_code, :string, 1
57
+ optional :model, :string, 2
58
+ end
59
+ add_message "google.cloud.translation.v3.SupportedLanguages" do
60
+ repeated :languages, :message, 1, "google.cloud.translation.v3.SupportedLanguage"
61
+ end
62
+ add_message "google.cloud.translation.v3.SupportedLanguage" do
63
+ optional :language_code, :string, 1
64
+ optional :display_name, :string, 2
65
+ optional :support_source, :bool, 3
66
+ optional :support_target, :bool, 4
67
+ end
68
+ add_message "google.cloud.translation.v3.GcsSource" do
69
+ optional :input_uri, :string, 1
70
+ end
71
+ add_message "google.cloud.translation.v3.InputConfig" do
72
+ optional :mime_type, :string, 1
73
+ oneof :source do
74
+ optional :gcs_source, :message, 2, "google.cloud.translation.v3.GcsSource"
75
+ end
76
+ end
77
+ add_message "google.cloud.translation.v3.GcsDestination" do
78
+ optional :output_uri_prefix, :string, 1
79
+ end
80
+ add_message "google.cloud.translation.v3.OutputConfig" do
81
+ oneof :destination do
82
+ optional :gcs_destination, :message, 1, "google.cloud.translation.v3.GcsDestination"
83
+ end
84
+ end
85
+ add_message "google.cloud.translation.v3.BatchTranslateTextRequest" do
86
+ optional :parent, :string, 1
87
+ optional :source_language_code, :string, 2
88
+ repeated :target_language_codes, :string, 3
89
+ map :models, :string, :string, 4
90
+ repeated :input_configs, :message, 5, "google.cloud.translation.v3.InputConfig"
91
+ optional :output_config, :message, 6, "google.cloud.translation.v3.OutputConfig"
92
+ map :glossaries, :string, :message, 7, "google.cloud.translation.v3.TranslateTextGlossaryConfig"
93
+ map :labels, :string, :string, 9
94
+ end
95
+ add_message "google.cloud.translation.v3.BatchTranslateMetadata" do
96
+ optional :state, :enum, 1, "google.cloud.translation.v3.BatchTranslateMetadata.State"
97
+ optional :translated_characters, :int64, 2
98
+ optional :failed_characters, :int64, 3
99
+ optional :total_characters, :int64, 4
100
+ optional :submit_time, :message, 5, "google.protobuf.Timestamp"
101
+ end
102
+ add_enum "google.cloud.translation.v3.BatchTranslateMetadata.State" do
103
+ value :STATE_UNSPECIFIED, 0
104
+ value :RUNNING, 1
105
+ value :SUCCEEDED, 2
106
+ value :FAILED, 3
107
+ value :CANCELLING, 4
108
+ value :CANCELLED, 5
109
+ end
110
+ add_message "google.cloud.translation.v3.BatchTranslateResponse" do
111
+ optional :total_characters, :int64, 1
112
+ optional :translated_characters, :int64, 2
113
+ optional :failed_characters, :int64, 3
114
+ optional :submit_time, :message, 4, "google.protobuf.Timestamp"
115
+ optional :end_time, :message, 5, "google.protobuf.Timestamp"
116
+ end
117
+ add_message "google.cloud.translation.v3.GlossaryInputConfig" do
118
+ oneof :source do
119
+ optional :gcs_source, :message, 1, "google.cloud.translation.v3.GcsSource"
120
+ end
121
+ end
122
+ add_message "google.cloud.translation.v3.Glossary" do
123
+ optional :name, :string, 1
124
+ optional :input_config, :message, 5, "google.cloud.translation.v3.GlossaryInputConfig"
125
+ optional :entry_count, :int32, 6
126
+ optional :submit_time, :message, 7, "google.protobuf.Timestamp"
127
+ optional :end_time, :message, 8, "google.protobuf.Timestamp"
128
+ oneof :languages do
129
+ optional :language_pair, :message, 3, "google.cloud.translation.v3.Glossary.LanguageCodePair"
130
+ optional :language_codes_set, :message, 4, "google.cloud.translation.v3.Glossary.LanguageCodesSet"
131
+ end
132
+ end
133
+ add_message "google.cloud.translation.v3.Glossary.LanguageCodePair" do
134
+ optional :source_language_code, :string, 1
135
+ optional :target_language_code, :string, 2
136
+ end
137
+ add_message "google.cloud.translation.v3.Glossary.LanguageCodesSet" do
138
+ repeated :language_codes, :string, 1
139
+ end
140
+ add_message "google.cloud.translation.v3.CreateGlossaryRequest" do
141
+ optional :parent, :string, 1
142
+ optional :glossary, :message, 2, "google.cloud.translation.v3.Glossary"
143
+ end
144
+ add_message "google.cloud.translation.v3.GetGlossaryRequest" do
145
+ optional :name, :string, 1
146
+ end
147
+ add_message "google.cloud.translation.v3.DeleteGlossaryRequest" do
148
+ optional :name, :string, 1
149
+ end
150
+ add_message "google.cloud.translation.v3.ListGlossariesRequest" do
151
+ optional :parent, :string, 1
152
+ optional :page_size, :int32, 2
153
+ optional :page_token, :string, 3
154
+ optional :filter, :string, 4
155
+ end
156
+ add_message "google.cloud.translation.v3.ListGlossariesResponse" do
157
+ repeated :glossaries, :message, 1, "google.cloud.translation.v3.Glossary"
158
+ optional :next_page_token, :string, 2
159
+ end
160
+ add_message "google.cloud.translation.v3.CreateGlossaryMetadata" do
161
+ optional :name, :string, 1
162
+ optional :state, :enum, 2, "google.cloud.translation.v3.CreateGlossaryMetadata.State"
163
+ optional :submit_time, :message, 3, "google.protobuf.Timestamp"
164
+ end
165
+ add_enum "google.cloud.translation.v3.CreateGlossaryMetadata.State" do
166
+ value :STATE_UNSPECIFIED, 0
167
+ value :RUNNING, 1
168
+ value :SUCCEEDED, 2
169
+ value :FAILED, 3
170
+ value :CANCELLING, 4
171
+ value :CANCELLED, 5
172
+ end
173
+ add_message "google.cloud.translation.v3.DeleteGlossaryMetadata" do
174
+ optional :name, :string, 1
175
+ optional :state, :enum, 2, "google.cloud.translation.v3.DeleteGlossaryMetadata.State"
176
+ optional :submit_time, :message, 3, "google.protobuf.Timestamp"
177
+ end
178
+ add_enum "google.cloud.translation.v3.DeleteGlossaryMetadata.State" do
179
+ value :STATE_UNSPECIFIED, 0
180
+ value :RUNNING, 1
181
+ value :SUCCEEDED, 2
182
+ value :FAILED, 3
183
+ value :CANCELLING, 4
184
+ value :CANCELLED, 5
185
+ end
186
+ add_message "google.cloud.translation.v3.DeleteGlossaryResponse" do
187
+ optional :name, :string, 1
188
+ optional :submit_time, :message, 2, "google.protobuf.Timestamp"
189
+ optional :end_time, :message, 3, "google.protobuf.Timestamp"
190
+ end
191
+ end
192
+ end
193
+
194
+ module Google
195
+ module Cloud
196
+ module Translate
197
+ module V3
198
+ TranslateTextGlossaryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextGlossaryConfig").msgclass
199
+ TranslateTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextRequest").msgclass
200
+ TranslateTextResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextResponse").msgclass
201
+ Translation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Translation").msgclass
202
+ DetectLanguageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectLanguageRequest").msgclass
203
+ DetectedLanguage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectedLanguage").msgclass
204
+ DetectLanguageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectLanguageResponse").msgclass
205
+ GetSupportedLanguagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetSupportedLanguagesRequest").msgclass
206
+ SupportedLanguages = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.SupportedLanguages").msgclass
207
+ SupportedLanguage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.SupportedLanguage").msgclass
208
+ GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsSource").msgclass
209
+ InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.InputConfig").msgclass
210
+ GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsDestination").msgclass
211
+ OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.OutputConfig").msgclass
212
+ BatchTranslateTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateTextRequest").msgclass
213
+ BatchTranslateMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateMetadata").msgclass
214
+ BatchTranslateMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateMetadata.State").enummodule
215
+ BatchTranslateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateResponse").msgclass
216
+ GlossaryInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryInputConfig").msgclass
217
+ Glossary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary").msgclass
218
+ Glossary::LanguageCodePair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary.LanguageCodePair").msgclass
219
+ Glossary::LanguageCodesSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary.LanguageCodesSet").msgclass
220
+ CreateGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryRequest").msgclass
221
+ GetGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetGlossaryRequest").msgclass
222
+ DeleteGlossaryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryRequest").msgclass
223
+ ListGlossariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossariesRequest").msgclass
224
+ ListGlossariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossariesResponse").msgclass
225
+ CreateGlossaryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryMetadata").msgclass
226
+ CreateGlossaryMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryMetadata.State").enummodule
227
+ DeleteGlossaryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryMetadata").msgclass
228
+ DeleteGlossaryMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryMetadata.State").enummodule
229
+ DeleteGlossaryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryResponse").msgclass
230
+ end
231
+ end
232
+ end
233
+ end
@@ -0,0 +1,73 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/translate/v3/translation_service.proto for package 'Google.Cloud.Translate.V3'
3
+ # Original file comments:
4
+ # Copyright 2019 Google LLC.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ #
19
+
20
+ require 'grpc'
21
+ require 'google/cloud/translate/v3/translation_service_pb'
22
+
23
+ module Google
24
+ module Cloud
25
+ module Translate
26
+ module V3
27
+ module TranslationService
28
+ # Proto file for the Cloud Translation API (v3 GA).
29
+ #
30
+ # Provides natural language translation operations.
31
+ class Service
32
+
33
+ include GRPC::GenericService
34
+
35
+ self.marshal_class_method = :encode
36
+ self.unmarshal_class_method = :decode
37
+ self.service_name = 'google.cloud.translation.v3.TranslationService'
38
+
39
+ # Translates input text and returns translated text.
40
+ rpc :TranslateText, Google::Cloud::Translate::V3::TranslateTextRequest, Google::Cloud::Translate::V3::TranslateTextResponse
41
+ # Detects the language of text within a request.
42
+ rpc :DetectLanguage, Google::Cloud::Translate::V3::DetectLanguageRequest, Google::Cloud::Translate::V3::DetectLanguageResponse
43
+ # Returns a list of supported languages for translation.
44
+ rpc :GetSupportedLanguages, Google::Cloud::Translate::V3::GetSupportedLanguagesRequest, Google::Cloud::Translate::V3::SupportedLanguages
45
+ # Translates a large volume of text in asynchronous batch mode.
46
+ # This function provides real-time output as the inputs are being processed.
47
+ # If caller cancels a request, the partial results (for an input file, it's
48
+ # all or nothing) may still be available on the specified output location.
49
+ #
50
+ # This call returns immediately and you can
51
+ # use google.longrunning.Operation.name to poll the status of the call.
52
+ rpc :BatchTranslateText, Google::Cloud::Translate::V3::BatchTranslateTextRequest, Google::Longrunning::Operation
53
+ # Creates a glossary and returns the long-running operation. Returns
54
+ # NOT_FOUND, if the project doesn't exist.
55
+ rpc :CreateGlossary, Google::Cloud::Translate::V3::CreateGlossaryRequest, Google::Longrunning::Operation
56
+ # Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't
57
+ # exist.
58
+ rpc :ListGlossaries, Google::Cloud::Translate::V3::ListGlossariesRequest, Google::Cloud::Translate::V3::ListGlossariesResponse
59
+ # Gets a glossary. Returns NOT_FOUND, if the glossary doesn't
60
+ # exist.
61
+ rpc :GetGlossary, Google::Cloud::Translate::V3::GetGlossaryRequest, Google::Cloud::Translate::V3::Glossary
62
+ # Deletes a glossary, or cancels glossary construction
63
+ # if the glossary isn't created yet.
64
+ # Returns NOT_FOUND, if the glossary doesn't exist.
65
+ rpc :DeleteGlossary, Google::Cloud::Translate::V3::DeleteGlossaryRequest, Google::Longrunning::Operation
66
+ end
67
+
68
+ Stub = Service.rpc_stub_class
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Translate
23
+ module V3
24
+ VERSION = "0.1.0"
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,4 @@
1
+ # Cloud Translation V3 Protocol Buffer Documentation
2
+
3
+ These files are for the YARD documentation of the generated protobuf files.
4
+ They are not intended to be required or loaded at runtime.
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # An indicator of the behavior of a given field (for example, that a field
23
+ # is required in requests, or given as output but ignored as input).
24
+ # This **does not** change the behavior in protocol buffers itself; it only
25
+ # denotes the behavior and may affect how API tooling handles the field.
26
+ #
27
+ # Note: This enum **may** receive new values in the future.
28
+ module FieldBehavior
29
+ # Conventional default for enums. Do not use this.
30
+ FIELD_BEHAVIOR_UNSPECIFIED = 0
31
+
32
+ # Specifically denotes a field as optional.
33
+ # While all fields in protocol buffers are optional, this may be specified
34
+ # for emphasis if appropriate.
35
+ OPTIONAL = 1
36
+
37
+ # Denotes a field as required.
38
+ # This indicates that the field **must** be provided as part of the request,
39
+ # and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
40
+ REQUIRED = 2
41
+
42
+ # Denotes a field as output only.
43
+ # This indicates that the field is provided in responses, but including the
44
+ # field in a request does nothing (the server *must* ignore it and
45
+ # *must not* throw an error as a result of the field's presence).
46
+ OUTPUT_ONLY = 3
47
+
48
+ # Denotes a field as input only.
49
+ # This indicates that the field is provided in requests, and the
50
+ # corresponding field is not included in output.
51
+ INPUT_ONLY = 4
52
+
53
+ # Denotes a field as immutable.
54
+ # This indicates that the field may be set once in a request to create a
55
+ # resource, but may not be changed thereafter.
56
+ IMMUTABLE = 5
57
+ end
58
+ end
59
+ end