google-cloud-service_usage-v1 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.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +139 -0
  6. data/lib/google-cloud-service_usage-v1.rb +21 -0
  7. data/lib/google/api/serviceusage/v1/resources_pb.rb +57 -0
  8. data/lib/google/api/serviceusage/v1/serviceusage_pb.rb +86 -0
  9. data/lib/google/api/serviceusage/v1/serviceusage_services_pb.rb +80 -0
  10. data/lib/google/cloud/service_usage/v1.rb +38 -0
  11. data/lib/google/cloud/service_usage/v1/service_usage.rb +53 -0
  12. data/lib/google/cloud/service_usage/v1/service_usage/client.rb +850 -0
  13. data/lib/google/cloud/service_usage/v1/service_usage/credentials.rb +53 -0
  14. data/lib/google/cloud/service_usage/v1/service_usage/operations.rb +655 -0
  15. data/lib/google/cloud/service_usage/v1/version.rb +28 -0
  16. data/proto_docs/README.md +4 -0
  17. data/proto_docs/google/api/auth.rb +247 -0
  18. data/proto_docs/google/api/documentation.rb +170 -0
  19. data/proto_docs/google/api/endpoint.rb +70 -0
  20. data/proto_docs/google/api/label.rb +49 -0
  21. data/proto_docs/google/api/launch_stage.rb +71 -0
  22. data/proto_docs/google/api/monitored_resource.rb +138 -0
  23. data/proto_docs/google/api/monitoring.rb +110 -0
  24. data/proto_docs/google/api/quota.rb +207 -0
  25. data/proto_docs/google/api/resource.rb +283 -0
  26. data/proto_docs/google/api/serviceusage/v1/resources.rb +122 -0
  27. data/proto_docs/google/api/serviceusage/v1/serviceusage.rb +242 -0
  28. data/proto_docs/google/api/usage.rb +100 -0
  29. data/proto_docs/google/longrunning/operations.rb +164 -0
  30. data/proto_docs/google/protobuf/any.rb +141 -0
  31. data/proto_docs/google/protobuf/api.rb +194 -0
  32. data/proto_docs/google/protobuf/duration.rb +98 -0
  33. data/proto_docs/google/protobuf/empty.rb +36 -0
  34. data/proto_docs/google/protobuf/source_context.rb +33 -0
  35. data/proto_docs/google/protobuf/struct.rb +96 -0
  36. data/proto_docs/google/protobuf/type.rb +223 -0
  37. data/proto_docs/google/rpc/status.rb +46 -0
  38. metadata +229 -0
