google-cloud-api_keys-v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 ApiKeys
23
+ module V2
24
+ module ApiKeys
25
+ # Path helper methods for the ApiKeys API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Key resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/keys/{key}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param key [String]
37
+ #
38
+ # @return [::String]
39
+ def key_path project:, location:, key:
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}/keys/#{key}"
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,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/api_keys/v2/version"
24
+
25
+ require "google/cloud/api_keys/v2/api_keys/credentials"
26
+ require "google/cloud/api_keys/v2/api_keys/paths"
27
+ require "google/cloud/api_keys/v2/api_keys/operations"
28
+ require "google/cloud/api_keys/v2/api_keys/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module ApiKeys
33
+ module V2
34
+ ##
35
+ # Manages the API keys associated with projects.
36
+ #
37
+ # To load this service and instantiate a client:
38
+ #
39
+ # require "google/cloud/api_keys/v2/api_keys"
40
+ # client = ::Google::Cloud::ApiKeys::V2::ApiKeys::Client.new
41
+ #
42
+ module ApiKeys
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ helper_path = ::File.join __dir__, "api_keys", "helpers.rb"
50
+ require "google/cloud/api_keys/v2/api_keys/helpers" if ::File.file? helper_path
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 ApiKeys
23
+ module V2
24
+ VERSION = "0.1.0"
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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
+ require "google/cloud/api_keys/v2/api_keys"
20
+ require "google/cloud/api_keys/v2/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module ApiKeys
25
+ ##
26
+ # To load this package, including all its services, and instantiate a client:
27
+ #
28
+ # @example
29
+ #
30
+ # require "google/cloud/api_keys/v2"
31
+ # client = ::Google::Cloud::ApiKeys::V2::ApiKeys::Client.new
32
+ #
33
+ module V2
34
+ end
35
+ end
36
+ end
37
+ end
38
+
39
+ helper_path = ::File.join __dir__, "v2", "_helpers.rb"
40
+ require "google/cloud/api_keys/v2/_helpers" if ::File.file? helper_path
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/cloud/api_keys/v2"
@@ -0,0 +1,4 @@
1
+ # API Keys V2 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,173 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 ApiKeys
23
+ module V2
24
+ # Request message for `CreateKey` method.
25
+ # @!attribute [rw] parent
26
+ # @return [::String]
27
+ # Required. The project in which the API key is created.
28
+ # @!attribute [rw] key
29
+ # @return [::Google::Cloud::ApiKeys::V2::Key]
30
+ # Required. The API key fields to set at creation time.
31
+ # You can configure only the `display_name`, `restrictions`, and
32
+ # `annotations` fields.
33
+ # @!attribute [rw] key_id
34
+ # @return [::String]
35
+ # User specified key id (optional). If specified, it will become the final
36
+ # component of the key resource name.
37
+ #
38
+ # The id must be unique within the project, must conform with RFC-1034,
39
+ # is restricted to lower-cased letters, and has a maximum length of 63
40
+ # characters. In another word, the id must match the regular
41
+ # expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.
42
+ #
43
+ # The id must NOT be a UUID-like string.
44
+ class CreateKeyRequest
45
+ include ::Google::Protobuf::MessageExts
46
+ extend ::Google::Protobuf::MessageExts::ClassMethods
47
+ end
48
+
49
+ # Request message for `ListKeys` method.
50
+ # @!attribute [rw] parent
51
+ # @return [::String]
52
+ # Required. Lists all API keys associated with this project.
53
+ # @!attribute [rw] page_size
54
+ # @return [::Integer]
55
+ # Optional. Specifies the maximum number of results to be returned at a time.
56
+ # @!attribute [rw] page_token
57
+ # @return [::String]
58
+ # Optional. Requests a specific page of results.
59
+ # @!attribute [rw] show_deleted
60
+ # @return [::Boolean]
61
+ # Optional. Indicate that keys deleted in the past 30 days should also be
62
+ # returned.
63
+ class ListKeysRequest
64
+ include ::Google::Protobuf::MessageExts
65
+ extend ::Google::Protobuf::MessageExts::ClassMethods
66
+ end
67
+
68
+ # Response message for `ListKeys` method.
69
+ # @!attribute [rw] keys
70
+ # @return [::Array<::Google::Cloud::ApiKeys::V2::Key>]
71
+ # A list of API keys.
72
+ # @!attribute [rw] next_page_token
73
+ # @return [::String]
74
+ # The pagination token for the next page of results.
75
+ class ListKeysResponse
76
+ include ::Google::Protobuf::MessageExts
77
+ extend ::Google::Protobuf::MessageExts::ClassMethods
78
+ end
79
+
80
+ # Request message for `GetKey` method.
81
+ # @!attribute [rw] name
82
+ # @return [::String]
83
+ # Required. The resource name of the API key to get.
84
+ class GetKeyRequest
85
+ include ::Google::Protobuf::MessageExts
86
+ extend ::Google::Protobuf::MessageExts::ClassMethods
87
+ end
88
+
89
+ # Request message for `GetKeyString` method.
90
+ # @!attribute [rw] name
91
+ # @return [::String]
92
+ # Required. The resource name of the API key to be retrieved.
93
+ class GetKeyStringRequest
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+
98
+ # Response message for `GetKeyString` method.
99
+ # @!attribute [rw] key_string
100
+ # @return [::String]
101
+ # An encrypted and signed value of the key.
102
+ class GetKeyStringResponse
103
+ include ::Google::Protobuf::MessageExts
104
+ extend ::Google::Protobuf::MessageExts::ClassMethods
105
+ end
106
+
107
+ # Request message for `UpdateKey` method.
108
+ # @!attribute [rw] key
109
+ # @return [::Google::Cloud::ApiKeys::V2::Key]
110
+ # Required. Set the `name` field to the resource name of the API key to be
111
+ # updated. You can update only the `display_name`, `restrictions`, and
112
+ # `annotations` fields.
113
+ # @!attribute [rw] update_mask
114
+ # @return [::Google::Protobuf::FieldMask]
115
+ # The field mask specifies which fields to be updated as part of this
116
+ # request. All other fields are ignored.
117
+ # Mutable fields are: `display_name`, `restrictions`, and `annotations`.
118
+ # If an update mask is not provided, the service treats it as an implied mask
119
+ # equivalent to all allowed fields that are set on the wire. If the field
120
+ # mask has a special value "*", the service treats it equivalent to replace
121
+ # all allowed mutable fields.
122
+ class UpdateKeyRequest
123
+ include ::Google::Protobuf::MessageExts
124
+ extend ::Google::Protobuf::MessageExts::ClassMethods
125
+ end
126
+
127
+ # Request message for `DeleteKey` method.
128
+ # @!attribute [rw] name
129
+ # @return [::String]
130
+ # Required. The resource name of the API key to be deleted.
131
+ # @!attribute [rw] etag
132
+ # @return [::String]
133
+ # Optional. The etag known to the client for the expected state of the key.
134
+ # This is to be used for optimistic concurrency.
135
+ class DeleteKeyRequest
136
+ include ::Google::Protobuf::MessageExts
137
+ extend ::Google::Protobuf::MessageExts::ClassMethods
138
+ end
139
+
140
+ # Request message for `UndeleteKey` method.
141
+ # @!attribute [rw] name
142
+ # @return [::String]
143
+ # Required. The resource name of the API key to be undeleted.
144
+ class UndeleteKeyRequest
145
+ include ::Google::Protobuf::MessageExts
146
+ extend ::Google::Protobuf::MessageExts::ClassMethods
147
+ end
148
+
149
+ # Request message for `LookupKey` method.
150
+ # @!attribute [rw] key_string
151
+ # @return [::String]
152
+ # Required. Finds the project that owns the key string value.
153
+ class LookupKeyRequest
154
+ include ::Google::Protobuf::MessageExts
155
+ extend ::Google::Protobuf::MessageExts::ClassMethods
156
+ end
157
+
158
+ # Response message for `LookupKey` method.
159
+ # @!attribute [rw] parent
160
+ # @return [::String]
161
+ # The project that owns the key with the value specified in the request.
162
+ # @!attribute [rw] name
163
+ # @return [::String]
164
+ # The resource name of the API key. If the API key has been purged,
165
+ # resource name is empty.
166
+ class LookupKeyResponse
167
+ include ::Google::Protobuf::MessageExts
168
+ extend ::Google::Protobuf::MessageExts::ClassMethods
169
+ end
170
+ end
171
+ end
172
+ end
173
+ end
@@ -0,0 +1,189 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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 ApiKeys
23
+ module V2
24
+ # The representation of a key managed by the API Keys API.
25
+ # @!attribute [r] name
26
+ # @return [::String]
27
+ # Output only. The resource name of the key.
28
+ # The `name` has the form:
29
+ # `projects/<PROJECT_NUMBER>/locations/global/keys/<KEY_ID>`.
30
+ # For example:
31
+ # `projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2`
32
+ #
33
+ # NOTE: Key is a global resource; hence the only supported value for
34
+ # location is `global`.
35
+ # @!attribute [r] uid
36
+ # @return [::String]
37
+ # Output only. Unique id in UUID4 format.
38
+ # @!attribute [rw] display_name
39
+ # @return [::String]
40
+ # Human-readable display name of this key that you can modify.
41
+ # The maximum length is 63 characters.
42
+ # @!attribute [r] key_string
43
+ # @return [::String]
44
+ # Output only. An encrypted and signed value held by this key.
45
+ # This field can be accessed only through the `GetKeyString` method.
46
+ # @!attribute [r] create_time
47
+ # @return [::Google::Protobuf::Timestamp]
48
+ # Output only. A timestamp identifying the time this key was originally
49
+ # created.
50
+ # @!attribute [r] update_time
51
+ # @return [::Google::Protobuf::Timestamp]
52
+ # Output only. A timestamp identifying the time this key was last
53
+ # updated.
54
+ # @!attribute [r] delete_time
55
+ # @return [::Google::Protobuf::Timestamp]
56
+ # Output only. A timestamp when this key was deleted. If the resource is not deleted,
57
+ # this must be empty.
58
+ # @!attribute [rw] annotations
59
+ # @return [::Google::Protobuf::Map{::String => ::String}]
60
+ # Annotations is an unstructured key-value map stored with a policy that
61
+ # may be set by external tools to store and retrieve arbitrary metadata.
62
+ # They are not queryable and should be preserved when modifying objects.
63
+ # @!attribute [rw] restrictions
64
+ # @return [::Google::Cloud::ApiKeys::V2::Restrictions]
65
+ # Key restrictions.
66
+ # @!attribute [r] etag
67
+ # @return [::String]
68
+ # Output only. A checksum computed by the server based on the current value of the Key
69
+ # resource. This may be sent on update and delete requests to ensure the
70
+ # client has an up-to-date value before proceeding.
71
+ # See https://google.aip.dev/154.
72
+ class Key
73
+ include ::Google::Protobuf::MessageExts
74
+ extend ::Google::Protobuf::MessageExts::ClassMethods
75
+
76
+ # @!attribute [rw] key
77
+ # @return [::String]
78
+ # @!attribute [rw] value
79
+ # @return [::String]
80
+ class AnnotationsEntry
81
+ include ::Google::Protobuf::MessageExts
82
+ extend ::Google::Protobuf::MessageExts::ClassMethods
83
+ end
84
+ end
85
+
86
+ # Describes the restrictions on the key.
87
+ # @!attribute [rw] browser_key_restrictions
88
+ # @return [::Google::Cloud::ApiKeys::V2::BrowserKeyRestrictions]
89
+ # The HTTP referrers (websites) that are allowed to use the key.
90
+ # @!attribute [rw] server_key_restrictions
91
+ # @return [::Google::Cloud::ApiKeys::V2::ServerKeyRestrictions]
92
+ # The IP addresses of callers that are allowed to use the key.
93
+ # @!attribute [rw] android_key_restrictions
94
+ # @return [::Google::Cloud::ApiKeys::V2::AndroidKeyRestrictions]
95
+ # The Android apps that are allowed to use the key.
96
+ # @!attribute [rw] ios_key_restrictions
97
+ # @return [::Google::Cloud::ApiKeys::V2::IosKeyRestrictions]
98
+ # The iOS apps that are allowed to use the key.
99
+ # @!attribute [rw] api_targets
100
+ # @return [::Array<::Google::Cloud::ApiKeys::V2::ApiTarget>]
101
+ # A restriction for a specific service and optionally one or
102
+ # more specific methods. Requests are allowed if they
103
+ # match any of these restrictions. If no restrictions are
104
+ # specified, all targets are allowed.
105
+ class Restrictions
106
+ include ::Google::Protobuf::MessageExts
107
+ extend ::Google::Protobuf::MessageExts::ClassMethods
108
+ end
109
+
110
+ # The HTTP referrers (websites) that are allowed to use the key.
111
+ # @!attribute [rw] allowed_referrers
112
+ # @return [::Array<::String>]
113
+ # A list of regular expressions for the referrer URLs that are allowed
114
+ # to make API calls with this key.
115
+ class BrowserKeyRestrictions
116
+ include ::Google::Protobuf::MessageExts
117
+ extend ::Google::Protobuf::MessageExts::ClassMethods
118
+ end
119
+
120
+ # The IP addresses of callers that are allowed to use the key.
121
+ # @!attribute [rw] allowed_ips
122
+ # @return [::Array<::String>]
123
+ # A list of the caller IP addresses that are allowed to make API calls
124
+ # with this key.
125
+ class ServerKeyRestrictions
126
+ include ::Google::Protobuf::MessageExts
127
+ extend ::Google::Protobuf::MessageExts::ClassMethods
128
+ end
129
+
130
+ # The Android apps that are allowed to use the key.
131
+ # @!attribute [rw] allowed_applications
132
+ # @return [::Array<::Google::Cloud::ApiKeys::V2::AndroidApplication>]
133
+ # A list of Android applications that are allowed to make API calls with
134
+ # this key.
135
+ class AndroidKeyRestrictions
136
+ include ::Google::Protobuf::MessageExts
137
+ extend ::Google::Protobuf::MessageExts::ClassMethods
138
+ end
139
+
140
+ # Identifier of an Android application for key use.
141
+ # @!attribute [rw] sha1_fingerprint
142
+ # @return [::String]
143
+ # The SHA1 fingerprint of the application. For example, both sha1 formats are
144
+ # acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or
145
+ # DA39A3EE5E6B4B0D3255BFEF95601890AFD80709.
146
+ # Output format is the latter.
147
+ # @!attribute [rw] package_name
148
+ # @return [::String]
149
+ # The package name of the application.
150
+ class AndroidApplication
151
+ include ::Google::Protobuf::MessageExts
152
+ extend ::Google::Protobuf::MessageExts::ClassMethods
153
+ end
154
+
155
+ # The iOS apps that are allowed to use the key.
156
+ # @!attribute [rw] allowed_bundle_ids
157
+ # @return [::Array<::String>]
158
+ # A list of bundle IDs that are allowed when making API calls with this key.
159
+ class IosKeyRestrictions
160
+ include ::Google::Protobuf::MessageExts
161
+ extend ::Google::Protobuf::MessageExts::ClassMethods
162
+ end
163
+
164
+ # A restriction for a specific service and optionally one or multiple
165
+ # specific methods. Both fields are case insensitive.
166
+ # @!attribute [rw] service
167
+ # @return [::String]
168
+ # The service for this restriction. It should be the canonical
169
+ # service name, for example: `translate.googleapis.com`.
170
+ # You can use [`gcloud services list`](/sdk/gcloud/reference/services/list)
171
+ # to get a list of services that are enabled in the project.
172
+ # @!attribute [rw] methods
173
+ # @return [::Array<::String>]
174
+ # Optional. List of one or more methods that can be called.
175
+ # If empty, all methods for the service are allowed. A wildcard
176
+ # (*) can be used as the last symbol.
177
+ # Valid examples:
178
+ # `google.cloud.translate.v2.TranslateService.GetSupportedLanguage`
179
+ # `TranslateText`
180
+ # `Get*`
181
+ # `translate.googleapis.com.Get*`
182
+ class ApiTarget
183
+ include ::Google::Protobuf::MessageExts
184
+ extend ::Google::Protobuf::MessageExts::ClassMethods
185
+ end
186
+ end
187
+ end
188
+ end
189
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
69
+ end
70
+ end
71
+ end