@@ -0,0 +1,283 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+ # A simple descriptor of a resource type.
23
+ #
24
+ # ResourceDescriptor annotates a resource message (either by means of a
25
+ # protobuf annotation or use in the service config), and associates the
26
+ # resource's schema, the resource type, and the pattern of the resource name.
27
+ #
28
+ # Example:
29
+ #
30
+ # message Topic {
31
+ # // Indicates this message defines a resource schema.
32
+ # // Declares the resource type in the format of {service}/{kind}.
33
+ # // For Kubernetes resources, the format is {api group}/{kind}.
34
+ # option (google.api.resource) = {
35
+ # type: "pubsub.googleapis.com/Topic"
36
+ # name_descriptor: {
37
+ # pattern: "projects/{project}/topics/{topic}"
38
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
+ # parent_name_extractor: "projects/{project}"
40
+ # }
41
+ # };
42
+ # }
43
+ #
44
+ # The ResourceDescriptor Yaml config will look like:
45
+ #
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
+ #
53
+ # Sometimes, resources have multiple patterns, typically because they can
54
+ # live under multiple parents.
55
+ #
56
+ # Example:
57
+ #
58
+ # message LogEntry {
59
+ # option (google.api.resource) = {
60
+ # type: "logging.googleapis.com/LogEntry"
61
+ # name_descriptor: {
62
+ # pattern: "projects/{project}/logs/{log}"
63
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
+ # parent_name_extractor: "projects/{project}"
65
+ # }
66
+ # name_descriptor: {
67
+ # pattern: "folders/{folder}/logs/{log}"
68
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
+ # parent_name_extractor: "folders/{folder}"
70
+ # }
71
+ # name_descriptor: {
72
+ # pattern: "organizations/{organization}/logs/{log}"
73
+ # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
+ # parent_name_extractor: "organizations/{organization}"
75
+ # }
76
+ # name_descriptor: {
77
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
+ # parent_type: "billing.googleapis.com/BillingAccount"
79
+ # parent_name_extractor: "billingAccounts/{billing_account}"
80
+ # }
81
+ # };
82
+ # }
83
+ #
84
+ # The ResourceDescriptor Yaml config will look like:
85
+ #
86
+ # resources:
87
+ # - type: 'logging.googleapis.com/LogEntry'
88
+ # name_descriptor:
89
+ # - pattern: "projects/{project}/logs/{log}"
90
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
+ # parent_name_extractor: "projects/{project}"
92
+ # - pattern: "folders/{folder}/logs/{log}"
93
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
+ # parent_name_extractor: "folders/{folder}"
95
+ # - pattern: "organizations/{organization}/logs/{log}"
96
+ # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
+ # parent_name_extractor: "organizations/{organization}"
98
+ # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
+ # parent_type: "billing.googleapis.com/BillingAccount"
100
+ # parent_name_extractor: "billingAccounts/{billing_account}"
101
+ #
102
+ # For flexible resources, the resource name doesn't contain parent names, but
103
+ # the resource itself has parents for policy evaluation.
104
+ #
105
+ # Example:
106
+ #
107
+ # message Shelf {
108
+ # option (google.api.resource) = {
109
+ # type: "library.googleapis.com/Shelf"
110
+ # name_descriptor: {
111
+ # pattern: "shelves/{shelf}"
112
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
+ # }
114
+ # name_descriptor: {
115
+ # pattern: "shelves/{shelf}"
116
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
+ # }
118
+ # };
119
+ # }
120
+ #
121
+ # The ResourceDescriptor Yaml config will look like:
122
+ #
123
+ # resources:
124
+ # - type: 'library.googleapis.com/Shelf'
125
+ # name_descriptor:
126
+ # - pattern: "shelves/{shelf}"
127
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
+ # - pattern: "shelves/{shelf}"
129
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
+ # @!attribute [rw] type
131
+ # @return [::String]
132
+ # The resource type. It must be in the format of
133
+ # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
+ # singular and must not include version numbers.
135
+ #
136
+ # Example: `storage.googleapis.com/Bucket`
137
+ #
138
+ # The value of the resource_type_kind must follow the regular expression
139
+ # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
140
+ # should use PascalCase (UpperCamelCase). The maximum number of
141
+ # characters allowed for the `resource_type_kind` is 100.
142
+ # @!attribute [rw] pattern
143
+ # @return [::Array<::String>]
144
+ # Optional. The relative resource name pattern associated with this resource
145
+ # type. The DNS prefix of the full resource name shouldn't be specified here.
146
+ #
147
+ # The path pattern must follow the syntax, which aligns with HTTP binding
148
+ # syntax:
149
+ #
150
+ # Template = Segment { "/" Segment } ;
151
+ # Segment = LITERAL | Variable ;
152
+ # Variable = "{" LITERAL "}" ;
153
+ #
154
+ # Examples:
155
+ #
156
+ # - "projects/\\{project}/topics/\\{topic}"
157
+ # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
158
+ #
159
+ # The components in braces correspond to the IDs for each resource in the
160
+ # hierarchy. It is expected that, if multiple patterns are provided,
161
+ # the same component name (e.g. "project") refers to IDs of the same
162
+ # type of resource.
163
+ # @!attribute [rw] name_field
164
+ # @return [::String]
165
+ # Optional. The field on the resource that designates the resource name
166
+ # field. If omitted, this is assumed to be "name".
167
+ # @!attribute [rw] history
168
+ # @return [::Google::Api::ResourceDescriptor::History]
169
+ # Optional. The historical or future-looking state of the resource pattern.
170
+ #
171
+ # Example:
172
+ #
173
+ # // The InspectTemplate message originally only supported resource
174
+ # // names with organization, and project was added later.
175
+ # message InspectTemplate {
176
+ # option (google.api.resource) = {
177
+ # type: "dlp.googleapis.com/InspectTemplate"
178
+ # pattern:
179
+ # "organizations/{organization}/inspectTemplates/{inspect_template}"
180
+ # pattern: "projects/{project}/inspectTemplates/{inspect_template}"
181
+ # history: ORIGINALLY_SINGLE_PATTERN
182
+ # };
183
+ # }
184
+ # @!attribute [rw] plural
185
+ # @return [::String]
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
190
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
194
+ # @!attribute [rw] singular
195
+ # @return [::String]
196
+ # The same concept of the `singular` field in k8s CRD spec
197
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
198
+ # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
204
+ class ResourceDescriptor
205
+ include ::Google::Protobuf::MessageExts
206
+ extend ::Google::Protobuf::MessageExts::ClassMethods
207
+
208
+ # A description of the historical or future-looking state of the
209
+ # resource pattern.
210
+ module History
211
+ # The "unset" value.
212
+ HISTORY_UNSPECIFIED = 0
213
+
214
+ # The resource originally had one pattern and launched as such, and
215
+ # additional patterns were added later.
216
+ ORIGINALLY_SINGLE_PATTERN = 1
217
+
218
+ # The resource has one pattern, but the API owner expects to add more
219
+ # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
220
+ # that from being necessary once there are multiple patterns.)
221
+ FUTURE_MULTI_PATTERN = 2
222
+ end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
239
+ end
240
+
241
+ # Defines a proto annotation that describes a string field that refers to
242
+ # an API resource.
243
+ # @!attribute [rw] type
244
+ # @return [::String]
245
+ # The resource type that the annotated field references.
246
+ #
247
+ # Example:
248
+ #
249
+ # message Subscription {
250
+ # string topic = 2 [(google.api.resource_reference) = {
251
+ # type: "pubsub.googleapis.com/Topic"
252
+ # }];
253
+ # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
265
+ # @!attribute [rw] child_type
266
+ # @return [::String]
267
+ # The resource type of a child collection that the annotated field
268
+ # references. This is useful for annotating the `parent` field that
269
+ # doesn't have a fixed resource type.
270
+ #
271
+ # Example:
272
+ #
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
278
+ class ResourceReference
279
+ include ::Google::Protobuf::MessageExts
280
+ extend ::Google::Protobuf::MessageExts::ClassMethods
281
+ end
282
+ end
283
+ end
@@ -0,0 +1,122 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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 ServiceUsage
23
+ module V1
24
+ # A service that is available for use by the consumer.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # The resource name of the consumer and service.
28
+ #
29
+ # A valid name would be:
30
+ # - projects/123/services/serviceusage.googleapis.com
31
+ # @!attribute [rw] parent
32
+ # @return [::String]
33
+ # The resource name of the consumer.
34
+ #
35
+ # A valid name would be:
36
+ # - projects/123
37
+ # @!attribute [rw] config
38
+ # @return [::Google::Cloud::ServiceUsage::V1::ServiceConfig]
39
+ # The service configuration of the available service.
40
+ # Some fields may be filtered out of the configuration in responses to
41
+ # the `ListServices` method. These fields are present only in responses to
42
+ # the `GetService` method.
43
+ # @!attribute [rw] state
44
+ # @return [::Google::Cloud::ServiceUsage::V1::State]
45
+ # Whether or not the service has been enabled for use by the consumer.
46
+ class Service
47
+ include ::Google::Protobuf::MessageExts
48
+ extend ::Google::Protobuf::MessageExts::ClassMethods
49
+ end
50
+
51
+ # The configuration of the service.
52
+ # @!attribute [rw] name
53
+ # @return [::String]
54
+ # The DNS address at which this service is available.
55
+ #
56
+ # An example DNS address would be:
57
+ # `calendar.googleapis.com`.
58
+ # @!attribute [rw] title
59
+ # @return [::String]
60
+ # The product title for this service.
61
+ # @!attribute [rw] apis
62
+ # @return [::Array<::Google::Protobuf::Api>]
63
+ # A list of API interfaces exported by this service. Contains only the names,
64
+ # versions, and method names of the interfaces.
65
+ # @!attribute [rw] documentation
66
+ # @return [::Google::Api::Documentation]
67
+ # Additional API documentation. Contains only the summary and the
68
+ # documentation URL.
69
+ # @!attribute [rw] quota
70
+ # @return [::Google::Api::Quota]
71
+ # Quota configuration.
72
+ # @!attribute [rw] authentication
73
+ # @return [::Google::Api::Authentication]
74
+ # Auth configuration. Contains only the OAuth rules.
75
+ # @!attribute [rw] usage
76
+ # @return [::Google::Api::Usage]
77
+ # Configuration controlling usage of this service.
78
+ # @!attribute [rw] endpoints
79
+ # @return [::Array<::Google::Api::Endpoint>]
80
+ # Configuration for network endpoints. Contains only the names and aliases
81
+ # of the endpoints.
82
+ # @!attribute [rw] monitored_resources
83
+ # @return [::Array<::Google::Api::MonitoredResourceDescriptor>]
84
+ # Defines the monitored resources used by this service. This is required
85
+ # by the [Service.monitoring][google.api.Service.monitoring] and [Service.logging][google.api.Service.logging] configurations.
86
+ # @!attribute [rw] monitoring
87
+ # @return [::Google::Api::Monitoring]
88
+ # Monitoring configuration.
89
+ # This should not include the 'producer_destinations' field.
90
+ class ServiceConfig
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
+ end
94
+
95
+ # The operation metadata returned for the batchend services operation.
96
+ # @!attribute [rw] resource_names
97
+ # @return [::Array<::String>]
98
+ # The full name of the resources that this operation is directly
99
+ # associated with.
100
+ class OperationMetadata
101
+ include ::Google::Protobuf::MessageExts
102
+ extend ::Google::Protobuf::MessageExts::ClassMethods
103
+ end
104
+
105
+ # Whether or not a service has been enabled for use by a consumer.
106
+ module State
107
+ # The default value, which indicates that the enabled state of the service
108
+ # is unspecified or not meaningful. Currently, all consumers other than
109
+ # projects (such as folders and organizations) are always in this state.
110
+ STATE_UNSPECIFIED = 0
111
+
112
+ # The service cannot be used by this consumer. It has either been explicitly
113
+ # disabled, or has never been enabled.
114
+ DISABLED = 1
115
+
116
+ # The service has been explicitly enabled for use by this consumer.
117
+ ENABLED = 2
118
+ end
119
+ end
120
+ end
121
+ end
122
+ end
@@ -0,0 +1,242 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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 ServiceUsage
23
+ module V1
24
+ # Request message for the `EnableService` method.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # Name of the consumer and service to enable the service on.
28
+ #
29
+ # The `EnableService` and `DisableService` methods currently only support
30
+ # projects.
31
+ #
32
+ # Enabling a service requires that the service is public or is shared with
33
+ # the user enabling the service.
34
+ #
35
+ # An example name would be:
36
+ # `projects/123/services/serviceusage.googleapis.com` where `123` is the
37
+ # project number.
38
+ class EnableServiceRequest
39
+ include ::Google::Protobuf::MessageExts
40
+ extend ::Google::Protobuf::MessageExts::ClassMethods
41
+ end
42
+
43
+ # Response message for the `EnableService` method.
44
+ # This response message is assigned to the `response` field of the returned
45
+ # Operation when that operation is done.
46
+ # @!attribute [rw] service
47
+ # @return [::Google::Cloud::ServiceUsage::V1::Service]
48
+ # The new state of the service after enabling.
49
+ class EnableServiceResponse
50
+ include ::Google::Protobuf::MessageExts
51
+ extend ::Google::Protobuf::MessageExts::ClassMethods
52
+ end
53
+
54
+ # Request message for the `DisableService` method.
55
+ # @!attribute [rw] name
56
+ # @return [::String]
57
+ # Name of the consumer and service to disable the service on.
58
+ #
59
+ # The enable and disable methods currently only support projects.
60
+ #
61
+ # An example name would be:
62
+ # `projects/123/services/serviceusage.googleapis.com` where `123` is the
63
+ # project number.
64
+ # @!attribute [rw] disable_dependent_services
65
+ # @return [::Boolean]
66
+ # Indicates if services that are enabled and which depend on this service
67
+ # should also be disabled. If not set, an error will be generated if any
68
+ # enabled services depend on the service to be disabled. When set, the
69
+ # service, and any enabled services that depend on it, will be disabled
70
+ # together.
71
+ # @!attribute [rw] check_if_service_has_usage
72
+ # @return [::Google::Cloud::ServiceUsage::V1::DisableServiceRequest::CheckIfServiceHasUsage]
73
+ # Defines the behavior for checking service usage when disabling a service.
74
+ class DisableServiceRequest
75
+ include ::Google::Protobuf::MessageExts
76
+ extend ::Google::Protobuf::MessageExts::ClassMethods
77
+
78
+ # Enum to determine if service usage should be checked when disabling a
79
+ # service.
80
+ module CheckIfServiceHasUsage
81
+ # When unset, the default behavior is used, which is SKIP.
82
+ CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED = 0
83
+
84
+ # If set, skip checking service usage when disabling a service.
85
+ SKIP = 1
86
+
87
+ # If set, service usage is checked when disabling the service. If a
88
+ # service, or its dependents, has usage in the last 30 days, the request
89
+ # returns a FAILED_PRECONDITION error.
90
+ CHECK = 2
91
+ end
92
+ end
93
+
94
+ # Response message for the `DisableService` method.
95
+ # This response message is assigned to the `response` field of the returned
96
+ # Operation when that operation is done.
97
+ # @!attribute [rw] service
98
+ # @return [::Google::Cloud::ServiceUsage::V1::Service]
99
+ # The new state of the service after disabling.
100
+ class DisableServiceResponse
101
+ include ::Google::Protobuf::MessageExts
102
+ extend ::Google::Protobuf::MessageExts::ClassMethods
103
+ end
104
+
105
+ # Request message for the `GetService` method.
106
+ # @!attribute [rw] name
107
+ # @return [::String]
108
+ # Name of the consumer and service to get the `ConsumerState` for.
109
+ #
110
+ # An example name would be:
111
+ # `projects/123/services/serviceusage.googleapis.com` where `123` is the
112
+ # project number.
113
+ class GetServiceRequest
114
+ include ::Google::Protobuf::MessageExts
115
+ extend ::Google::Protobuf::MessageExts::ClassMethods
116
+ end
117
+
118
+ # Request message for the `ListServices` method.
119
+ # @!attribute [rw] parent
120
+ # @return [::String]
121
+ # Parent to search for services on.
122
+ #
123
+ # An example name would be:
124
+ # `projects/123` where `123` is the project number.
125
+ # @!attribute [rw] page_size
126
+ # @return [::Integer]
127
+ # Requested size of the next page of data.
128
+ # Requested page size cannot exceed 200.
129
+ # If not set, the default page size is 50.
130
+ # @!attribute [rw] page_token
131
+ # @return [::String]
132
+ # Token identifying which result to start with, which is returned by a
133
+ # previous list call.
134
+ # @!attribute [rw] filter
135
+ # @return [::String]
136
+ # Only list services that conform to the given filter.
137
+ # The allowed filter strings are `state:ENABLED` and `state:DISABLED`.
138
+ class ListServicesRequest
139
+ include ::Google::Protobuf::MessageExts
140
+ extend ::Google::Protobuf::MessageExts::ClassMethods
141
+ end
142
+
143
+ # Response message for the `ListServices` method.
144
+ # @!attribute [rw] services
145
+ # @return [::Array<::Google::Cloud::ServiceUsage::V1::Service>]
146
+ # The available services for the requested project.
147
+ # @!attribute [rw] next_page_token
148
+ # @return [::String]
149
+ # Token that can be passed to `ListServices` to resume a paginated
150
+ # query.
151
+ class ListServicesResponse
152
+ include ::Google::Protobuf::MessageExts
153
+ extend ::Google::Protobuf::MessageExts::ClassMethods
154
+ end
155
+
156
+ # Request message for the `BatchEnableServices` method.
157
+ # @!attribute [rw] parent
158
+ # @return [::String]
159
+ # Parent to enable services on.
160
+ #
161
+ # An example name would be:
162
+ # `projects/123` where `123` is the project number.
163
+ #
164
+ # The `BatchEnableServices` method currently only supports projects.
165
+ # @!attribute [rw] service_ids
166
+ # @return [::Array<::String>]
167
+ # The identifiers of the services to enable on the project.
168
+ #
169
+ # A valid identifier would be:
170
+ # serviceusage.googleapis.com
171
+ #
172
+ # Enabling services requires that each service is public or is shared with
173
+ # the user enabling the service.
174
+ #
175
+ # A single request can enable a maximum of 20 services at a time. If more
176
+ # than 20 services are specified, the request will fail, and no state changes
177
+ # will occur.
178
+ class BatchEnableServicesRequest
179
+ include ::Google::Protobuf::MessageExts
180
+ extend ::Google::Protobuf::MessageExts::ClassMethods
181
+ end
182
+
183
+ # Response message for the `BatchEnableServices` method.
184
+ # This response message is assigned to the `response` field of the returned
185
+ # Operation when that operation is done.
186
+ # @!attribute [rw] services
187
+ # @return [::Array<::Google::Cloud::ServiceUsage::V1::Service>]
188
+ # The new state of the services after enabling.
189
+ # @!attribute [rw] failures
190
+ # @return [::Array<::Google::Cloud::ServiceUsage::V1::BatchEnableServicesResponse::EnableFailure>]
191
+ # If allow_partial_success is true, and one or more services could not be
192
+ # enabled, this field contains the details about each failure.
193
+ class BatchEnableServicesResponse
194
+ include ::Google::Protobuf::MessageExts
195
+ extend ::Google::Protobuf::MessageExts::ClassMethods
196
+
197
+ # Provides error messages for the failing services.
198
+ # @!attribute [rw] service_id
199
+ # @return [::String]
200
+ # The service id of a service that could not be enabled.
201
+ # @!attribute [rw] error_message
202
+ # @return [::String]
203
+ # An error message describing why the service could not be enabled.
204
+ class EnableFailure
205
+ include ::Google::Protobuf::MessageExts
206
+ extend ::Google::Protobuf::MessageExts::ClassMethods
207
+ end
208
+ end
209
+
210
+ # Request message for the `BatchGetServices` method.
211
+ # @!attribute [rw] parent
212
+ # @return [::String]
213
+ # Parent to retrieve services from.
214
+ # If this is set, the parent of all of the services specified in `names` must
215
+ # match this field. An example name would be: `projects/123` where `123` is
216
+ # the project number. The `BatchGetServices` method currently only supports
217
+ # projects.
218
+ # @!attribute [rw] names
219
+ # @return [::Array<::String>]
220
+ # Names of the services to retrieve.
221
+ #
222
+ # An example name would be:
223
+ # `projects/123/services/serviceusage.googleapis.com` where `123` is the
224
+ # project number.
225
+ # A single request can get a maximum of 30 services at a time.
226
+ class BatchGetServicesRequest
227
+ include ::Google::Protobuf::MessageExts
228
+ extend ::Google::Protobuf::MessageExts::ClassMethods
229
+ end
230
+
231
+ # Response message for the `BatchGetServices` method.
232
+ # @!attribute [rw] services
233
+ # @return [::Array<::Google::Cloud::ServiceUsage::V1::Service>]
234
+ # The requested Service states.
235
+ class BatchGetServicesResponse
236
+ include ::Google::Protobuf::MessageExts
237
+ extend ::Google::Protobuf::MessageExts::ClassMethods
238
+ end
239
+ end
240
+ end
241
+ end
242
+ end