google-api-client 0.19.7 → 0.19.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -0
  3. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  4. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  5. data/generated/google/apis/androidmanagement_v1/classes.rb +54 -8
  6. data/generated/google/apis/androidmanagement_v1/representations.rb +6 -0
  7. data/generated/google/apis/androidpublisher_v1_1.rb +1 -1
  8. data/generated/google/apis/androidpublisher_v1_1/classes.rb +2 -1
  9. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  10. data/generated/google/apis/androidpublisher_v2/classes.rb +8 -7
  11. data/generated/google/apis/androidpublisher_v2/service.rb +1 -1
  12. data/generated/google/apis/appengine_v1.rb +1 -1
  13. data/generated/google/apis/appengine_v1/classes.rb +18 -16
  14. data/generated/google/apis/appengine_v1/service.rb +5 -5
  15. data/generated/google/apis/appengine_v1alpha.rb +1 -1
  16. data/generated/google/apis/appengine_v1alpha/classes.rb +2 -2
  17. data/generated/google/apis/appengine_v1beta.rb +1 -1
  18. data/generated/google/apis/appengine_v1beta/classes.rb +25 -16
  19. data/generated/google/apis/appengine_v1beta/representations.rb +1 -0
  20. data/generated/google/apis/appengine_v1beta/service.rb +5 -5
  21. data/generated/google/apis/appengine_v1beta4.rb +1 -1
  22. data/generated/google/apis/appengine_v1beta4/classes.rb +2 -2
  23. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  24. data/generated/google/apis/appengine_v1beta5/classes.rb +2 -2
  25. data/generated/google/apis/bigquery_v2.rb +1 -1
  26. data/generated/google/apis/bigquery_v2/classes.rb +42 -5
  27. data/generated/google/apis/bigquery_v2/representations.rb +18 -2
  28. data/generated/google/apis/cloudiot_v1.rb +1 -1
  29. data/generated/google/apis/cloudiot_v1/classes.rb +128 -59
  30. data/generated/google/apis/cloudiot_v1/representations.rb +31 -18
  31. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  32. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +4 -3
  33. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  34. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +4 -4
  35. data/generated/google/apis/compute_alpha.rb +1 -1
  36. data/generated/google/apis/compute_alpha/classes.rb +40 -14
  37. data/generated/google/apis/compute_alpha/representations.rb +5 -1
  38. data/generated/google/apis/compute_alpha/service.rb +131 -0
  39. data/generated/google/apis/compute_beta.rb +1 -1
  40. data/generated/google/apis/compute_beta/classes.rb +67 -10
  41. data/generated/google/apis/compute_beta/representations.rb +17 -0
  42. data/generated/google/apis/compute_beta/service.rb +52 -0
  43. data/generated/google/apis/compute_v1.rb +1 -1
  44. data/generated/google/apis/compute_v1/classes.rb +6 -5
  45. data/generated/google/apis/container_v1beta1.rb +1 -1
  46. data/generated/google/apis/container_v1beta1/classes.rb +44 -0
  47. data/generated/google/apis/container_v1beta1/representations.rb +17 -0
  48. data/generated/google/apis/container_v1beta1/service.rb +2 -2
  49. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  50. data/generated/google/apis/dataproc_v1beta2/service.rb +3 -1
  51. data/generated/google/apis/deploymentmanager_alpha.rb +1 -1
  52. data/generated/google/apis/deploymentmanager_alpha/service.rb +4 -1
  53. data/generated/google/apis/deploymentmanager_v2beta.rb +1 -1
  54. data/generated/google/apis/deploymentmanager_v2beta/classes.rb +102 -0
  55. data/generated/google/apis/deploymentmanager_v2beta/representations.rb +49 -0
  56. data/generated/google/apis/deploymentmanager_v2beta/service.rb +4 -1
  57. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  58. data/generated/google/apis/dialogflow_v2beta1/classes.rb +0 -10
  59. data/generated/google/apis/dlp_v2beta2.rb +1 -1
  60. data/generated/google/apis/dlp_v2beta2/classes.rb +583 -0
  61. data/generated/google/apis/dlp_v2beta2/representations.rb +258 -0
  62. data/generated/google/apis/dlp_v2beta2/service.rb +181 -0
  63. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  64. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +6 -0
  65. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +1 -0
  66. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +2 -2
  67. data/generated/google/apis/drive_v2.rb +1 -1
  68. data/generated/google/apis/logging_v2.rb +1 -1
  69. data/generated/google/apis/logging_v2/classes.rb +5 -3
  70. data/generated/google/apis/logging_v2beta1.rb +1 -1
  71. data/generated/google/apis/logging_v2beta1/classes.rb +5 -3
  72. data/generated/google/apis/manufacturers_v1.rb +1 -1
  73. data/generated/google/apis/manufacturers_v1/service.rb +13 -13
  74. data/generated/google/apis/ml_v1.rb +1 -1
  75. data/generated/google/apis/ml_v1/classes.rb +0 -142
  76. data/generated/google/apis/ml_v1/representations.rb +0 -26
  77. data/generated/google/apis/ml_v1/service.rb +3 -63
  78. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  79. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +3 -3
  80. data/generated/google/apis/runtimeconfig_v1beta1/service.rb +18 -17
  81. data/generated/google/apis/safebrowsing_v4.rb +1 -1
  82. data/generated/google/apis/safebrowsing_v4/classes.rb +2 -1
  83. data/generated/google/apis/serviceusage_v1.rb +42 -0
  84. data/generated/google/apis/serviceusage_v1/classes.rb +3862 -0
  85. data/generated/google/apis/serviceusage_v1/representations.rb +1186 -0
  86. data/generated/google/apis/serviceusage_v1/service.rb +406 -0
  87. data/generated/google/apis/slides_v1.rb +1 -1
  88. data/generated/google/apis/slides_v1/classes.rb +13 -0
  89. data/generated/google/apis/slides_v1/representations.rb +3 -0
  90. data/generated/google/apis/spanner_v1.rb +1 -1
  91. data/generated/google/apis/spanner_v1/classes.rb +3 -3
  92. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  93. data/lib/google/apis/version.rb +1 -1
  94. metadata +6 -2
@@ -226,12 +226,6 @@ module Google
226
226
  include Google::Apis::Core::JsonObjectSupport
227
227
  end
228
228
 
229
- class GoogleTypeExpr
230
- class Representation < Google::Apis::Core::JsonRepresentation; end
231
-
232
- include Google::Apis::Core::JsonObjectSupport
233
- end
234
-
235
229
  class GoogleApiHttpBody
236
230
  # @private
237
231
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -311,9 +305,7 @@ module Google
311
305
  property :create_time, as: 'createTime'
312
306
  property :end_time, as: 'endTime'
313
307
  property :error_message, as: 'errorMessage'
314
- property :etag, :base64 => true, as: 'etag'
315
308
  property :job_id, as: 'jobId'
316
- hash :labels, as: 'labels'
317
309
  property :prediction_input, as: 'predictionInput', class: Google::Apis::MlV1::GoogleCloudMlV1PredictionInput, decorator: Google::Apis::MlV1::GoogleCloudMlV1PredictionInput::Representation
318
310
 
319
311
  property :prediction_output, as: 'predictionOutput', class: Google::Apis::MlV1::GoogleCloudMlV1PredictionOutput, decorator: Google::Apis::MlV1::GoogleCloudMlV1PredictionOutput::Representation
@@ -385,8 +377,6 @@ module Google
385
377
  property :default_version, as: 'defaultVersion', class: Google::Apis::MlV1::GoogleCloudMlV1Version, decorator: Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
386
378
 
387
379
  property :description, as: 'description'
388
- property :etag, :base64 => true, as: 'etag'
389
- hash :labels, as: 'labels'
390
380
  property :name, as: 'name'
391
381
  property :online_prediction_logging, as: 'onlinePredictionLogging'
392
382
  collection :regions, as: 'regions'
@@ -399,7 +389,6 @@ module Google
399
389
  property :create_time, as: 'createTime'
400
390
  property :end_time, as: 'endTime'
401
391
  property :is_cancellation_requested, as: 'isCancellationRequested'
402
- hash :labels, as: 'labels'
403
392
  property :model_name, as: 'modelName'
404
393
  property :operation_type, as: 'operationType'
405
394
  property :project_number, :numeric_string => true, as: 'projectNumber'
@@ -504,9 +493,7 @@ module Google
504
493
  property :deployment_uri, as: 'deploymentUri'
505
494
  property :description, as: 'description'
506
495
  property :error_message, as: 'errorMessage'
507
- property :etag, :base64 => true, as: 'etag'
508
496
  property :is_default, as: 'isDefault'
509
- hash :labels, as: 'labels'
510
497
  property :last_use_time, as: 'lastUseTime'
511
498
  property :manual_scaling, as: 'manualScaling', class: Google::Apis::MlV1::GoogleCloudMlV1ManualScaling, decorator: Google::Apis::MlV1::GoogleCloudMlV1ManualScaling::Representation
512
499
 
@@ -519,8 +506,6 @@ module Google
519
506
  class GoogleIamV1Binding
520
507
  # @private
521
508
  class Representation < Google::Apis::Core::JsonRepresentation
522
- property :condition, as: 'condition', class: Google::Apis::MlV1::GoogleTypeExpr, decorator: Google::Apis::MlV1::GoogleTypeExpr::Representation
523
-
524
509
  collection :members, as: 'members'
525
510
  property :role, as: 'role'
526
511
  end
@@ -541,7 +526,6 @@ module Google
541
526
  class Representation < Google::Apis::Core::JsonRepresentation
542
527
  property :policy, as: 'policy', class: Google::Apis::MlV1::GoogleIamV1Policy, decorator: Google::Apis::MlV1::GoogleIamV1Policy::Representation
543
528
 
544
- property :update_mask, as: 'updateMask'
545
529
  end
546
530
  end
547
531
 
@@ -594,16 +578,6 @@ module Google
594
578
  property :message, as: 'message'
595
579
  end
596
580
  end
597
-
598
- class GoogleTypeExpr
599
- # @private
600
- class Representation < Google::Apis::Core::JsonRepresentation
601
- property :description, as: 'description'
602
- property :expression, as: 'expression'
603
- property :location, as: 'location'
604
- property :title, as: 'title'
605
- end
606
- end
607
581
  end
608
582
  end
609
583
  end
@@ -300,59 +300,6 @@ module Google
300
300
  execute_or_queue_command(command, &block)
301
301
  end
302
302
 
303
- # Updates a specific job resource.
304
- # Currently the only supported fields to update are `labels`.
305
- # @param [String] name
306
- # Required. The job name.
307
- # @param [Google::Apis::MlV1::GoogleCloudMlV1Job] google_cloud_ml_v1__job_object
308
- # @param [String] update_mask
309
- # Required. Specifies the path, relative to `Job`, of the field to update.
310
- # To adopt etag mechanism, include `etag` field in the mask, and include the
311
- # `etag` value in your job resource.
312
- # For example, to change the labels of a job, the `update_mask` parameter
313
- # would be specified as `labels`, `etag`, and the
314
- # `PATCH` request body would specify the new value, as follows:
315
- # `
316
- # "labels": `
317
- # "owner": "Google",
318
- # "color": "Blue"
319
- # `
320
- # "etag": "33a64df551425fcc55e4d42a148795d9f25f89d4"
321
- # `
322
- # If `etag` matches the one on the server, the labels of the job will be
323
- # replaced with the given ones, and the server end `etag` will be
324
- # recalculated.
325
- # Currently the only supported update masks are `labels` and `etag`.
326
- # @param [String] fields
327
- # Selector specifying which fields to include in a partial response.
328
- # @param [String] quota_user
329
- # Available to use for quota purposes for server-side applications. Can be any
330
- # arbitrary string assigned to a user, but should not exceed 40 characters.
331
- # @param [Google::Apis::RequestOptions] options
332
- # Request-specific options
333
- #
334
- # @yield [result, err] Result & error if block supplied
335
- # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Job] parsed result object
336
- # @yieldparam err [StandardError] error object if request failed
337
- #
338
- # @return [Google::Apis::MlV1::GoogleCloudMlV1Job]
339
- #
340
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
341
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
342
- # @raise [Google::Apis::AuthorizationError] Authorization is required
343
- def patch_project_job(name, google_cloud_ml_v1__job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
344
- command = make_simple_command(:patch, 'v1/{+name}', options)
345
- command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
346
- command.request_object = google_cloud_ml_v1__job_object
347
- command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
348
- command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job
349
- command.params['name'] = name unless name.nil?
350
- command.query['updateMask'] = update_mask unless update_mask.nil?
351
- command.query['fields'] = fields unless fields.nil?
352
- command.query['quotaUser'] = quota_user unless quota_user.nil?
353
- execute_or_queue_command(command, &block)
354
- end
355
-
356
303
  # Sets the access control policy on the specified resource. Replaces any
357
304
  # existing policy.
358
305
  # @param [String] resource
@@ -702,11 +649,8 @@ module Google
702
649
  # "name":"version_1"
703
650
  # `
704
651
  # `
705
- # In this example, the model is blindly overwritten since no etag is given.
706
- # To adopt etag mechanism, include `etag` field in the mask, and include the
707
- # `etag` value in your model resource.
708
- # Currently the supported update masks are `description`,
709
- # `default_version.name`, `labels`, and `etag`.
652
+ # Currently the supported update masks are `description` and
653
+ # `default_version.name`.
710
654
  # @param [String] fields
711
655
  # Selector specifying which fields to include in a partial response.
712
656
  # @param [String] quota_user
@@ -986,11 +930,7 @@ module Google
986
930
  # `
987
931
  # "description": "foo"
988
932
  # `
989
- # In this example, the version is blindly overwritten since no etag is given.
990
- # To adopt etag mechanism, include `etag` field in the mask, and include the
991
- # `etag` value in your version resource.
992
- # Currently the only supported update masks are `description`, `labels`, and
993
- # `etag`, and `expire_time`.
933
+ # Currently the only supported update mask is`description`.
994
934
  # @param [String] fields
995
935
  # Selector specifying which fields to include in a partial response.
996
936
  # @param [String] quota_user
@@ -28,7 +28,7 @@ module Google
28
28
  # @see https://cloud.google.com/deployment-manager/runtime-configurator/
29
29
  module RuntimeconfigV1beta1
30
30
  VERSION = 'V1beta1'
31
- REVISION = '20180108'
31
+ REVISION = '20180212'
32
32
 
33
33
  # View and manage your data across Google Cloud Platform services
34
34
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -634,7 +634,7 @@ module Google
634
634
  # @return [String]
635
635
  attr_accessor :text
636
636
 
637
- # [Output Only] The time of the last variable update.
637
+ # Output only. The time of the last variable update.
638
638
  # Corresponds to the JSON property `updateTime`
639
639
  # @return [String]
640
640
  attr_accessor :update_time
@@ -676,14 +676,14 @@ module Google
676
676
  class Waiter
677
677
  include Google::Apis::Core::Hashable
678
678
 
679
- # [Output Only] The instant at which this Waiter resource was created. Adding
679
+ # Output only. The instant at which this Waiter resource was created. Adding
680
680
  # the value of `timeout` to this instant yields the timeout deadline for the
681
681
  # waiter.
682
682
  # Corresponds to the JSON property `createTime`
683
683
  # @return [String]
684
684
  attr_accessor :create_time
685
685
 
686
- # [Output Only] If the value is `false`, it means the waiter is still waiting
686
+ # Output only. If the value is `false`, it means the waiter is still waiting
687
687
  # for one of its conditions to be met.
688
688
  # If true, the waiter has finished. If the waiter finished due to a timeout
689
689
  # or failure, `error` will be set.
@@ -53,8 +53,8 @@ module Google
53
53
  # Creates a new RuntimeConfig resource. The configuration name must be
54
54
  # unique within project.
55
55
  # @param [String] parent
56
- # The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&
57
- # ref_topic=6158848)
56
+ # The [project
57
+ # ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)
58
58
  # for this request, in the format `projects/[PROJECT_ID]`.
59
59
  # @param [Google::Apis::RuntimeconfigV1beta1::RuntimeConfig] runtime_config_object
60
60
  # @param [String] request_id
@@ -193,8 +193,8 @@ module Google
193
193
 
194
194
  # Lists all the RuntimeConfig resources within project.
195
195
  # @param [String] parent
196
- # The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&
197
- # ref_topic=6158848)
196
+ # The [project
197
+ # ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848)
198
198
  # for this request, in the format `projects/[PROJECT_ID]`.
199
199
  # @param [Fixnum] page_size
200
200
  # Specifies the number of results to return per page. If there are fewer
@@ -414,8 +414,8 @@ module Google
414
414
  # a variable with a name that is a prefix of an existing variable name, or a
415
415
  # name that has an existing variable name as a prefix.
416
416
  # To learn more about creating a variable, read the
417
- # [Setting and Getting Data](/deployment-manager/runtime-configurator/set-and-
418
- # get-variables)
417
+ # [Setting and Getting
418
+ # Data](/deployment-manager/runtime-configurator/set-and-get-variables)
419
419
  # documentation.
420
420
  # @param [String] parent
421
421
  # The path to the RutimeConfig resource that this variable should belong to.
@@ -531,13 +531,14 @@ module Google
531
531
  execute_or_queue_command(command, &block)
532
532
  end
533
533
 
534
- # Lists variables within given a configuration, matching any provided filters.
535
- # This only lists variable names, not the values, unless `return_values` is
536
- # true, in which case only variables that user has IAM permission to GetVariable
537
- # will be returned.
534
+ # Lists variables within given a configuration, matching any provided
535
+ # filters. This only lists variable names, not the values, unless
536
+ # `return_values` is true, in which case only variables that user has IAM
537
+ # permission to GetVariable will be returned.
538
538
  # @param [String] parent
539
- # The path to the RuntimeConfig resource for which you want to list variables.
540
- # The configuration must exist beforehand; the path must be in the format:
539
+ # The path to the RuntimeConfig resource for which you want to list
540
+ # variables. The configuration must exist beforehand; the path must be in the
541
+ # format:
541
542
  # `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`
542
543
  # @param [String] filter
543
544
  # Filters variables by matching the specified filter. For example:
@@ -660,12 +661,12 @@ module Google
660
661
  # When there is a change, this method returns the new value or times out.
661
662
  # If a variable is deleted while being watched, the `variableState` state is
662
663
  # set to `DELETED` and the method returns the last known variable `value`.
663
- # If you set the deadline for watching to a larger value than internal timeout
664
- # (60 seconds), the current variable value is returned and the `variableState`
665
- # will be `VARIABLE_STATE_UNSPECIFIED`.
664
+ # If you set the deadline for watching to a larger value than internal
665
+ # timeout (60 seconds), the current variable value is returned and the
666
+ # `variableState` will be `VARIABLE_STATE_UNSPECIFIED`.
666
667
  # To learn more about creating a watcher, read the
667
- # [Watching a Variable for Changes](/deployment-manager/runtime-configurator/
668
- # watching-a-variable)
668
+ # [Watching a Variable for
669
+ # Changes](/deployment-manager/runtime-configurator/watching-a-variable)
669
670
  # documentation.
670
671
  # @param [String] name
671
672
  # The name of the variable to watch, in the format:
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://developers.google.com/safe-browsing/
27
27
  module SafebrowsingV4
28
28
  VERSION = 'V4'
29
- REVISION = '20180130'
29
+ REVISION = '20180215'
30
30
  end
31
31
  end
32
32
  end
@@ -538,7 +538,8 @@ module Google
538
538
  attr_accessor :encoded_data
539
539
 
540
540
  # The offset of the first entry in the encoded data, or, if only a single
541
- # integer was encoded, that single integer's value.
541
+ # integer was encoded, that single integer's value. If the field is empty or
542
+ # missing, assume zero.
542
543
  # Corresponds to the JSON property `firstValue`
543
544
  # @return [Fixnum]
544
545
  attr_accessor :first_value
@@ -0,0 +1,42 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/serviceusage_v1/service.rb'
16
+ require 'google/apis/serviceusage_v1/classes.rb'
17
+ require 'google/apis/serviceusage_v1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Service Usage API
22
+ #
23
+ # Enables services that service consumers want to use on Google Cloud Platform,
24
+ # lists the available or enabled services, or disables services that service
25
+ # consumers no longer use.
26
+ #
27
+ # @see https://cloud.google.com/service-usage/
28
+ module ServiceusageV1
29
+ VERSION = 'V1'
30
+ REVISION = '20180210'
31
+
32
+ # View and manage your data across Google Cloud Platform services
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+
35
+ # View your data across Google Cloud Platform services
36
+ AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
37
+
38
+ # Manage your Google API service configuration
39
+ AUTH_SERVICE_MANAGEMENT = 'https://www.googleapis.com/auth/service.management'
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,3862 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module ServiceusageV1
24
+
25
+ # Api is a light-weight descriptor for an API Interface.
26
+ # Interfaces are also described as "protocol buffer services" in some contexts,
27
+ # such as by the "service" keyword in a .proto file, but they are different
28
+ # from API Services, which represent a concrete implementation of an interface
29
+ # as opposed to simply a description of methods and bindings. They are also
30
+ # sometimes simply referred to as "APIs" in other contexts, such as the name of
31
+ # this message itself. See https://cloud.google.com/apis/design/glossary for
32
+ # detailed terminology.
33
+ class Api
34
+ include Google::Apis::Core::Hashable
35
+
36
+ # The methods of this interface, in unspecified order.
37
+ # Corresponds to the JSON property `methods`
38
+ # @return [Array<Google::Apis::ServiceusageV1::MethodProp>]
39
+ attr_accessor :methods_prop
40
+
41
+ # Included interfaces. See Mixin.
42
+ # Corresponds to the JSON property `mixins`
43
+ # @return [Array<Google::Apis::ServiceusageV1::Mixin>]
44
+ attr_accessor :mixins
45
+
46
+ # The fully qualified name of this interface, including package name
47
+ # followed by the interface's simple name.
48
+ # Corresponds to the JSON property `name`
49
+ # @return [String]
50
+ attr_accessor :name
51
+
52
+ # Any metadata attached to the interface.
53
+ # Corresponds to the JSON property `options`
54
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
55
+ attr_accessor :options
56
+
57
+ # `SourceContext` represents information about the source of a
58
+ # protobuf element, like the file in which it is defined.
59
+ # Corresponds to the JSON property `sourceContext`
60
+ # @return [Google::Apis::ServiceusageV1::SourceContext]
61
+ attr_accessor :source_context
62
+
63
+ # The source syntax of the service.
64
+ # Corresponds to the JSON property `syntax`
65
+ # @return [String]
66
+ attr_accessor :syntax
67
+
68
+ # A version string for this interface. If specified, must have the form
69
+ # `major-version.minor-version`, as in `1.10`. If the minor version is
70
+ # omitted, it defaults to zero. If the entire version field is empty, the
71
+ # major version is derived from the package name, as outlined below. If the
72
+ # field is not empty, the version in the package name will be verified to be
73
+ # consistent with what is provided here.
74
+ # The versioning schema uses [semantic
75
+ # versioning](http://semver.org) where the major version number
76
+ # indicates a breaking change and the minor version an additive,
77
+ # non-breaking change. Both version numbers are signals to users
78
+ # what to expect from different versions, and should be carefully
79
+ # chosen based on the product plan.
80
+ # The major version is also reflected in the package name of the
81
+ # interface, which must end in `v<major-version>`, as in
82
+ # `google.feature.v1`. For major versions 0 and 1, the suffix can
83
+ # be omitted. Zero major versions must only be used for
84
+ # experimental, non-GA interfaces.
85
+ # Corresponds to the JSON property `version`
86
+ # @return [String]
87
+ attr_accessor :version
88
+
89
+ def initialize(**args)
90
+ update!(**args)
91
+ end
92
+
93
+ # Update properties of this object
94
+ def update!(**args)
95
+ @methods_prop = args[:methods_prop] if args.key?(:methods_prop)
96
+ @mixins = args[:mixins] if args.key?(:mixins)
97
+ @name = args[:name] if args.key?(:name)
98
+ @options = args[:options] if args.key?(:options)
99
+ @source_context = args[:source_context] if args.key?(:source_context)
100
+ @syntax = args[:syntax] if args.key?(:syntax)
101
+ @version = args[:version] if args.key?(:version)
102
+ end
103
+ end
104
+
105
+ # Configuration for an anthentication provider, including support for
106
+ # [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
107
+ # token-32).
108
+ class AuthProvider
109
+ include Google::Apis::Core::Hashable
110
+
111
+ # The list of JWT
112
+ # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#
113
+ # section-4.1.3).
114
+ # that are allowed to access. A JWT containing any of these audiences will
115
+ # be accepted. When this setting is absent, only JWTs with audience
116
+ # "https://Service_name/API_name"
117
+ # will be accepted. For example, if no audiences are in the setting,
118
+ # LibraryService API will only accept JWTs with the following audience
119
+ # "https://library-example.googleapis.com/google.example.library.v1.
120
+ # LibraryService".
121
+ # Example:
122
+ # audiences: bookstore_android.apps.googleusercontent.com,
123
+ # bookstore_web.apps.googleusercontent.com
124
+ # Corresponds to the JSON property `audiences`
125
+ # @return [String]
126
+ attr_accessor :audiences
127
+
128
+ # Redirect URL if JWT token is required but no present or is expired.
129
+ # Implement authorizationUrl of securityDefinitions in OpenAPI spec.
130
+ # Corresponds to the JSON property `authorizationUrl`
131
+ # @return [String]
132
+ attr_accessor :authorization_url
133
+
134
+ # The unique identifier of the auth provider. It will be referred to by
135
+ # `AuthRequirement.provider_id`.
136
+ # Example: "bookstore_auth".
137
+ # Corresponds to the JSON property `id`
138
+ # @return [String]
139
+ attr_accessor :id
140
+
141
+ # Identifies the principal that issued the JWT. See
142
+ # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
143
+ # Usually a URL or an email address.
144
+ # Example: https://securetoken.google.com
145
+ # Example: 1234567-compute@developer.gserviceaccount.com
146
+ # Corresponds to the JSON property `issuer`
147
+ # @return [String]
148
+ attr_accessor :issuer
149
+
150
+ # URL of the provider's public key set to validate signature of the JWT. See
151
+ # [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#
152
+ # ProviderMetadata).
153
+ # Optional if the key set document:
154
+ # - can be retrieved from
155
+ # [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.
156
+ # html
157
+ # of the issuer.
158
+ # - can be inferred from the email domain of the issuer (e.g. a Google service
159
+ # account).
160
+ # Example: https://www.googleapis.com/oauth2/v1/certs
161
+ # Corresponds to the JSON property `jwksUri`
162
+ # @return [String]
163
+ attr_accessor :jwks_uri
164
+
165
+ def initialize(**args)
166
+ update!(**args)
167
+ end
168
+
169
+ # Update properties of this object
170
+ def update!(**args)
171
+ @audiences = args[:audiences] if args.key?(:audiences)
172
+ @authorization_url = args[:authorization_url] if args.key?(:authorization_url)
173
+ @id = args[:id] if args.key?(:id)
174
+ @issuer = args[:issuer] if args.key?(:issuer)
175
+ @jwks_uri = args[:jwks_uri] if args.key?(:jwks_uri)
176
+ end
177
+ end
178
+
179
+ # User-defined authentication requirements, including support for
180
+ # [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
181
+ # token-32).
182
+ class AuthRequirement
183
+ include Google::Apis::Core::Hashable
184
+
185
+ # NOTE: This will be deprecated soon, once AuthProvider.audiences is
186
+ # implemented and accepted in all the runtime components.
187
+ # The list of JWT
188
+ # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#
189
+ # section-4.1.3).
190
+ # that are allowed to access. A JWT containing any of these audiences will
191
+ # be accepted. When this setting is absent, only JWTs with audience
192
+ # "https://Service_name/API_name"
193
+ # will be accepted. For example, if no audiences are in the setting,
194
+ # LibraryService API will only accept JWTs with the following audience
195
+ # "https://library-example.googleapis.com/google.example.library.v1.
196
+ # LibraryService".
197
+ # Example:
198
+ # audiences: bookstore_android.apps.googleusercontent.com,
199
+ # bookstore_web.apps.googleusercontent.com
200
+ # Corresponds to the JSON property `audiences`
201
+ # @return [String]
202
+ attr_accessor :audiences
203
+
204
+ # id from authentication provider.
205
+ # Example:
206
+ # provider_id: bookstore_auth
207
+ # Corresponds to the JSON property `providerId`
208
+ # @return [String]
209
+ attr_accessor :provider_id
210
+
211
+ def initialize(**args)
212
+ update!(**args)
213
+ end
214
+
215
+ # Update properties of this object
216
+ def update!(**args)
217
+ @audiences = args[:audiences] if args.key?(:audiences)
218
+ @provider_id = args[:provider_id] if args.key?(:provider_id)
219
+ end
220
+ end
221
+
222
+ # `Authentication` defines the authentication configuration for an API.
223
+ # Example for an API targeted for external use:
224
+ # name: calendar.googleapis.com
225
+ # authentication:
226
+ # providers:
227
+ # - id: google_calendar_auth
228
+ # jwks_uri: https://www.googleapis.com/oauth2/v1/certs
229
+ # issuer: https://securetoken.google.com
230
+ # rules:
231
+ # - selector: "*"
232
+ # requirements:
233
+ # provider_id: google_calendar_auth
234
+ class Authentication
235
+ include Google::Apis::Core::Hashable
236
+
237
+ # Defines a set of authentication providers that a service supports.
238
+ # Corresponds to the JSON property `providers`
239
+ # @return [Array<Google::Apis::ServiceusageV1::AuthProvider>]
240
+ attr_accessor :providers
241
+
242
+ # A list of authentication rules that apply to individual API methods.
243
+ # **NOTE:** All service configuration rules follow "last one wins" order.
244
+ # Corresponds to the JSON property `rules`
245
+ # @return [Array<Google::Apis::ServiceusageV1::AuthenticationRule>]
246
+ attr_accessor :rules
247
+
248
+ def initialize(**args)
249
+ update!(**args)
250
+ end
251
+
252
+ # Update properties of this object
253
+ def update!(**args)
254
+ @providers = args[:providers] if args.key?(:providers)
255
+ @rules = args[:rules] if args.key?(:rules)
256
+ end
257
+ end
258
+
259
+ # Authentication rules for the service.
260
+ # By default, if a method has any authentication requirements, every request
261
+ # must include a valid credential matching one of the requirements.
262
+ # It's an error to include more than one kind of credential in a single
263
+ # request.
264
+ # If a method doesn't have any auth requirements, request credentials will be
265
+ # ignored.
266
+ class AuthenticationRule
267
+ include Google::Apis::Core::Hashable
268
+
269
+ # Whether to allow requests without a credential. The credential can be
270
+ # an OAuth token, Google cookies (first-party auth) or EndUserCreds.
271
+ # For requests without credentials, if the service control environment is
272
+ # specified, each incoming request **must** be associated with a service
273
+ # consumer. This can be done by passing an API key that belongs to a consumer
274
+ # project.
275
+ # Corresponds to the JSON property `allowWithoutCredential`
276
+ # @return [Boolean]
277
+ attr_accessor :allow_without_credential
278
+ alias_method :allow_without_credential?, :allow_without_credential
279
+
280
+ # Configuration for a custom authentication provider.
281
+ # Corresponds to the JSON property `customAuth`
282
+ # @return [Google::Apis::ServiceusageV1::CustomAuthRequirements]
283
+ attr_accessor :custom_auth
284
+
285
+ # OAuth scopes are a way to define data and permissions on data. For example,
286
+ # there are scopes defined for "Read-only access to Google Calendar" and
287
+ # "Access to Cloud Platform". Users can consent to a scope for an application,
288
+ # giving it permission to access that data on their behalf.
289
+ # OAuth scope specifications should be fairly coarse grained; a user will need
290
+ # to see and understand the text description of what your scope means.
291
+ # In most cases: use one or at most two OAuth scopes for an entire family of
292
+ # products. If your product has multiple APIs, you should probably be sharing
293
+ # the OAuth scope across all of those APIs.
294
+ # When you need finer grained OAuth consent screens: talk with your product
295
+ # management about how developers will use them in practice.
296
+ # Please note that even though each of the canonical scopes is enough for a
297
+ # request to be accepted and passed to the backend, a request can still fail
298
+ # due to the backend requiring additional scopes or permissions.
299
+ # Corresponds to the JSON property `oauth`
300
+ # @return [Google::Apis::ServiceusageV1::OAuthRequirements]
301
+ attr_accessor :oauth
302
+
303
+ # Requirements for additional authentication providers.
304
+ # Corresponds to the JSON property `requirements`
305
+ # @return [Array<Google::Apis::ServiceusageV1::AuthRequirement>]
306
+ attr_accessor :requirements
307
+
308
+ # Selects the methods to which this rule applies.
309
+ # Refer to selector for syntax details.
310
+ # Corresponds to the JSON property `selector`
311
+ # @return [String]
312
+ attr_accessor :selector
313
+
314
+ def initialize(**args)
315
+ update!(**args)
316
+ end
317
+
318
+ # Update properties of this object
319
+ def update!(**args)
320
+ @allow_without_credential = args[:allow_without_credential] if args.key?(:allow_without_credential)
321
+ @custom_auth = args[:custom_auth] if args.key?(:custom_auth)
322
+ @oauth = args[:oauth] if args.key?(:oauth)
323
+ @requirements = args[:requirements] if args.key?(:requirements)
324
+ @selector = args[:selector] if args.key?(:selector)
325
+ end
326
+ end
327
+
328
+ # Configuration of authorization.
329
+ # This section determines the authorization provider, if unspecified, then no
330
+ # authorization check will be done.
331
+ # Example:
332
+ # experimental:
333
+ # authorization:
334
+ # provider: firebaserules.googleapis.com
335
+ class AuthorizationConfig
336
+ include Google::Apis::Core::Hashable
337
+
338
+ # The name of the authorization provider, such as
339
+ # firebaserules.googleapis.com.
340
+ # Corresponds to the JSON property `provider`
341
+ # @return [String]
342
+ attr_accessor :provider
343
+
344
+ def initialize(**args)
345
+ update!(**args)
346
+ end
347
+
348
+ # Update properties of this object
349
+ def update!(**args)
350
+ @provider = args[:provider] if args.key?(:provider)
351
+ end
352
+ end
353
+
354
+ # Authorization rule for API services.
355
+ # It specifies the permission(s) required for an API element for the overall
356
+ # API request to succeed. It is typically used to mark request message fields
357
+ # that contain the name of the resource and indicates the permissions that
358
+ # will be checked on that resource.
359
+ # For example:
360
+ # package google.storage.v1;
361
+ # message CopyObjectRequest `
362
+ # string source = 1 [
363
+ # (google.api.authz).permissions = "storage.objects.get"];
364
+ # string destination = 2 [
365
+ # (google.api.authz).permissions =
366
+ # "storage.objects.create,storage.objects.update"];
367
+ # `
368
+ class AuthorizationRule
369
+ include Google::Apis::Core::Hashable
370
+
371
+ # The required permissions. The acceptable values vary depend on the
372
+ # authorization system used. For Google APIs, it should be a comma-separated
373
+ # Google IAM permission values. When multiple permissions are listed, the
374
+ # semantics is not defined by the system. Additional documentation must
375
+ # be provided manually.
376
+ # Corresponds to the JSON property `permissions`
377
+ # @return [String]
378
+ attr_accessor :permissions
379
+
380
+ # Selects the API elements to which this rule applies.
381
+ # Refer to selector for syntax details.
382
+ # Corresponds to the JSON property `selector`
383
+ # @return [String]
384
+ attr_accessor :selector
385
+
386
+ def initialize(**args)
387
+ update!(**args)
388
+ end
389
+
390
+ # Update properties of this object
391
+ def update!(**args)
392
+ @permissions = args[:permissions] if args.key?(:permissions)
393
+ @selector = args[:selector] if args.key?(:selector)
394
+ end
395
+ end
396
+
397
+ # `Backend` defines the backend configuration for a service.
398
+ class Backend
399
+ include Google::Apis::Core::Hashable
400
+
401
+ # A list of API backend rules that apply to individual API methods.
402
+ # **NOTE:** All service configuration rules follow "last one wins" order.
403
+ # Corresponds to the JSON property `rules`
404
+ # @return [Array<Google::Apis::ServiceusageV1::BackendRule>]
405
+ attr_accessor :rules
406
+
407
+ def initialize(**args)
408
+ update!(**args)
409
+ end
410
+
411
+ # Update properties of this object
412
+ def update!(**args)
413
+ @rules = args[:rules] if args.key?(:rules)
414
+ end
415
+ end
416
+
417
+ # A backend rule provides configuration for an individual API element.
418
+ class BackendRule
419
+ include Google::Apis::Core::Hashable
420
+
421
+ # The address of the API backend.
422
+ # Corresponds to the JSON property `address`
423
+ # @return [String]
424
+ attr_accessor :address
425
+
426
+ # The number of seconds to wait for a response from a request. The default
427
+ # deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.
428
+ # Corresponds to the JSON property `deadline`
429
+ # @return [Float]
430
+ attr_accessor :deadline
431
+
432
+ # Minimum deadline in seconds needed for this method. Calls having deadline
433
+ # value lower than this will be rejected.
434
+ # Corresponds to the JSON property `minDeadline`
435
+ # @return [Float]
436
+ attr_accessor :min_deadline
437
+
438
+ # Selects the methods to which this rule applies.
439
+ # Refer to selector for syntax details.
440
+ # Corresponds to the JSON property `selector`
441
+ # @return [String]
442
+ attr_accessor :selector
443
+
444
+ def initialize(**args)
445
+ update!(**args)
446
+ end
447
+
448
+ # Update properties of this object
449
+ def update!(**args)
450
+ @address = args[:address] if args.key?(:address)
451
+ @deadline = args[:deadline] if args.key?(:deadline)
452
+ @min_deadline = args[:min_deadline] if args.key?(:min_deadline)
453
+ @selector = args[:selector] if args.key?(:selector)
454
+ end
455
+ end
456
+
457
+ # Billing related configuration of the service.
458
+ # The following example shows how to configure monitored resources and metrics
459
+ # for billing:
460
+ # monitored_resources:
461
+ # - type: library.googleapis.com/branch
462
+ # labels:
463
+ # - key: /city
464
+ # description: The city where the library branch is located in.
465
+ # - key: /name
466
+ # description: The name of the branch.
467
+ # metrics:
468
+ # - name: library.googleapis.com/book/borrowed_count
469
+ # metric_kind: DELTA
470
+ # value_type: INT64
471
+ # billing:
472
+ # consumer_destinations:
473
+ # - monitored_resource: library.googleapis.com/branch
474
+ # metrics:
475
+ # - library.googleapis.com/book/borrowed_count
476
+ class Billing
477
+ include Google::Apis::Core::Hashable
478
+
479
+ # Billing configurations for sending metrics to the consumer project.
480
+ # There can be multiple consumer destinations per service, each one must have
481
+ # a different monitored resource type. A metric can be used in at most
482
+ # one consumer destination.
483
+ # Corresponds to the JSON property `consumerDestinations`
484
+ # @return [Array<Google::Apis::ServiceusageV1::BillingDestination>]
485
+ attr_accessor :consumer_destinations
486
+
487
+ def initialize(**args)
488
+ update!(**args)
489
+ end
490
+
491
+ # Update properties of this object
492
+ def update!(**args)
493
+ @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations)
494
+ end
495
+ end
496
+
497
+ # Configuration of a specific billing destination (Currently only support
498
+ # bill against consumer project).
499
+ class BillingDestination
500
+ include Google::Apis::Core::Hashable
501
+
502
+ # Names of the metrics to report to this billing destination.
503
+ # Each name must be defined in Service.metrics section.
504
+ # Corresponds to the JSON property `metrics`
505
+ # @return [Array<String>]
506
+ attr_accessor :metrics
507
+
508
+ # The monitored resource type. The type must be defined in
509
+ # Service.monitored_resources section.
510
+ # Corresponds to the JSON property `monitoredResource`
511
+ # @return [String]
512
+ attr_accessor :monitored_resource
513
+
514
+ def initialize(**args)
515
+ update!(**args)
516
+ end
517
+
518
+ # Update properties of this object
519
+ def update!(**args)
520
+ @metrics = args[:metrics] if args.key?(:metrics)
521
+ @monitored_resource = args[:monitored_resource] if args.key?(:monitored_resource)
522
+ end
523
+ end
524
+
525
+ # The request message for Operations.CancelOperation.
526
+ class CancelOperationRequest
527
+ include Google::Apis::Core::Hashable
528
+
529
+ def initialize(**args)
530
+ update!(**args)
531
+ end
532
+
533
+ # Update properties of this object
534
+ def update!(**args)
535
+ end
536
+ end
537
+
538
+ # `Context` defines which contexts an API requests.
539
+ # Example:
540
+ # context:
541
+ # rules:
542
+ # - selector: "*"
543
+ # requested:
544
+ # - google.rpc.context.ProjectContext
545
+ # - google.rpc.context.OriginContext
546
+ # The above specifies that all methods in the API request
547
+ # `google.rpc.context.ProjectContext` and
548
+ # `google.rpc.context.OriginContext`.
549
+ # Available context types are defined in package
550
+ # `google.rpc.context`.
551
+ # This also provides mechanism to whitelist any protobuf message extension that
552
+ # can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and
553
+ # “x-goog-ext-<extension_id>-jspb” format. For example, list any service
554
+ # specific protobuf types that can appear in grpc metadata as follows in your
555
+ # yaml file:
556
+ # Example:
557
+ # context:
558
+ # rules:
559
+ # - selector: "google.example.library.v1.LibraryService.CreateBook"
560
+ # allowed_request_extensions:
561
+ # - google.foo.v1.NewExtension
562
+ # allowed_response_extensions:
563
+ # - google.foo.v1.NewExtension
564
+ # You can also specify extension ID instead of fully qualified extension name
565
+ # here.
566
+ class Context
567
+ include Google::Apis::Core::Hashable
568
+
569
+ # A list of RPC context rules that apply to individual API methods.
570
+ # **NOTE:** All service configuration rules follow "last one wins" order.
571
+ # Corresponds to the JSON property `rules`
572
+ # @return [Array<Google::Apis::ServiceusageV1::ContextRule>]
573
+ attr_accessor :rules
574
+
575
+ def initialize(**args)
576
+ update!(**args)
577
+ end
578
+
579
+ # Update properties of this object
580
+ def update!(**args)
581
+ @rules = args[:rules] if args.key?(:rules)
582
+ end
583
+ end
584
+
585
+ # A context rule provides information about the context for an individual API
586
+ # element.
587
+ class ContextRule
588
+ include Google::Apis::Core::Hashable
589
+
590
+ # A list of full type names or extension IDs of extensions allowed in grpc
591
+ # side channel from client to backend.
592
+ # Corresponds to the JSON property `allowedRequestExtensions`
593
+ # @return [Array<String>]
594
+ attr_accessor :allowed_request_extensions
595
+
596
+ # A list of full type names or extension IDs of extensions allowed in grpc
597
+ # side channel from backend to client.
598
+ # Corresponds to the JSON property `allowedResponseExtensions`
599
+ # @return [Array<String>]
600
+ attr_accessor :allowed_response_extensions
601
+
602
+ # A list of full type names of provided contexts.
603
+ # Corresponds to the JSON property `provided`
604
+ # @return [Array<String>]
605
+ attr_accessor :provided
606
+
607
+ # A list of full type names of requested contexts.
608
+ # Corresponds to the JSON property `requested`
609
+ # @return [Array<String>]
610
+ attr_accessor :requested
611
+
612
+ # Selects the methods to which this rule applies.
613
+ # Refer to selector for syntax details.
614
+ # Corresponds to the JSON property `selector`
615
+ # @return [String]
616
+ attr_accessor :selector
617
+
618
+ def initialize(**args)
619
+ update!(**args)
620
+ end
621
+
622
+ # Update properties of this object
623
+ def update!(**args)
624
+ @allowed_request_extensions = args[:allowed_request_extensions] if args.key?(:allowed_request_extensions)
625
+ @allowed_response_extensions = args[:allowed_response_extensions] if args.key?(:allowed_response_extensions)
626
+ @provided = args[:provided] if args.key?(:provided)
627
+ @requested = args[:requested] if args.key?(:requested)
628
+ @selector = args[:selector] if args.key?(:selector)
629
+ end
630
+ end
631
+
632
+ # Selects and configures the service controller used by the service. The
633
+ # service controller handles features like abuse, quota, billing, logging,
634
+ # monitoring, etc.
635
+ class Control
636
+ include Google::Apis::Core::Hashable
637
+
638
+ # The service control environment to use. If empty, no control plane
639
+ # feature (like quota and billing) will be enabled.
640
+ # Corresponds to the JSON property `environment`
641
+ # @return [String]
642
+ attr_accessor :environment
643
+
644
+ def initialize(**args)
645
+ update!(**args)
646
+ end
647
+
648
+ # Update properties of this object
649
+ def update!(**args)
650
+ @environment = args[:environment] if args.key?(:environment)
651
+ end
652
+ end
653
+
654
+ # Configuration for a custom authentication provider.
655
+ class CustomAuthRequirements
656
+ include Google::Apis::Core::Hashable
657
+
658
+ # A configuration string containing connection information for the
659
+ # authentication provider, typically formatted as a SmartService string
660
+ # (go/smartservice).
661
+ # Corresponds to the JSON property `provider`
662
+ # @return [String]
663
+ attr_accessor :provider
664
+
665
+ def initialize(**args)
666
+ update!(**args)
667
+ end
668
+
669
+ # Update properties of this object
670
+ def update!(**args)
671
+ @provider = args[:provider] if args.key?(:provider)
672
+ end
673
+ end
674
+
675
+ # Customize service error responses. For example, list any service
676
+ # specific protobuf types that can appear in error detail lists of
677
+ # error responses.
678
+ # Example:
679
+ # custom_error:
680
+ # types:
681
+ # - google.foo.v1.CustomError
682
+ # - google.foo.v1.AnotherError
683
+ class CustomError
684
+ include Google::Apis::Core::Hashable
685
+
686
+ # The list of custom error rules that apply to individual API messages.
687
+ # **NOTE:** All service configuration rules follow "last one wins" order.
688
+ # Corresponds to the JSON property `rules`
689
+ # @return [Array<Google::Apis::ServiceusageV1::CustomErrorRule>]
690
+ attr_accessor :rules
691
+
692
+ # The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
693
+ # Corresponds to the JSON property `types`
694
+ # @return [Array<String>]
695
+ attr_accessor :types
696
+
697
+ def initialize(**args)
698
+ update!(**args)
699
+ end
700
+
701
+ # Update properties of this object
702
+ def update!(**args)
703
+ @rules = args[:rules] if args.key?(:rules)
704
+ @types = args[:types] if args.key?(:types)
705
+ end
706
+ end
707
+
708
+ # A custom error rule.
709
+ class CustomErrorRule
710
+ include Google::Apis::Core::Hashable
711
+
712
+ # Mark this message as possible payload in error response. Otherwise,
713
+ # objects of this type will be filtered when they appear in error payload.
714
+ # Corresponds to the JSON property `isErrorType`
715
+ # @return [Boolean]
716
+ attr_accessor :is_error_type
717
+ alias_method :is_error_type?, :is_error_type
718
+
719
+ # Selects messages to which this rule applies.
720
+ # Refer to selector for syntax details.
721
+ # Corresponds to the JSON property `selector`
722
+ # @return [String]
723
+ attr_accessor :selector
724
+
725
+ def initialize(**args)
726
+ update!(**args)
727
+ end
728
+
729
+ # Update properties of this object
730
+ def update!(**args)
731
+ @is_error_type = args[:is_error_type] if args.key?(:is_error_type)
732
+ @selector = args[:selector] if args.key?(:selector)
733
+ end
734
+ end
735
+
736
+ # A custom pattern is used for defining custom HTTP verb.
737
+ class CustomHttpPattern
738
+ include Google::Apis::Core::Hashable
739
+
740
+ # The name of this custom HTTP verb.
741
+ # Corresponds to the JSON property `kind`
742
+ # @return [String]
743
+ attr_accessor :kind
744
+
745
+ # The path matched by this custom verb.
746
+ # Corresponds to the JSON property `path`
747
+ # @return [String]
748
+ attr_accessor :path
749
+
750
+ def initialize(**args)
751
+ update!(**args)
752
+ end
753
+
754
+ # Update properties of this object
755
+ def update!(**args)
756
+ @kind = args[:kind] if args.key?(:kind)
757
+ @path = args[:path] if args.key?(:path)
758
+ end
759
+ end
760
+
761
+ # Request message for DisableService.
762
+ class DisableServiceRequest
763
+ include Google::Apis::Core::Hashable
764
+
765
+ def initialize(**args)
766
+ update!(**args)
767
+ end
768
+
769
+ # Update properties of this object
770
+ def update!(**args)
771
+ end
772
+ end
773
+
774
+ # `Documentation` provides the information for describing a service.
775
+ # Example:
776
+ # <pre><code>documentation:
777
+ # summary: >
778
+ # The Google Calendar API gives access
779
+ # to most calendar features.
780
+ # pages:
781
+ # - name: Overview
782
+ # content: &#40;== include google/foo/overview.md ==&#41;
783
+ # - name: Tutorial
784
+ # content: &#40;== include google/foo/tutorial.md ==&#41;
785
+ # subpages;
786
+ # - name: Java
787
+ # content: &#40;== include google/foo/tutorial_java.md ==&#41;
788
+ # rules:
789
+ # - selector: google.calendar.Calendar.Get
790
+ # description: >
791
+ # ...
792
+ # - selector: google.calendar.Calendar.Put
793
+ # description: >
794
+ # ...
795
+ # </code></pre>
796
+ # Documentation is provided in markdown syntax. In addition to
797
+ # standard markdown features, definition lists, tables and fenced
798
+ # code blocks are supported. Section headers can be provided and are
799
+ # interpreted relative to the section nesting of the context where
800
+ # a documentation fragment is embedded.
801
+ # Documentation from the IDL is merged with documentation defined
802
+ # via the config at normalization time, where documentation provided
803
+ # by config rules overrides IDL provided.
804
+ # A number of constructs specific to the API platform are supported
805
+ # in documentation text.
806
+ # In order to reference a proto element, the following
807
+ # notation can be used:
808
+ # <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
809
+ # To override the display text used for the link, this can be used:
810
+ # <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>
811
+ # Text can be excluded from doc using the following notation:
812
+ # <pre><code>&#40;-- internal comment --&#41;</code></pre>
813
+ # Comments can be made conditional using a visibility label. The below
814
+ # text will be only rendered if the `BETA` label is available:
815
+ # <pre><code>&#40;--BETA: comment for BETA users --&#41;</code></pre>
816
+ # A few directives are available in documentation. Note that
817
+ # directives must appear on a single line to be properly
818
+ # identified. The `include` directive includes a markdown file from
819
+ # an external source:
820
+ # <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
821
+ # The `resource_for` directive marks a message to be the resource of
822
+ # a collection in REST view. If it is not specified, tools attempt
823
+ # to infer the resource from the operations in a collection:
824
+ # <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre>
825
+ # The directive `suppress_warning` does not directly affect documentation
826
+ # and is documented together with service config validation.
827
+ class Documentation
828
+ include Google::Apis::Core::Hashable
829
+
830
+ # The URL to the root of documentation.
831
+ # Corresponds to the JSON property `documentationRootUrl`
832
+ # @return [String]
833
+ attr_accessor :documentation_root_url
834
+
835
+ # Declares a single overview page. For example:
836
+ # <pre><code>documentation:
837
+ # summary: ...
838
+ # overview: &#40;== include overview.md ==&#41;
839
+ # </code></pre>
840
+ # This is a shortcut for the following declaration (using pages style):
841
+ # <pre><code>documentation:
842
+ # summary: ...
843
+ # pages:
844
+ # - name: Overview
845
+ # content: &#40;== include overview.md ==&#41;
846
+ # </code></pre>
847
+ # Note: you cannot specify both `overview` field and `pages` field.
848
+ # Corresponds to the JSON property `overview`
849
+ # @return [String]
850
+ attr_accessor :overview
851
+
852
+ # The top level pages for the documentation set.
853
+ # Corresponds to the JSON property `pages`
854
+ # @return [Array<Google::Apis::ServiceusageV1::Page>]
855
+ attr_accessor :pages
856
+
857
+ # A list of documentation rules that apply to individual API elements.
858
+ # **NOTE:** All service configuration rules follow "last one wins" order.
859
+ # Corresponds to the JSON property `rules`
860
+ # @return [Array<Google::Apis::ServiceusageV1::DocumentationRule>]
861
+ attr_accessor :rules
862
+
863
+ # A short summary of what the service does. Can only be provided by
864
+ # plain text.
865
+ # Corresponds to the JSON property `summary`
866
+ # @return [String]
867
+ attr_accessor :summary
868
+
869
+ def initialize(**args)
870
+ update!(**args)
871
+ end
872
+
873
+ # Update properties of this object
874
+ def update!(**args)
875
+ @documentation_root_url = args[:documentation_root_url] if args.key?(:documentation_root_url)
876
+ @overview = args[:overview] if args.key?(:overview)
877
+ @pages = args[:pages] if args.key?(:pages)
878
+ @rules = args[:rules] if args.key?(:rules)
879
+ @summary = args[:summary] if args.key?(:summary)
880
+ end
881
+ end
882
+
883
+ # A documentation rule provides information about individual API elements.
884
+ class DocumentationRule
885
+ include Google::Apis::Core::Hashable
886
+
887
+ # Deprecation description of the selected element(s). It can be provided if an
888
+ # element is marked as `deprecated`.
889
+ # Corresponds to the JSON property `deprecationDescription`
890
+ # @return [String]
891
+ attr_accessor :deprecation_description
892
+
893
+ # Description of the selected API(s).
894
+ # Corresponds to the JSON property `description`
895
+ # @return [String]
896
+ attr_accessor :description
897
+
898
+ # The selector is a comma-separated list of patterns. Each pattern is a
899
+ # qualified name of the element which may end in "*", indicating a wildcard.
900
+ # Wildcards are only allowed at the end and for a whole component of the
901
+ # qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
902
+ # specify a default for all applicable elements, the whole pattern "*"
903
+ # is used.
904
+ # Corresponds to the JSON property `selector`
905
+ # @return [String]
906
+ attr_accessor :selector
907
+
908
+ def initialize(**args)
909
+ update!(**args)
910
+ end
911
+
912
+ # Update properties of this object
913
+ def update!(**args)
914
+ @deprecation_description = args[:deprecation_description] if args.key?(:deprecation_description)
915
+ @description = args[:description] if args.key?(:description)
916
+ @selector = args[:selector] if args.key?(:selector)
917
+ end
918
+ end
919
+
920
+ # A generic empty message that you can re-use to avoid defining duplicated
921
+ # empty messages in your APIs. A typical example is to use it as the request
922
+ # or the response type of an API method. For instance:
923
+ # service Foo `
924
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
925
+ # `
926
+ # The JSON representation for `Empty` is empty JSON object ````.
927
+ class Empty
928
+ include Google::Apis::Core::Hashable
929
+
930
+ def initialize(**args)
931
+ update!(**args)
932
+ end
933
+
934
+ # Update properties of this object
935
+ def update!(**args)
936
+ end
937
+ end
938
+
939
+ # Request message for EnableService.
940
+ class EnableServiceRequest
941
+ include Google::Apis::Core::Hashable
942
+
943
+ def initialize(**args)
944
+ update!(**args)
945
+ end
946
+
947
+ # Update properties of this object
948
+ def update!(**args)
949
+ end
950
+ end
951
+
952
+ # The EnabledState reflects whether the service has been explicitly enabled or
953
+ # not.
954
+ class EnabledState
955
+ include Google::Apis::Core::Hashable
956
+
957
+ # Whether or not the service has been explicitly enabled.
958
+ # Corresponds to the JSON property `state`
959
+ # @return [String]
960
+ attr_accessor :state
961
+
962
+ def initialize(**args)
963
+ update!(**args)
964
+ end
965
+
966
+ # Update properties of this object
967
+ def update!(**args)
968
+ @state = args[:state] if args.key?(:state)
969
+ end
970
+ end
971
+
972
+ # `Endpoint` describes a network endpoint that serves a set of APIs.
973
+ # A service may expose any number of endpoints, and all endpoints share the
974
+ # same service configuration, such as quota configuration and monitoring
975
+ # configuration.
976
+ # Example service configuration:
977
+ # name: library-example.googleapis.com
978
+ # endpoints:
979
+ # # Below entry makes 'google.example.library.v1.Library'
980
+ # # API be served from endpoint address library-example.googleapis.com.
981
+ # # It also allows HTTP OPTIONS calls to be passed to the backend, for
982
+ # # it to decide whether the subsequent cross-origin request is
983
+ # # allowed to proceed.
984
+ # - name: library-example.googleapis.com
985
+ # allow_cors: true
986
+ class Endpoint
987
+ include Google::Apis::Core::Hashable
988
+
989
+ # DEPRECATED: This field is no longer supported. Instead of using aliases,
990
+ # please specify multiple google.api.Endpoint for each of the intended
991
+ # aliases.
992
+ # Additional names that this endpoint will be hosted on.
993
+ # Corresponds to the JSON property `aliases`
994
+ # @return [Array<String>]
995
+ attr_accessor :aliases
996
+
997
+ # Allowing
998
+ # [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
999
+ # cross-domain traffic, would allow the backends served from this endpoint to
1000
+ # receive and respond to HTTP OPTIONS requests. The response will be used by
1001
+ # the browser to determine whether the subsequent cross-origin request is
1002
+ # allowed to proceed.
1003
+ # Corresponds to the JSON property `allowCors`
1004
+ # @return [Boolean]
1005
+ attr_accessor :allow_cors
1006
+ alias_method :allow_cors?, :allow_cors
1007
+
1008
+ # The list of features enabled on this endpoint.
1009
+ # Corresponds to the JSON property `features`
1010
+ # @return [Array<String>]
1011
+ attr_accessor :features
1012
+
1013
+ # The canonical name of this endpoint.
1014
+ # Corresponds to the JSON property `name`
1015
+ # @return [String]
1016
+ attr_accessor :name
1017
+
1018
+ # The specification of an Internet routable address of API frontend that will
1019
+ # handle requests to this [API Endpoint](https://cloud.google.com/apis/design/
1020
+ # glossary).
1021
+ # It should be either a valid IPv4 address or a fully-qualified domain name.
1022
+ # For example, "8.8.8.8" or "myservice.appspot.com".
1023
+ # Corresponds to the JSON property `target`
1024
+ # @return [String]
1025
+ attr_accessor :target
1026
+
1027
+ def initialize(**args)
1028
+ update!(**args)
1029
+ end
1030
+
1031
+ # Update properties of this object
1032
+ def update!(**args)
1033
+ @aliases = args[:aliases] if args.key?(:aliases)
1034
+ @allow_cors = args[:allow_cors] if args.key?(:allow_cors)
1035
+ @features = args[:features] if args.key?(:features)
1036
+ @name = args[:name] if args.key?(:name)
1037
+ @target = args[:target] if args.key?(:target)
1038
+ end
1039
+ end
1040
+
1041
+ # Enum type definition.
1042
+ class Enum
1043
+ include Google::Apis::Core::Hashable
1044
+
1045
+ # Enum value definitions.
1046
+ # Corresponds to the JSON property `enumvalue`
1047
+ # @return [Array<Google::Apis::ServiceusageV1::EnumValue>]
1048
+ attr_accessor :enumvalue
1049
+
1050
+ # Enum type name.
1051
+ # Corresponds to the JSON property `name`
1052
+ # @return [String]
1053
+ attr_accessor :name
1054
+
1055
+ # Protocol buffer options.
1056
+ # Corresponds to the JSON property `options`
1057
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
1058
+ attr_accessor :options
1059
+
1060
+ # `SourceContext` represents information about the source of a
1061
+ # protobuf element, like the file in which it is defined.
1062
+ # Corresponds to the JSON property `sourceContext`
1063
+ # @return [Google::Apis::ServiceusageV1::SourceContext]
1064
+ attr_accessor :source_context
1065
+
1066
+ # The source syntax.
1067
+ # Corresponds to the JSON property `syntax`
1068
+ # @return [String]
1069
+ attr_accessor :syntax
1070
+
1071
+ def initialize(**args)
1072
+ update!(**args)
1073
+ end
1074
+
1075
+ # Update properties of this object
1076
+ def update!(**args)
1077
+ @enumvalue = args[:enumvalue] if args.key?(:enumvalue)
1078
+ @name = args[:name] if args.key?(:name)
1079
+ @options = args[:options] if args.key?(:options)
1080
+ @source_context = args[:source_context] if args.key?(:source_context)
1081
+ @syntax = args[:syntax] if args.key?(:syntax)
1082
+ end
1083
+ end
1084
+
1085
+ # Enum value definition.
1086
+ class EnumValue
1087
+ include Google::Apis::Core::Hashable
1088
+
1089
+ # Enum value name.
1090
+ # Corresponds to the JSON property `name`
1091
+ # @return [String]
1092
+ attr_accessor :name
1093
+
1094
+ # Enum value number.
1095
+ # Corresponds to the JSON property `number`
1096
+ # @return [Fixnum]
1097
+ attr_accessor :number
1098
+
1099
+ # Protocol buffer options.
1100
+ # Corresponds to the JSON property `options`
1101
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
1102
+ attr_accessor :options
1103
+
1104
+ def initialize(**args)
1105
+ update!(**args)
1106
+ end
1107
+
1108
+ # Update properties of this object
1109
+ def update!(**args)
1110
+ @name = args[:name] if args.key?(:name)
1111
+ @number = args[:number] if args.key?(:number)
1112
+ @options = args[:options] if args.key?(:options)
1113
+ end
1114
+ end
1115
+
1116
+ # Experimental service configuration. These configuration options can
1117
+ # only be used by whitelisted users.
1118
+ class Experimental
1119
+ include Google::Apis::Core::Hashable
1120
+
1121
+ # Configuration of authorization.
1122
+ # This section determines the authorization provider, if unspecified, then no
1123
+ # authorization check will be done.
1124
+ # Example:
1125
+ # experimental:
1126
+ # authorization:
1127
+ # provider: firebaserules.googleapis.com
1128
+ # Corresponds to the JSON property `authorization`
1129
+ # @return [Google::Apis::ServiceusageV1::AuthorizationConfig]
1130
+ attr_accessor :authorization
1131
+
1132
+ def initialize(**args)
1133
+ update!(**args)
1134
+ end
1135
+
1136
+ # Update properties of this object
1137
+ def update!(**args)
1138
+ @authorization = args[:authorization] if args.key?(:authorization)
1139
+ end
1140
+ end
1141
+
1142
+ # A single field of a message type.
1143
+ class Field
1144
+ include Google::Apis::Core::Hashable
1145
+
1146
+ # The field cardinality.
1147
+ # Corresponds to the JSON property `cardinality`
1148
+ # @return [String]
1149
+ attr_accessor :cardinality
1150
+
1151
+ # The string value of the default value of this field. Proto2 syntax only.
1152
+ # Corresponds to the JSON property `defaultValue`
1153
+ # @return [String]
1154
+ attr_accessor :default_value
1155
+
1156
+ # The field JSON name.
1157
+ # Corresponds to the JSON property `jsonName`
1158
+ # @return [String]
1159
+ attr_accessor :json_name
1160
+
1161
+ # The field type.
1162
+ # Corresponds to the JSON property `kind`
1163
+ # @return [String]
1164
+ attr_accessor :kind
1165
+
1166
+ # The field name.
1167
+ # Corresponds to the JSON property `name`
1168
+ # @return [String]
1169
+ attr_accessor :name
1170
+
1171
+ # The field number.
1172
+ # Corresponds to the JSON property `number`
1173
+ # @return [Fixnum]
1174
+ attr_accessor :number
1175
+
1176
+ # The index of the field type in `Type.oneofs`, for message or enumeration
1177
+ # types. The first type has index 1; zero means the type is not in the list.
1178
+ # Corresponds to the JSON property `oneofIndex`
1179
+ # @return [Fixnum]
1180
+ attr_accessor :oneof_index
1181
+
1182
+ # The protocol buffer options.
1183
+ # Corresponds to the JSON property `options`
1184
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
1185
+ attr_accessor :options
1186
+
1187
+ # Whether to use alternative packed wire representation.
1188
+ # Corresponds to the JSON property `packed`
1189
+ # @return [Boolean]
1190
+ attr_accessor :packed
1191
+ alias_method :packed?, :packed
1192
+
1193
+ # The field type URL, without the scheme, for message or enumeration
1194
+ # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
1195
+ # Corresponds to the JSON property `typeUrl`
1196
+ # @return [String]
1197
+ attr_accessor :type_url
1198
+
1199
+ def initialize(**args)
1200
+ update!(**args)
1201
+ end
1202
+
1203
+ # Update properties of this object
1204
+ def update!(**args)
1205
+ @cardinality = args[:cardinality] if args.key?(:cardinality)
1206
+ @default_value = args[:default_value] if args.key?(:default_value)
1207
+ @json_name = args[:json_name] if args.key?(:json_name)
1208
+ @kind = args[:kind] if args.key?(:kind)
1209
+ @name = args[:name] if args.key?(:name)
1210
+ @number = args[:number] if args.key?(:number)
1211
+ @oneof_index = args[:oneof_index] if args.key?(:oneof_index)
1212
+ @options = args[:options] if args.key?(:options)
1213
+ @packed = args[:packed] if args.key?(:packed)
1214
+ @type_url = args[:type_url] if args.key?(:type_url)
1215
+ end
1216
+ end
1217
+
1218
+ # `Service` is the root object of Google service configuration schema. It
1219
+ # describes basic information about a service, such as the name and the
1220
+ # title, and delegates other aspects to sub-sections. Each sub-section is
1221
+ # either a proto message or a repeated proto message that configures a
1222
+ # specific aspect, such as auth. See each proto message definition for details.
1223
+ # Example:
1224
+ # type: google.api.Service
1225
+ # config_version: 3
1226
+ # name: calendar.googleapis.com
1227
+ # title: Google Calendar API
1228
+ # apis:
1229
+ # - name: google.calendar.v3.Calendar
1230
+ # authentication:
1231
+ # providers:
1232
+ # - id: google_calendar_auth
1233
+ # jwks_uri: https://www.googleapis.com/oauth2/v1/certs
1234
+ # issuer: https://securetoken.google.com
1235
+ # rules:
1236
+ # - selector: "*"
1237
+ # requirements:
1238
+ # provider_id: google_calendar_auth
1239
+ class GoogleApiService
1240
+ include Google::Apis::Core::Hashable
1241
+
1242
+ # A list of API interfaces exported by this service. Only the `name` field
1243
+ # of the google.protobuf.Api needs to be provided by the configuration
1244
+ # author, as the remaining fields will be derived from the IDL during the
1245
+ # normalization process. It is an error to specify an API interface here
1246
+ # which cannot be resolved against the associated IDL files.
1247
+ # Corresponds to the JSON property `apis`
1248
+ # @return [Array<Google::Apis::ServiceusageV1::Api>]
1249
+ attr_accessor :apis
1250
+
1251
+ # `Authentication` defines the authentication configuration for an API.
1252
+ # Example for an API targeted for external use:
1253
+ # name: calendar.googleapis.com
1254
+ # authentication:
1255
+ # providers:
1256
+ # - id: google_calendar_auth
1257
+ # jwks_uri: https://www.googleapis.com/oauth2/v1/certs
1258
+ # issuer: https://securetoken.google.com
1259
+ # rules:
1260
+ # - selector: "*"
1261
+ # requirements:
1262
+ # provider_id: google_calendar_auth
1263
+ # Corresponds to the JSON property `authentication`
1264
+ # @return [Google::Apis::ServiceusageV1::Authentication]
1265
+ attr_accessor :authentication
1266
+
1267
+ # `Backend` defines the backend configuration for a service.
1268
+ # Corresponds to the JSON property `backend`
1269
+ # @return [Google::Apis::ServiceusageV1::Backend]
1270
+ attr_accessor :backend
1271
+
1272
+ # Billing related configuration of the service.
1273
+ # The following example shows how to configure monitored resources and metrics
1274
+ # for billing:
1275
+ # monitored_resources:
1276
+ # - type: library.googleapis.com/branch
1277
+ # labels:
1278
+ # - key: /city
1279
+ # description: The city where the library branch is located in.
1280
+ # - key: /name
1281
+ # description: The name of the branch.
1282
+ # metrics:
1283
+ # - name: library.googleapis.com/book/borrowed_count
1284
+ # metric_kind: DELTA
1285
+ # value_type: INT64
1286
+ # billing:
1287
+ # consumer_destinations:
1288
+ # - monitored_resource: library.googleapis.com/branch
1289
+ # metrics:
1290
+ # - library.googleapis.com/book/borrowed_count
1291
+ # Corresponds to the JSON property `billing`
1292
+ # @return [Google::Apis::ServiceusageV1::Billing]
1293
+ attr_accessor :billing
1294
+
1295
+ # The semantic version of the service configuration. The config version
1296
+ # affects the interpretation of the service configuration. For example,
1297
+ # certain features are enabled by default for certain config versions.
1298
+ # The latest config version is `3`.
1299
+ # Corresponds to the JSON property `configVersion`
1300
+ # @return [Fixnum]
1301
+ attr_accessor :config_version
1302
+
1303
+ # `Context` defines which contexts an API requests.
1304
+ # Example:
1305
+ # context:
1306
+ # rules:
1307
+ # - selector: "*"
1308
+ # requested:
1309
+ # - google.rpc.context.ProjectContext
1310
+ # - google.rpc.context.OriginContext
1311
+ # The above specifies that all methods in the API request
1312
+ # `google.rpc.context.ProjectContext` and
1313
+ # `google.rpc.context.OriginContext`.
1314
+ # Available context types are defined in package
1315
+ # `google.rpc.context`.
1316
+ # This also provides mechanism to whitelist any protobuf message extension that
1317
+ # can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and
1318
+ # “x-goog-ext-<extension_id>-jspb” format. For example, list any service
1319
+ # specific protobuf types that can appear in grpc metadata as follows in your
1320
+ # yaml file:
1321
+ # Example:
1322
+ # context:
1323
+ # rules:
1324
+ # - selector: "google.example.library.v1.LibraryService.CreateBook"
1325
+ # allowed_request_extensions:
1326
+ # - google.foo.v1.NewExtension
1327
+ # allowed_response_extensions:
1328
+ # - google.foo.v1.NewExtension
1329
+ # You can also specify extension ID instead of fully qualified extension name
1330
+ # here.
1331
+ # Corresponds to the JSON property `context`
1332
+ # @return [Google::Apis::ServiceusageV1::Context]
1333
+ attr_accessor :context
1334
+
1335
+ # Selects and configures the service controller used by the service. The
1336
+ # service controller handles features like abuse, quota, billing, logging,
1337
+ # monitoring, etc.
1338
+ # Corresponds to the JSON property `control`
1339
+ # @return [Google::Apis::ServiceusageV1::Control]
1340
+ attr_accessor :control
1341
+
1342
+ # Customize service error responses. For example, list any service
1343
+ # specific protobuf types that can appear in error detail lists of
1344
+ # error responses.
1345
+ # Example:
1346
+ # custom_error:
1347
+ # types:
1348
+ # - google.foo.v1.CustomError
1349
+ # - google.foo.v1.AnotherError
1350
+ # Corresponds to the JSON property `customError`
1351
+ # @return [Google::Apis::ServiceusageV1::CustomError]
1352
+ attr_accessor :custom_error
1353
+
1354
+ # `Documentation` provides the information for describing a service.
1355
+ # Example:
1356
+ # <pre><code>documentation:
1357
+ # summary: >
1358
+ # The Google Calendar API gives access
1359
+ # to most calendar features.
1360
+ # pages:
1361
+ # - name: Overview
1362
+ # content: &#40;== include google/foo/overview.md ==&#41;
1363
+ # - name: Tutorial
1364
+ # content: &#40;== include google/foo/tutorial.md ==&#41;
1365
+ # subpages;
1366
+ # - name: Java
1367
+ # content: &#40;== include google/foo/tutorial_java.md ==&#41;
1368
+ # rules:
1369
+ # - selector: google.calendar.Calendar.Get
1370
+ # description: >
1371
+ # ...
1372
+ # - selector: google.calendar.Calendar.Put
1373
+ # description: >
1374
+ # ...
1375
+ # </code></pre>
1376
+ # Documentation is provided in markdown syntax. In addition to
1377
+ # standard markdown features, definition lists, tables and fenced
1378
+ # code blocks are supported. Section headers can be provided and are
1379
+ # interpreted relative to the section nesting of the context where
1380
+ # a documentation fragment is embedded.
1381
+ # Documentation from the IDL is merged with documentation defined
1382
+ # via the config at normalization time, where documentation provided
1383
+ # by config rules overrides IDL provided.
1384
+ # A number of constructs specific to the API platform are supported
1385
+ # in documentation text.
1386
+ # In order to reference a proto element, the following
1387
+ # notation can be used:
1388
+ # <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
1389
+ # To override the display text used for the link, this can be used:
1390
+ # <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>
1391
+ # Text can be excluded from doc using the following notation:
1392
+ # <pre><code>&#40;-- internal comment --&#41;</code></pre>
1393
+ # Comments can be made conditional using a visibility label. The below
1394
+ # text will be only rendered if the `BETA` label is available:
1395
+ # <pre><code>&#40;--BETA: comment for BETA users --&#41;</code></pre>
1396
+ # A few directives are available in documentation. Note that
1397
+ # directives must appear on a single line to be properly
1398
+ # identified. The `include` directive includes a markdown file from
1399
+ # an external source:
1400
+ # <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
1401
+ # The `resource_for` directive marks a message to be the resource of
1402
+ # a collection in REST view. If it is not specified, tools attempt
1403
+ # to infer the resource from the operations in a collection:
1404
+ # <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre>
1405
+ # The directive `suppress_warning` does not directly affect documentation
1406
+ # and is documented together with service config validation.
1407
+ # Corresponds to the JSON property `documentation`
1408
+ # @return [Google::Apis::ServiceusageV1::Documentation]
1409
+ attr_accessor :documentation
1410
+
1411
+ # Configuration for network endpoints. If this is empty, then an endpoint
1412
+ # with the same name as the service is automatically generated to service all
1413
+ # defined APIs.
1414
+ # Corresponds to the JSON property `endpoints`
1415
+ # @return [Array<Google::Apis::ServiceusageV1::Endpoint>]
1416
+ attr_accessor :endpoints
1417
+
1418
+ # A list of all enum types included in this API service. Enums
1419
+ # referenced directly or indirectly by the `apis` are automatically
1420
+ # included. Enums which are not referenced but shall be included
1421
+ # should be listed here by name. Example:
1422
+ # enums:
1423
+ # - name: google.someapi.v1.SomeEnum
1424
+ # Corresponds to the JSON property `enums`
1425
+ # @return [Array<Google::Apis::ServiceusageV1::Enum>]
1426
+ attr_accessor :enums
1427
+
1428
+ # Experimental service configuration. These configuration options can
1429
+ # only be used by whitelisted users.
1430
+ # Corresponds to the JSON property `experimental`
1431
+ # @return [Google::Apis::ServiceusageV1::Experimental]
1432
+ attr_accessor :experimental
1433
+
1434
+ # Defines the HTTP configuration for an API service. It contains a list of
1435
+ # HttpRule, each specifying the mapping of an RPC method
1436
+ # to one or more HTTP REST API methods.
1437
+ # Corresponds to the JSON property `http`
1438
+ # @return [Google::Apis::ServiceusageV1::Http]
1439
+ attr_accessor :http
1440
+
1441
+ # A unique ID for a specific instance of this message, typically assigned
1442
+ # by the client for tracking purpose. If empty, the server may choose to
1443
+ # generate one instead.
1444
+ # Corresponds to the JSON property `id`
1445
+ # @return [String]
1446
+ attr_accessor :id
1447
+
1448
+ # Logging configuration of the service.
1449
+ # The following example shows how to configure logs to be sent to the
1450
+ # producer and consumer projects. In the example, the `activity_history`
1451
+ # log is sent to both the producer and consumer projects, whereas the
1452
+ # `purchase_history` log is only sent to the producer project.
1453
+ # monitored_resources:
1454
+ # - type: library.googleapis.com/branch
1455
+ # labels:
1456
+ # - key: /city
1457
+ # description: The city where the library branch is located in.
1458
+ # - key: /name
1459
+ # description: The name of the branch.
1460
+ # logs:
1461
+ # - name: activity_history
1462
+ # labels:
1463
+ # - key: /customer_id
1464
+ # - name: purchase_history
1465
+ # logging:
1466
+ # producer_destinations:
1467
+ # - monitored_resource: library.googleapis.com/branch
1468
+ # logs:
1469
+ # - activity_history
1470
+ # - purchase_history
1471
+ # consumer_destinations:
1472
+ # - monitored_resource: library.googleapis.com/branch
1473
+ # logs:
1474
+ # - activity_history
1475
+ # Corresponds to the JSON property `logging`
1476
+ # @return [Google::Apis::ServiceusageV1::Logging]
1477
+ attr_accessor :logging
1478
+
1479
+ # Defines the logs used by this service.
1480
+ # Corresponds to the JSON property `logs`
1481
+ # @return [Array<Google::Apis::ServiceusageV1::LogDescriptor>]
1482
+ attr_accessor :logs
1483
+
1484
+ # Defines the metrics used by this service.
1485
+ # Corresponds to the JSON property `metrics`
1486
+ # @return [Array<Google::Apis::ServiceusageV1::MetricDescriptor>]
1487
+ attr_accessor :metrics
1488
+
1489
+ # Defines the monitored resources used by this service. This is required
1490
+ # by the Service.monitoring and Service.logging configurations.
1491
+ # Corresponds to the JSON property `monitoredResources`
1492
+ # @return [Array<Google::Apis::ServiceusageV1::MonitoredResourceDescriptor>]
1493
+ attr_accessor :monitored_resources
1494
+
1495
+ # Monitoring configuration of the service.
1496
+ # The example below shows how to configure monitored resources and metrics
1497
+ # for monitoring. In the example, a monitored resource and two metrics are
1498
+ # defined. The `library.googleapis.com/book/returned_count` metric is sent
1499
+ # to both producer and consumer projects, whereas the
1500
+ # `library.googleapis.com/book/overdue_count` metric is only sent to the
1501
+ # consumer project.
1502
+ # monitored_resources:
1503
+ # - type: library.googleapis.com/branch
1504
+ # labels:
1505
+ # - key: /city
1506
+ # description: The city where the library branch is located in.
1507
+ # - key: /name
1508
+ # description: The name of the branch.
1509
+ # metrics:
1510
+ # - name: library.googleapis.com/book/returned_count
1511
+ # metric_kind: DELTA
1512
+ # value_type: INT64
1513
+ # labels:
1514
+ # - key: /customer_id
1515
+ # - name: library.googleapis.com/book/overdue_count
1516
+ # metric_kind: GAUGE
1517
+ # value_type: INT64
1518
+ # labels:
1519
+ # - key: /customer_id
1520
+ # monitoring:
1521
+ # producer_destinations:
1522
+ # - monitored_resource: library.googleapis.com/branch
1523
+ # metrics:
1524
+ # - library.googleapis.com/book/returned_count
1525
+ # consumer_destinations:
1526
+ # - monitored_resource: library.googleapis.com/branch
1527
+ # metrics:
1528
+ # - library.googleapis.com/book/returned_count
1529
+ # - library.googleapis.com/book/overdue_count
1530
+ # Corresponds to the JSON property `monitoring`
1531
+ # @return [Google::Apis::ServiceusageV1::Monitoring]
1532
+ attr_accessor :monitoring
1533
+
1534
+ # The DNS address at which this service is available,
1535
+ # e.g. `calendar.googleapis.com`.
1536
+ # Corresponds to the JSON property `name`
1537
+ # @return [String]
1538
+ attr_accessor :name
1539
+
1540
+ # The Google project that owns this service.
1541
+ # Corresponds to the JSON property `producerProjectId`
1542
+ # @return [String]
1543
+ attr_accessor :producer_project_id
1544
+
1545
+ # Quota configuration helps to achieve fairness and budgeting in service
1546
+ # usage.
1547
+ # The quota configuration works this way:
1548
+ # - The service configuration defines a set of metrics.
1549
+ # - For API calls, the quota.metric_rules maps methods to metrics with
1550
+ # corresponding costs.
1551
+ # - The quota.limits defines limits on the metrics, which will be used for
1552
+ # quota checks at runtime.
1553
+ # An example quota configuration in yaml format:
1554
+ # quota:
1555
+ # - name: apiWriteQpsPerProject
1556
+ # metric: library.googleapis.com/write_calls
1557
+ # unit: "1/min/`project`" # rate limit for consumer projects
1558
+ # values:
1559
+ # STANDARD: 10000
1560
+ # # The metric rules bind all methods to the read_calls metric,
1561
+ # # except for the UpdateBook and DeleteBook methods. These two methods
1562
+ # # are mapped to the write_calls metric, with the UpdateBook method
1563
+ # # consuming at twice rate as the DeleteBook method.
1564
+ # metric_rules:
1565
+ # - selector: "*"
1566
+ # metric_costs:
1567
+ # library.googleapis.com/read_calls: 1
1568
+ # - selector: google.example.library.v1.LibraryService.UpdateBook
1569
+ # metric_costs:
1570
+ # library.googleapis.com/write_calls: 2
1571
+ # - selector: google.example.library.v1.LibraryService.DeleteBook
1572
+ # metric_costs:
1573
+ # library.googleapis.com/write_calls: 1
1574
+ # Corresponding Metric definition:
1575
+ # metrics:
1576
+ # - name: library.googleapis.com/read_calls
1577
+ # display_name: Read requests
1578
+ # metric_kind: DELTA
1579
+ # value_type: INT64
1580
+ # - name: library.googleapis.com/write_calls
1581
+ # display_name: Write requests
1582
+ # metric_kind: DELTA
1583
+ # value_type: INT64
1584
+ # Corresponds to the JSON property `quota`
1585
+ # @return [Google::Apis::ServiceusageV1::Quota]
1586
+ attr_accessor :quota
1587
+
1588
+ # Source information used to create a Service Config
1589
+ # Corresponds to the JSON property `sourceInfo`
1590
+ # @return [Google::Apis::ServiceusageV1::SourceInfo]
1591
+ attr_accessor :source_info
1592
+
1593
+ # ### System parameter configuration
1594
+ # A system parameter is a special kind of parameter defined by the API
1595
+ # system, not by an individual API. It is typically mapped to an HTTP header
1596
+ # and/or a URL query parameter. This configuration specifies which methods
1597
+ # change the names of the system parameters.
1598
+ # Corresponds to the JSON property `systemParameters`
1599
+ # @return [Google::Apis::ServiceusageV1::SystemParameters]
1600
+ attr_accessor :system_parameters
1601
+
1602
+ # A list of all proto message types included in this API service.
1603
+ # It serves similar purpose as [google.api.Service.types], except that
1604
+ # these types are not needed by user-defined APIs. Therefore, they will not
1605
+ # show up in the generated discovery doc. This field should only be used
1606
+ # to define system APIs in ESF.
1607
+ # Corresponds to the JSON property `systemTypes`
1608
+ # @return [Array<Google::Apis::ServiceusageV1::Type>]
1609
+ attr_accessor :system_types
1610
+
1611
+ # The product title for this service.
1612
+ # Corresponds to the JSON property `title`
1613
+ # @return [String]
1614
+ attr_accessor :title
1615
+
1616
+ # A list of all proto message types included in this API service.
1617
+ # Types referenced directly or indirectly by the `apis` are
1618
+ # automatically included. Messages which are not referenced but
1619
+ # shall be included, such as types used by the `google.protobuf.Any` type,
1620
+ # should be listed here by name. Example:
1621
+ # types:
1622
+ # - name: google.protobuf.Int32
1623
+ # Corresponds to the JSON property `types`
1624
+ # @return [Array<Google::Apis::ServiceusageV1::Type>]
1625
+ attr_accessor :types
1626
+
1627
+ # Configuration controlling usage of a service.
1628
+ # Corresponds to the JSON property `usage`
1629
+ # @return [Google::Apis::ServiceusageV1::Usage]
1630
+ attr_accessor :usage
1631
+
1632
+ # `Visibility` defines restrictions for the visibility of service
1633
+ # elements. Restrictions are specified using visibility labels
1634
+ # (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.
1635
+ # Users and projects can have access to more than one visibility label. The
1636
+ # effective visibility for multiple labels is the union of each label's
1637
+ # elements, plus any unrestricted elements.
1638
+ # If an element and its parents have no restrictions, visibility is
1639
+ # unconditionally granted.
1640
+ # Example:
1641
+ # visibility:
1642
+ # rules:
1643
+ # - selector: google.calendar.Calendar.EnhancedSearch
1644
+ # restriction: TRUSTED_TESTER
1645
+ # - selector: google.calendar.Calendar.Delegate
1646
+ # restriction: GOOGLE_INTERNAL
1647
+ # Here, all methods are publicly visible except for the restricted methods
1648
+ # EnhancedSearch and Delegate.
1649
+ # Corresponds to the JSON property `visibility`
1650
+ # @return [Google::Apis::ServiceusageV1::Visibility]
1651
+ attr_accessor :visibility
1652
+
1653
+ def initialize(**args)
1654
+ update!(**args)
1655
+ end
1656
+
1657
+ # Update properties of this object
1658
+ def update!(**args)
1659
+ @apis = args[:apis] if args.key?(:apis)
1660
+ @authentication = args[:authentication] if args.key?(:authentication)
1661
+ @backend = args[:backend] if args.key?(:backend)
1662
+ @billing = args[:billing] if args.key?(:billing)
1663
+ @config_version = args[:config_version] if args.key?(:config_version)
1664
+ @context = args[:context] if args.key?(:context)
1665
+ @control = args[:control] if args.key?(:control)
1666
+ @custom_error = args[:custom_error] if args.key?(:custom_error)
1667
+ @documentation = args[:documentation] if args.key?(:documentation)
1668
+ @endpoints = args[:endpoints] if args.key?(:endpoints)
1669
+ @enums = args[:enums] if args.key?(:enums)
1670
+ @experimental = args[:experimental] if args.key?(:experimental)
1671
+ @http = args[:http] if args.key?(:http)
1672
+ @id = args[:id] if args.key?(:id)
1673
+ @logging = args[:logging] if args.key?(:logging)
1674
+ @logs = args[:logs] if args.key?(:logs)
1675
+ @metrics = args[:metrics] if args.key?(:metrics)
1676
+ @monitored_resources = args[:monitored_resources] if args.key?(:monitored_resources)
1677
+ @monitoring = args[:monitoring] if args.key?(:monitoring)
1678
+ @name = args[:name] if args.key?(:name)
1679
+ @producer_project_id = args[:producer_project_id] if args.key?(:producer_project_id)
1680
+ @quota = args[:quota] if args.key?(:quota)
1681
+ @source_info = args[:source_info] if args.key?(:source_info)
1682
+ @system_parameters = args[:system_parameters] if args.key?(:system_parameters)
1683
+ @system_types = args[:system_types] if args.key?(:system_types)
1684
+ @title = args[:title] if args.key?(:title)
1685
+ @types = args[:types] if args.key?(:types)
1686
+ @usage = args[:usage] if args.key?(:usage)
1687
+ @visibility = args[:visibility] if args.key?(:visibility)
1688
+ end
1689
+ end
1690
+
1691
+ # Defines the HTTP configuration for an API service. It contains a list of
1692
+ # HttpRule, each specifying the mapping of an RPC method
1693
+ # to one or more HTTP REST API methods.
1694
+ class Http
1695
+ include Google::Apis::Core::Hashable
1696
+
1697
+ # When set to true, URL path parmeters will be fully URI-decoded except in
1698
+ # cases of single segment matches in reserved expansion, where "%2F" will be
1699
+ # left encoded.
1700
+ # The default behavior is to not decode RFC 6570 reserved characters in multi
1701
+ # segment matches.
1702
+ # Corresponds to the JSON property `fullyDecodeReservedExpansion`
1703
+ # @return [Boolean]
1704
+ attr_accessor :fully_decode_reserved_expansion
1705
+ alias_method :fully_decode_reserved_expansion?, :fully_decode_reserved_expansion
1706
+
1707
+ # A list of HTTP configuration rules that apply to individual API methods.
1708
+ # **NOTE:** All service configuration rules follow "last one wins" order.
1709
+ # Corresponds to the JSON property `rules`
1710
+ # @return [Array<Google::Apis::ServiceusageV1::HttpRule>]
1711
+ attr_accessor :rules
1712
+
1713
+ def initialize(**args)
1714
+ update!(**args)
1715
+ end
1716
+
1717
+ # Update properties of this object
1718
+ def update!(**args)
1719
+ @fully_decode_reserved_expansion = args[:fully_decode_reserved_expansion] if args.key?(:fully_decode_reserved_expansion)
1720
+ @rules = args[:rules] if args.key?(:rules)
1721
+ end
1722
+ end
1723
+
1724
+ # `HttpRule` defines the mapping of an RPC method to one or more HTTP
1725
+ # REST API methods. The mapping specifies how different portions of the RPC
1726
+ # request message are mapped to URL path, URL query parameters, and
1727
+ # HTTP request body. The mapping is typically specified as an
1728
+ # `google.api.http` annotation on the RPC method,
1729
+ # see "google/api/annotations.proto" for details.
1730
+ # The mapping consists of a field specifying the path template and
1731
+ # method kind. The path template can refer to fields in the request
1732
+ # message, as in the example below which describes a REST GET
1733
+ # operation on a resource collection of messages:
1734
+ # service Messaging `
1735
+ # rpc GetMessage(GetMessageRequest) returns (Message) `
1736
+ # option (google.api.http).get = "/v1/messages/`message_id`/`sub.
1737
+ # subfield`";
1738
+ # `
1739
+ # `
1740
+ # message GetMessageRequest `
1741
+ # message SubMessage `
1742
+ # string subfield = 1;
1743
+ # `
1744
+ # string message_id = 1; // mapped to the URL
1745
+ # SubMessage sub = 2; // `sub.subfield` is url-mapped
1746
+ # `
1747
+ # message Message `
1748
+ # string text = 1; // content of the resource
1749
+ # `
1750
+ # The same http annotation can alternatively be expressed inside the
1751
+ # `GRPC API Configuration` YAML file.
1752
+ # http:
1753
+ # rules:
1754
+ # - selector: <proto_package_name>.Messaging.GetMessage
1755
+ # get: /v1/messages/`message_id`/`sub.subfield`
1756
+ # This definition enables an automatic, bidrectional mapping of HTTP
1757
+ # JSON to RPC. Example:
1758
+ # HTTP | RPC
1759
+ # -----|-----
1760
+ # `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub:
1761
+ # SubMessage(subfield: "foo"))`
1762
+ # In general, not only fields but also field paths can be referenced
1763
+ # from a path pattern. Fields mapped to the path pattern cannot be
1764
+ # repeated and must have a primitive (non-message) type.
1765
+ # Any fields in the request message which are not bound by the path
1766
+ # pattern automatically become (optional) HTTP query
1767
+ # parameters. Assume the following definition of the request message:
1768
+ # service Messaging `
1769
+ # rpc GetMessage(GetMessageRequest) returns (Message) `
1770
+ # option (google.api.http).get = "/v1/messages/`message_id`";
1771
+ # `
1772
+ # `
1773
+ # message GetMessageRequest `
1774
+ # message SubMessage `
1775
+ # string subfield = 1;
1776
+ # `
1777
+ # string message_id = 1; // mapped to the URL
1778
+ # int64 revision = 2; // becomes a parameter
1779
+ # SubMessage sub = 3; // `sub.subfield` becomes a parameter
1780
+ # `
1781
+ # This enables a HTTP JSON to RPC mapping as below:
1782
+ # HTTP | RPC
1783
+ # -----|-----
1784
+ # `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id:
1785
+ # "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
1786
+ # Note that fields which are mapped to HTTP parameters must have a
1787
+ # primitive type or a repeated primitive type. Message types are not
1788
+ # allowed. In the case of a repeated type, the parameter can be
1789
+ # repeated in the URL, as in `...?param=A&param=B`.
1790
+ # For HTTP method kinds which allow a request body, the `body` field
1791
+ # specifies the mapping. Consider a REST update method on the
1792
+ # message resource collection:
1793
+ # service Messaging `
1794
+ # rpc UpdateMessage(UpdateMessageRequest) returns (Message) `
1795
+ # option (google.api.http) = `
1796
+ # put: "/v1/messages/`message_id`"
1797
+ # body: "message"
1798
+ # `;
1799
+ # `
1800
+ # `
1801
+ # message UpdateMessageRequest `
1802
+ # string message_id = 1; // mapped to the URL
1803
+ # Message message = 2; // mapped to the body
1804
+ # `
1805
+ # The following HTTP JSON to RPC mapping is enabled, where the
1806
+ # representation of the JSON in the request body is determined by
1807
+ # protos JSON encoding:
1808
+ # HTTP | RPC
1809
+ # -----|-----
1810
+ # `PUT /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: "
1811
+ # 123456" message ` text: "Hi!" `)`
1812
+ # The special name `*` can be used in the body mapping to define that
1813
+ # every field not bound by the path template should be mapped to the
1814
+ # request body. This enables the following alternative definition of
1815
+ # the update method:
1816
+ # service Messaging `
1817
+ # rpc UpdateMessage(Message) returns (Message) `
1818
+ # option (google.api.http) = `
1819
+ # put: "/v1/messages/`message_id`"
1820
+ # body: "*"
1821
+ # `;
1822
+ # `
1823
+ # `
1824
+ # message Message `
1825
+ # string message_id = 1;
1826
+ # string text = 2;
1827
+ # `
1828
+ # The following HTTP JSON to RPC mapping is enabled:
1829
+ # HTTP | RPC
1830
+ # -----|-----
1831
+ # `PUT /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: "
1832
+ # 123456" text: "Hi!")`
1833
+ # Note that when using `*` in the body mapping, it is not possible to
1834
+ # have HTTP parameters, as all fields not bound by the path end in
1835
+ # the body. This makes this option more rarely used in practice of
1836
+ # defining REST APIs. The common usage of `*` is in custom methods
1837
+ # which don't use the URL at all for transferring data.
1838
+ # It is possible to define multiple HTTP methods for one RPC by using
1839
+ # the `additional_bindings` option. Example:
1840
+ # service Messaging `
1841
+ # rpc GetMessage(GetMessageRequest) returns (Message) `
1842
+ # option (google.api.http) = `
1843
+ # get: "/v1/messages/`message_id`"
1844
+ # additional_bindings `
1845
+ # get: "/v1/users/`user_id`/messages/`message_id`"
1846
+ # `
1847
+ # `;
1848
+ # `
1849
+ # `
1850
+ # message GetMessageRequest `
1851
+ # string message_id = 1;
1852
+ # string user_id = 2;
1853
+ # `
1854
+ # This enables the following two alternative HTTP JSON to RPC
1855
+ # mappings:
1856
+ # HTTP | RPC
1857
+ # -----|-----
1858
+ # `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
1859
+ # `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "
1860
+ # 123456")`
1861
+ # # Rules for HTTP mapping
1862
+ # The rules for mapping HTTP path, query parameters, and body fields
1863
+ # to the request message are as follows:
1864
+ # 1. The `body` field specifies either `*` or a field path, or is
1865
+ # omitted. If omitted, it indicates there is no HTTP request body.
1866
+ # 2. Leaf fields (recursive expansion of nested messages in the
1867
+ # request) can be classified into three types:
1868
+ # (a) Matched in the URL template.
1869
+ # (b) Covered by body (if body is `*`, everything except (a) fields;
1870
+ # else everything under the body field)
1871
+ # (c) All other fields.
1872
+ # 3. URL query parameters found in the HTTP request are mapped to (c) fields.
1873
+ # 4. Any body sent with an HTTP request can contain only (b) fields.
1874
+ # The syntax of the path template is as follows:
1875
+ # Template = "/" Segments [ Verb ] ;
1876
+ # Segments = Segment ` "/" Segment ` ;
1877
+ # Segment = "*" | "**" | LITERAL | Variable ;
1878
+ # Variable = "`" FieldPath [ "=" Segments ] "`" ;
1879
+ # FieldPath = IDENT ` "." IDENT ` ;
1880
+ # Verb = ":" LITERAL ;
1881
+ # The syntax `*` matches a single path segment. The syntax `**` matches zero
1882
+ # or more path segments, which must be the last part of the path except the
1883
+ # `Verb`. The syntax `LITERAL` matches literal text in the path.
1884
+ # The syntax `Variable` matches part of the URL path as specified by its
1885
+ # template. A variable template must not contain other variables. If a variable
1886
+ # matches a single path segment, its template may be omitted, e.g. ``var``
1887
+ # is equivalent to ``var=*``.
1888
+ # If a variable contains exactly one path segment, such as `"`var`"` or
1889
+ # `"`var=*`"`, when such a variable is expanded into a URL path, all characters
1890
+ # except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the
1891
+ # Discovery Document as ``var``.
1892
+ # If a variable contains one or more path segments, such as `"`var=foo/*`"`
1893
+ # or `"`var=**`"`, when such a variable is expanded into a URL path, all
1894
+ # characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables
1895
+ # show up in the Discovery Document as ``+var``.
1896
+ # NOTE: While the single segment variable matches the semantics of
1897
+ # [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2
1898
+ # Simple String Expansion, the multi segment variable **does not** match
1899
+ # RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion
1900
+ # does not expand special characters like `?` and `#`, which would lead
1901
+ # to invalid URLs.
1902
+ # NOTE: the field paths in variables and in the `body` must not refer to
1903
+ # repeated fields or map fields.
1904
+ class HttpRule
1905
+ include Google::Apis::Core::Hashable
1906
+
1907
+ # Additional HTTP bindings for the selector. Nested bindings must
1908
+ # not contain an `additional_bindings` field themselves (that is,
1909
+ # the nesting may only be one level deep).
1910
+ # Corresponds to the JSON property `additionalBindings`
1911
+ # @return [Array<Google::Apis::ServiceusageV1::HttpRule>]
1912
+ attr_accessor :additional_bindings
1913
+
1914
+ # Specifies the permission(s) required for an API element for the overall
1915
+ # API request to succeed. It is typically used to mark request message fields
1916
+ # that contain the name of the resource and indicates the permissions that
1917
+ # will be checked on that resource.
1918
+ # Corresponds to the JSON property `authorizations`
1919
+ # @return [Array<Google::Apis::ServiceusageV1::AuthorizationRule>]
1920
+ attr_accessor :authorizations
1921
+
1922
+ # The name of the request field whose value is mapped to the HTTP body, or
1923
+ # `*` for mapping all fields not captured by the path pattern to the HTTP
1924
+ # body. NOTE: the referred field must not be a repeated field and must be
1925
+ # present at the top-level of request message type.
1926
+ # Corresponds to the JSON property `body`
1927
+ # @return [String]
1928
+ attr_accessor :body
1929
+
1930
+ # A custom pattern is used for defining custom HTTP verb.
1931
+ # Corresponds to the JSON property `custom`
1932
+ # @return [Google::Apis::ServiceusageV1::CustomHttpPattern]
1933
+ attr_accessor :custom
1934
+
1935
+ # Used for deleting a resource.
1936
+ # Corresponds to the JSON property `delete`
1937
+ # @return [String]
1938
+ attr_accessor :delete
1939
+
1940
+ # Used for listing and getting information about resources.
1941
+ # Corresponds to the JSON property `get`
1942
+ # @return [String]
1943
+ attr_accessor :get
1944
+
1945
+ # Defines the Media configuration for a service in case of a download.
1946
+ # Use this only for Scotty Requests. Do not use this for media support using
1947
+ # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to
1948
+ # your configuration for Bytestream methods.
1949
+ # Corresponds to the JSON property `mediaDownload`
1950
+ # @return [Google::Apis::ServiceusageV1::MediaDownload]
1951
+ attr_accessor :media_download
1952
+
1953
+ # Defines the Media configuration for a service in case of an upload.
1954
+ # Use this only for Scotty Requests. Do not use this for media support using
1955
+ # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to
1956
+ # your configuration for Bytestream methods.
1957
+ # Corresponds to the JSON property `mediaUpload`
1958
+ # @return [Google::Apis::ServiceusageV1::MediaUpload]
1959
+ attr_accessor :media_upload
1960
+
1961
+ # Used for updating a resource.
1962
+ # Corresponds to the JSON property `patch`
1963
+ # @return [String]
1964
+ attr_accessor :patch
1965
+
1966
+ # Used for creating a resource.
1967
+ # Corresponds to the JSON property `post`
1968
+ # @return [String]
1969
+ attr_accessor :post
1970
+
1971
+ # Used for updating a resource.
1972
+ # Corresponds to the JSON property `put`
1973
+ # @return [String]
1974
+ attr_accessor :put
1975
+
1976
+ # DO NOT USE. This is an experimental field.
1977
+ # Optional. The REST collection name is by default derived from the URL
1978
+ # pattern. If specified, this field overrides the default collection name.
1979
+ # Example:
1980
+ # rpc AddressesAggregatedList(AddressesAggregatedListRequest)
1981
+ # returns (AddressesAggregatedListResponse) `
1982
+ # option (google.api.http) = `
1983
+ # get: "/v1/projects/`project_id`/aggregated/addresses"
1984
+ # rest_collection: "projects.addresses"
1985
+ # `;
1986
+ # `
1987
+ # This method has the automatically derived collection name
1988
+ # "projects.aggregated". Because, semantically, this rpc is actually an
1989
+ # operation on the "projects.addresses" collection, the `rest_collection`
1990
+ # field is configured to override the derived collection name.
1991
+ # Corresponds to the JSON property `restCollection`
1992
+ # @return [String]
1993
+ attr_accessor :rest_collection
1994
+
1995
+ # DO NOT USE. This is an experimental field.
1996
+ # Optional. The rest method name is by default derived from the URL
1997
+ # pattern. If specified, this field overrides the default method name.
1998
+ # Example:
1999
+ # rpc CreateResource(CreateResourceRequest)
2000
+ # returns (CreateResourceResponse) `
2001
+ # option (google.api.http) = `
2002
+ # post: "/v1/resources",
2003
+ # body: "resource",
2004
+ # rest_method_name: "insert"
2005
+ # `;
2006
+ # `
2007
+ # This method has the automatically derived rest method name
2008
+ # "create", but for backwards compatibility with apiary, it is specified as
2009
+ # insert.
2010
+ # Corresponds to the JSON property `restMethodName`
2011
+ # @return [String]
2012
+ attr_accessor :rest_method_name
2013
+
2014
+ # Selects methods to which this rule applies.
2015
+ # Refer to selector for syntax details.
2016
+ # Corresponds to the JSON property `selector`
2017
+ # @return [String]
2018
+ attr_accessor :selector
2019
+
2020
+ def initialize(**args)
2021
+ update!(**args)
2022
+ end
2023
+
2024
+ # Update properties of this object
2025
+ def update!(**args)
2026
+ @additional_bindings = args[:additional_bindings] if args.key?(:additional_bindings)
2027
+ @authorizations = args[:authorizations] if args.key?(:authorizations)
2028
+ @body = args[:body] if args.key?(:body)
2029
+ @custom = args[:custom] if args.key?(:custom)
2030
+ @delete = args[:delete] if args.key?(:delete)
2031
+ @get = args[:get] if args.key?(:get)
2032
+ @media_download = args[:media_download] if args.key?(:media_download)
2033
+ @media_upload = args[:media_upload] if args.key?(:media_upload)
2034
+ @patch = args[:patch] if args.key?(:patch)
2035
+ @post = args[:post] if args.key?(:post)
2036
+ @put = args[:put] if args.key?(:put)
2037
+ @rest_collection = args[:rest_collection] if args.key?(:rest_collection)
2038
+ @rest_method_name = args[:rest_method_name] if args.key?(:rest_method_name)
2039
+ @selector = args[:selector] if args.key?(:selector)
2040
+ end
2041
+ end
2042
+
2043
+ # A description of a label.
2044
+ class LabelDescriptor
2045
+ include Google::Apis::Core::Hashable
2046
+
2047
+ # A human-readable description for the label.
2048
+ # Corresponds to the JSON property `description`
2049
+ # @return [String]
2050
+ attr_accessor :description
2051
+
2052
+ # The label key.
2053
+ # Corresponds to the JSON property `key`
2054
+ # @return [String]
2055
+ attr_accessor :key
2056
+
2057
+ # The type of data that can be assigned to the label.
2058
+ # Corresponds to the JSON property `valueType`
2059
+ # @return [String]
2060
+ attr_accessor :value_type
2061
+
2062
+ def initialize(**args)
2063
+ update!(**args)
2064
+ end
2065
+
2066
+ # Update properties of this object
2067
+ def update!(**args)
2068
+ @description = args[:description] if args.key?(:description)
2069
+ @key = args[:key] if args.key?(:key)
2070
+ @value_type = args[:value_type] if args.key?(:value_type)
2071
+ end
2072
+ end
2073
+
2074
+ # Response message for ListEnabledServices.
2075
+ class ListEnabledServicesResponse
2076
+ include Google::Apis::Core::Hashable
2077
+
2078
+ # Token that can be passed to `ListEnabledServices` to resume a paginated
2079
+ # query.
2080
+ # Corresponds to the JSON property `nextPageToken`
2081
+ # @return [String]
2082
+ attr_accessor :next_page_token
2083
+
2084
+ # The state of the enabled services for the requested parent.
2085
+ # Corresponds to the JSON property `services`
2086
+ # @return [Array<Google::Apis::ServiceusageV1::ServiceState>]
2087
+ attr_accessor :services
2088
+
2089
+ def initialize(**args)
2090
+ update!(**args)
2091
+ end
2092
+
2093
+ # Update properties of this object
2094
+ def update!(**args)
2095
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2096
+ @services = args[:services] if args.key?(:services)
2097
+ end
2098
+ end
2099
+
2100
+ # The response message for Operations.ListOperations.
2101
+ class ListOperationsResponse
2102
+ include Google::Apis::Core::Hashable
2103
+
2104
+ # The standard List next-page token.
2105
+ # Corresponds to the JSON property `nextPageToken`
2106
+ # @return [String]
2107
+ attr_accessor :next_page_token
2108
+
2109
+ # A list of operations that matches the specified filter in the request.
2110
+ # Corresponds to the JSON property `operations`
2111
+ # @return [Array<Google::Apis::ServiceusageV1::Operation>]
2112
+ attr_accessor :operations
2113
+
2114
+ def initialize(**args)
2115
+ update!(**args)
2116
+ end
2117
+
2118
+ # Update properties of this object
2119
+ def update!(**args)
2120
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2121
+ @operations = args[:operations] if args.key?(:operations)
2122
+ end
2123
+ end
2124
+
2125
+ # A description of a log type. Example in YAML format:
2126
+ # - name: library.googleapis.com/activity_history
2127
+ # description: The history of borrowing and returning library items.
2128
+ # display_name: Activity
2129
+ # labels:
2130
+ # - key: /customer_id
2131
+ # description: Identifier of a library customer
2132
+ class LogDescriptor
2133
+ include Google::Apis::Core::Hashable
2134
+
2135
+ # A human-readable description of this log. This information appears in
2136
+ # the documentation and can contain details.
2137
+ # Corresponds to the JSON property `description`
2138
+ # @return [String]
2139
+ attr_accessor :description
2140
+
2141
+ # The human-readable name for this log. This information appears on
2142
+ # the user interface and should be concise.
2143
+ # Corresponds to the JSON property `displayName`
2144
+ # @return [String]
2145
+ attr_accessor :display_name
2146
+
2147
+ # The set of labels that are available to describe a specific log entry.
2148
+ # Runtime requests that contain labels not specified here are
2149
+ # considered invalid.
2150
+ # Corresponds to the JSON property `labels`
2151
+ # @return [Array<Google::Apis::ServiceusageV1::LabelDescriptor>]
2152
+ attr_accessor :labels
2153
+
2154
+ # The name of the log. It must be less than 512 characters long and can
2155
+ # include the following characters: upper- and lower-case alphanumeric
2156
+ # characters [A-Za-z0-9], and punctuation characters including
2157
+ # slash, underscore, hyphen, period [/_-.].
2158
+ # Corresponds to the JSON property `name`
2159
+ # @return [String]
2160
+ attr_accessor :name
2161
+
2162
+ def initialize(**args)
2163
+ update!(**args)
2164
+ end
2165
+
2166
+ # Update properties of this object
2167
+ def update!(**args)
2168
+ @description = args[:description] if args.key?(:description)
2169
+ @display_name = args[:display_name] if args.key?(:display_name)
2170
+ @labels = args[:labels] if args.key?(:labels)
2171
+ @name = args[:name] if args.key?(:name)
2172
+ end
2173
+ end
2174
+
2175
+ # Logging configuration of the service.
2176
+ # The following example shows how to configure logs to be sent to the
2177
+ # producer and consumer projects. In the example, the `activity_history`
2178
+ # log is sent to both the producer and consumer projects, whereas the
2179
+ # `purchase_history` log is only sent to the producer project.
2180
+ # monitored_resources:
2181
+ # - type: library.googleapis.com/branch
2182
+ # labels:
2183
+ # - key: /city
2184
+ # description: The city where the library branch is located in.
2185
+ # - key: /name
2186
+ # description: The name of the branch.
2187
+ # logs:
2188
+ # - name: activity_history
2189
+ # labels:
2190
+ # - key: /customer_id
2191
+ # - name: purchase_history
2192
+ # logging:
2193
+ # producer_destinations:
2194
+ # - monitored_resource: library.googleapis.com/branch
2195
+ # logs:
2196
+ # - activity_history
2197
+ # - purchase_history
2198
+ # consumer_destinations:
2199
+ # - monitored_resource: library.googleapis.com/branch
2200
+ # logs:
2201
+ # - activity_history
2202
+ class Logging
2203
+ include Google::Apis::Core::Hashable
2204
+
2205
+ # Logging configurations for sending logs to the consumer project.
2206
+ # There can be multiple consumer destinations, each one must have a
2207
+ # different monitored resource type. A log can be used in at most
2208
+ # one consumer destination.
2209
+ # Corresponds to the JSON property `consumerDestinations`
2210
+ # @return [Array<Google::Apis::ServiceusageV1::LoggingDestination>]
2211
+ attr_accessor :consumer_destinations
2212
+
2213
+ # Logging configurations for sending logs to the producer project.
2214
+ # There can be multiple producer destinations, each one must have a
2215
+ # different monitored resource type. A log can be used in at most
2216
+ # one producer destination.
2217
+ # Corresponds to the JSON property `producerDestinations`
2218
+ # @return [Array<Google::Apis::ServiceusageV1::LoggingDestination>]
2219
+ attr_accessor :producer_destinations
2220
+
2221
+ def initialize(**args)
2222
+ update!(**args)
2223
+ end
2224
+
2225
+ # Update properties of this object
2226
+ def update!(**args)
2227
+ @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations)
2228
+ @producer_destinations = args[:producer_destinations] if args.key?(:producer_destinations)
2229
+ end
2230
+ end
2231
+
2232
+ # Configuration of a specific logging destination (the producer project
2233
+ # or the consumer project).
2234
+ class LoggingDestination
2235
+ include Google::Apis::Core::Hashable
2236
+
2237
+ # Names of the logs to be sent to this destination. Each name must
2238
+ # be defined in the Service.logs section. If the log name is
2239
+ # not a domain scoped name, it will be automatically prefixed with
2240
+ # the service name followed by "/".
2241
+ # Corresponds to the JSON property `logs`
2242
+ # @return [Array<String>]
2243
+ attr_accessor :logs
2244
+
2245
+ # The monitored resource type. The type must be defined in the
2246
+ # Service.monitored_resources section.
2247
+ # Corresponds to the JSON property `monitoredResource`
2248
+ # @return [String]
2249
+ attr_accessor :monitored_resource
2250
+
2251
+ def initialize(**args)
2252
+ update!(**args)
2253
+ end
2254
+
2255
+ # Update properties of this object
2256
+ def update!(**args)
2257
+ @logs = args[:logs] if args.key?(:logs)
2258
+ @monitored_resource = args[:monitored_resource] if args.key?(:monitored_resource)
2259
+ end
2260
+ end
2261
+
2262
+ # Defines the Media configuration for a service in case of a download.
2263
+ # Use this only for Scotty Requests. Do not use this for media support using
2264
+ # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to
2265
+ # your configuration for Bytestream methods.
2266
+ class MediaDownload
2267
+ include Google::Apis::Core::Hashable
2268
+
2269
+ # A boolean that determines whether a notification for the completion of a
2270
+ # download should be sent to the backend.
2271
+ # Corresponds to the JSON property `completeNotification`
2272
+ # @return [Boolean]
2273
+ attr_accessor :complete_notification
2274
+ alias_method :complete_notification?, :complete_notification
2275
+
2276
+ # DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.
2277
+ # Specify name of the download service if one is used for download.
2278
+ # Corresponds to the JSON property `downloadService`
2279
+ # @return [String]
2280
+ attr_accessor :download_service
2281
+
2282
+ # Name of the Scotty dropzone to use for the current API.
2283
+ # Corresponds to the JSON property `dropzone`
2284
+ # @return [String]
2285
+ attr_accessor :dropzone
2286
+
2287
+ # Whether download is enabled.
2288
+ # Corresponds to the JSON property `enabled`
2289
+ # @return [Boolean]
2290
+ attr_accessor :enabled
2291
+ alias_method :enabled?, :enabled
2292
+
2293
+ # Optional maximum acceptable size for direct download.
2294
+ # The size is specified in bytes.
2295
+ # Corresponds to the JSON property `maxDirectDownloadSize`
2296
+ # @return [Fixnum]
2297
+ attr_accessor :max_direct_download_size
2298
+
2299
+ # A boolean that determines if direct download from ESF should be used for
2300
+ # download of this media.
2301
+ # Corresponds to the JSON property `useDirectDownload`
2302
+ # @return [Boolean]
2303
+ attr_accessor :use_direct_download
2304
+ alias_method :use_direct_download?, :use_direct_download
2305
+
2306
+ def initialize(**args)
2307
+ update!(**args)
2308
+ end
2309
+
2310
+ # Update properties of this object
2311
+ def update!(**args)
2312
+ @complete_notification = args[:complete_notification] if args.key?(:complete_notification)
2313
+ @download_service = args[:download_service] if args.key?(:download_service)
2314
+ @dropzone = args[:dropzone] if args.key?(:dropzone)
2315
+ @enabled = args[:enabled] if args.key?(:enabled)
2316
+ @max_direct_download_size = args[:max_direct_download_size] if args.key?(:max_direct_download_size)
2317
+ @use_direct_download = args[:use_direct_download] if args.key?(:use_direct_download)
2318
+ end
2319
+ end
2320
+
2321
+ # Defines the Media configuration for a service in case of an upload.
2322
+ # Use this only for Scotty Requests. Do not use this for media support using
2323
+ # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to
2324
+ # your configuration for Bytestream methods.
2325
+ class MediaUpload
2326
+ include Google::Apis::Core::Hashable
2327
+
2328
+ # A boolean that determines whether a notification for the completion of an
2329
+ # upload should be sent to the backend. These notifications will not be seen
2330
+ # by the client and will not consume quota.
2331
+ # Corresponds to the JSON property `completeNotification`
2332
+ # @return [Boolean]
2333
+ attr_accessor :complete_notification
2334
+ alias_method :complete_notification?, :complete_notification
2335
+
2336
+ # Name of the Scotty dropzone to use for the current API.
2337
+ # Corresponds to the JSON property `dropzone`
2338
+ # @return [String]
2339
+ attr_accessor :dropzone
2340
+
2341
+ # Whether upload is enabled.
2342
+ # Corresponds to the JSON property `enabled`
2343
+ # @return [Boolean]
2344
+ attr_accessor :enabled
2345
+ alias_method :enabled?, :enabled
2346
+
2347
+ # Optional maximum acceptable size for an upload.
2348
+ # The size is specified in bytes.
2349
+ # Corresponds to the JSON property `maxSize`
2350
+ # @return [Fixnum]
2351
+ attr_accessor :max_size
2352
+
2353
+ # An array of mimetype patterns. Esf will only accept uploads that match one
2354
+ # of the given patterns.
2355
+ # Corresponds to the JSON property `mimeTypes`
2356
+ # @return [Array<String>]
2357
+ attr_accessor :mime_types
2358
+
2359
+ # Whether to receive a notification for progress changes of media upload.
2360
+ # Corresponds to the JSON property `progressNotification`
2361
+ # @return [Boolean]
2362
+ attr_accessor :progress_notification
2363
+ alias_method :progress_notification?, :progress_notification
2364
+
2365
+ # Whether to receive a notification on the start of media upload.
2366
+ # Corresponds to the JSON property `startNotification`
2367
+ # @return [Boolean]
2368
+ attr_accessor :start_notification
2369
+ alias_method :start_notification?, :start_notification
2370
+
2371
+ # DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.
2372
+ # Specify name of the upload service if one is used for upload.
2373
+ # Corresponds to the JSON property `uploadService`
2374
+ # @return [String]
2375
+ attr_accessor :upload_service
2376
+
2377
+ def initialize(**args)
2378
+ update!(**args)
2379
+ end
2380
+
2381
+ # Update properties of this object
2382
+ def update!(**args)
2383
+ @complete_notification = args[:complete_notification] if args.key?(:complete_notification)
2384
+ @dropzone = args[:dropzone] if args.key?(:dropzone)
2385
+ @enabled = args[:enabled] if args.key?(:enabled)
2386
+ @max_size = args[:max_size] if args.key?(:max_size)
2387
+ @mime_types = args[:mime_types] if args.key?(:mime_types)
2388
+ @progress_notification = args[:progress_notification] if args.key?(:progress_notification)
2389
+ @start_notification = args[:start_notification] if args.key?(:start_notification)
2390
+ @upload_service = args[:upload_service] if args.key?(:upload_service)
2391
+ end
2392
+ end
2393
+
2394
+ # Method represents a method of an API interface.
2395
+ class MethodProp
2396
+ include Google::Apis::Core::Hashable
2397
+
2398
+ # The simple name of this method.
2399
+ # Corresponds to the JSON property `name`
2400
+ # @return [String]
2401
+ attr_accessor :name
2402
+
2403
+ # Any metadata attached to the method.
2404
+ # Corresponds to the JSON property `options`
2405
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
2406
+ attr_accessor :options
2407
+
2408
+ # If true, the request is streamed.
2409
+ # Corresponds to the JSON property `requestStreaming`
2410
+ # @return [Boolean]
2411
+ attr_accessor :request_streaming
2412
+ alias_method :request_streaming?, :request_streaming
2413
+
2414
+ # A URL of the input message type.
2415
+ # Corresponds to the JSON property `requestTypeUrl`
2416
+ # @return [String]
2417
+ attr_accessor :request_type_url
2418
+
2419
+ # If true, the response is streamed.
2420
+ # Corresponds to the JSON property `responseStreaming`
2421
+ # @return [Boolean]
2422
+ attr_accessor :response_streaming
2423
+ alias_method :response_streaming?, :response_streaming
2424
+
2425
+ # The URL of the output message type.
2426
+ # Corresponds to the JSON property `responseTypeUrl`
2427
+ # @return [String]
2428
+ attr_accessor :response_type_url
2429
+
2430
+ # The source syntax of this method.
2431
+ # Corresponds to the JSON property `syntax`
2432
+ # @return [String]
2433
+ attr_accessor :syntax
2434
+
2435
+ def initialize(**args)
2436
+ update!(**args)
2437
+ end
2438
+
2439
+ # Update properties of this object
2440
+ def update!(**args)
2441
+ @name = args[:name] if args.key?(:name)
2442
+ @options = args[:options] if args.key?(:options)
2443
+ @request_streaming = args[:request_streaming] if args.key?(:request_streaming)
2444
+ @request_type_url = args[:request_type_url] if args.key?(:request_type_url)
2445
+ @response_streaming = args[:response_streaming] if args.key?(:response_streaming)
2446
+ @response_type_url = args[:response_type_url] if args.key?(:response_type_url)
2447
+ @syntax = args[:syntax] if args.key?(:syntax)
2448
+ end
2449
+ end
2450
+
2451
+ # Defines a metric type and its schema. Once a metric descriptor is created,
2452
+ # deleting or altering it stops data collection and makes the metric type's
2453
+ # existing data unusable.
2454
+ class MetricDescriptor
2455
+ include Google::Apis::Core::Hashable
2456
+
2457
+ # A detailed description of the metric, which can be used in documentation.
2458
+ # Corresponds to the JSON property `description`
2459
+ # @return [String]
2460
+ attr_accessor :description
2461
+
2462
+ # A concise name for the metric, which can be displayed in user interfaces.
2463
+ # Use sentence case without an ending period, for example "Request count".
2464
+ # This field is optional but it is recommended to be set for any metrics
2465
+ # associated with user-visible concepts, such as Quota.
2466
+ # Corresponds to the JSON property `displayName`
2467
+ # @return [String]
2468
+ attr_accessor :display_name
2469
+
2470
+ # The set of labels that can be used to describe a specific
2471
+ # instance of this metric type. For example, the
2472
+ # `appengine.googleapis.com/http/server/response_latencies` metric
2473
+ # type has a label for the HTTP response code, `response_code`, so
2474
+ # you can look at latencies for successful responses or just
2475
+ # for responses that failed.
2476
+ # Corresponds to the JSON property `labels`
2477
+ # @return [Array<Google::Apis::ServiceusageV1::LabelDescriptor>]
2478
+ attr_accessor :labels
2479
+
2480
+ # Whether the metric records instantaneous values, changes to a value, etc.
2481
+ # Some combinations of `metric_kind` and `value_type` might not be supported.
2482
+ # Corresponds to the JSON property `metricKind`
2483
+ # @return [String]
2484
+ attr_accessor :metric_kind
2485
+
2486
+ # The resource name of the metric descriptor.
2487
+ # Corresponds to the JSON property `name`
2488
+ # @return [String]
2489
+ attr_accessor :name
2490
+
2491
+ # The metric type, including its DNS name prefix. The type is not
2492
+ # URL-encoded. All user-defined custom metric types have the DNS name
2493
+ # `custom.googleapis.com`. Metric types should use a natural hierarchical
2494
+ # grouping. For example:
2495
+ # "custom.googleapis.com/invoice/paid/amount"
2496
+ # "appengine.googleapis.com/http/server/response_latencies"
2497
+ # Corresponds to the JSON property `type`
2498
+ # @return [String]
2499
+ attr_accessor :type
2500
+
2501
+ # The unit in which the metric value is reported. It is only applicable
2502
+ # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
2503
+ # supported units are a subset of [The Unified Code for Units of
2504
+ # Measure](http://unitsofmeasure.org/ucum.html) standard:
2505
+ # **Basic units (UNIT)**
2506
+ # * `bit` bit
2507
+ # * `By` byte
2508
+ # * `s` second
2509
+ # * `min` minute
2510
+ # * `h` hour
2511
+ # * `d` day
2512
+ # **Prefixes (PREFIX)**
2513
+ # * `k` kilo (10**3)
2514
+ # * `M` mega (10**6)
2515
+ # * `G` giga (10**9)
2516
+ # * `T` tera (10**12)
2517
+ # * `P` peta (10**15)
2518
+ # * `E` exa (10**18)
2519
+ # * `Z` zetta (10**21)
2520
+ # * `Y` yotta (10**24)
2521
+ # * `m` milli (10**-3)
2522
+ # * `u` micro (10**-6)
2523
+ # * `n` nano (10**-9)
2524
+ # * `p` pico (10**-12)
2525
+ # * `f` femto (10**-15)
2526
+ # * `a` atto (10**-18)
2527
+ # * `z` zepto (10**-21)
2528
+ # * `y` yocto (10**-24)
2529
+ # * `Ki` kibi (2**10)
2530
+ # * `Mi` mebi (2**20)
2531
+ # * `Gi` gibi (2**30)
2532
+ # * `Ti` tebi (2**40)
2533
+ # **Grammar**
2534
+ # The grammar also includes these connectors:
2535
+ # * `/` division (as an infix operator, e.g. `1/s`).
2536
+ # * `.` multiplication (as an infix operator, e.g. `GBy.d`)
2537
+ # The grammar for a unit is as follows:
2538
+ # Expression = Component ` "." Component ` ` "/" Component ` ;
2539
+ # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
2540
+ # | Annotation
2541
+ # | "1"
2542
+ # ;
2543
+ # Annotation = "`" NAME "`" ;
2544
+ # Notes:
2545
+ # * `Annotation` is just a comment if it follows a `UNIT` and is
2546
+ # equivalent to `1` if it is used alone. For examples,
2547
+ # ``requests`/s == 1/s`, `By`transmitted`/s == By/s`.
2548
+ # * `NAME` is a sequence of non-blank printable ASCII characters not
2549
+ # containing '`' or '`'.
2550
+ # * `1` represents dimensionless value 1, such as in `1/s`.
2551
+ # * `%` represents dimensionless value 1/100, and annotates values giving
2552
+ # a percentage.
2553
+ # Corresponds to the JSON property `unit`
2554
+ # @return [String]
2555
+ attr_accessor :unit
2556
+
2557
+ # Whether the measurement is an integer, a floating-point number, etc.
2558
+ # Some combinations of `metric_kind` and `value_type` might not be supported.
2559
+ # Corresponds to the JSON property `valueType`
2560
+ # @return [String]
2561
+ attr_accessor :value_type
2562
+
2563
+ def initialize(**args)
2564
+ update!(**args)
2565
+ end
2566
+
2567
+ # Update properties of this object
2568
+ def update!(**args)
2569
+ @description = args[:description] if args.key?(:description)
2570
+ @display_name = args[:display_name] if args.key?(:display_name)
2571
+ @labels = args[:labels] if args.key?(:labels)
2572
+ @metric_kind = args[:metric_kind] if args.key?(:metric_kind)
2573
+ @name = args[:name] if args.key?(:name)
2574
+ @type = args[:type] if args.key?(:type)
2575
+ @unit = args[:unit] if args.key?(:unit)
2576
+ @value_type = args[:value_type] if args.key?(:value_type)
2577
+ end
2578
+ end
2579
+
2580
+ # Bind API methods to metrics. Binding a method to a metric causes that
2581
+ # metric's configured quota behaviors to apply to the method call.
2582
+ class MetricRule
2583
+ include Google::Apis::Core::Hashable
2584
+
2585
+ # Metrics to update when the selected methods are called, and the associated
2586
+ # cost applied to each metric.
2587
+ # The key of the map is the metric name, and the values are the amount
2588
+ # increased for the metric against which the quota limits are defined.
2589
+ # The value must not be negative.
2590
+ # Corresponds to the JSON property `metricCosts`
2591
+ # @return [Hash<String,Fixnum>]
2592
+ attr_accessor :metric_costs
2593
+
2594
+ # Selects the methods to which this rule applies.
2595
+ # Refer to selector for syntax details.
2596
+ # Corresponds to the JSON property `selector`
2597
+ # @return [String]
2598
+ attr_accessor :selector
2599
+
2600
+ def initialize(**args)
2601
+ update!(**args)
2602
+ end
2603
+
2604
+ # Update properties of this object
2605
+ def update!(**args)
2606
+ @metric_costs = args[:metric_costs] if args.key?(:metric_costs)
2607
+ @selector = args[:selector] if args.key?(:selector)
2608
+ end
2609
+ end
2610
+
2611
+ # Declares an API Interface to be included in this interface. The including
2612
+ # interface must redeclare all the methods from the included interface, but
2613
+ # documentation and options are inherited as follows:
2614
+ # - If after comment and whitespace stripping, the documentation
2615
+ # string of the redeclared method is empty, it will be inherited
2616
+ # from the original method.
2617
+ # - Each annotation belonging to the service config (http,
2618
+ # visibility) which is not set in the redeclared method will be
2619
+ # inherited.
2620
+ # - If an http annotation is inherited, the path pattern will be
2621
+ # modified as follows. Any version prefix will be replaced by the
2622
+ # version of the including interface plus the root path if
2623
+ # specified.
2624
+ # Example of a simple mixin:
2625
+ # package google.acl.v1;
2626
+ # service AccessControl `
2627
+ # // Get the underlying ACL object.
2628
+ # rpc GetAcl(GetAclRequest) returns (Acl) `
2629
+ # option (google.api.http).get = "/v1/`resource=**`:getAcl";
2630
+ # `
2631
+ # `
2632
+ # package google.storage.v2;
2633
+ # service Storage `
2634
+ # // rpc GetAcl(GetAclRequest) returns (Acl);
2635
+ # // Get a data record.
2636
+ # rpc GetData(GetDataRequest) returns (Data) `
2637
+ # option (google.api.http).get = "/v2/`resource=**`";
2638
+ # `
2639
+ # `
2640
+ # Example of a mixin configuration:
2641
+ # apis:
2642
+ # - name: google.storage.v2.Storage
2643
+ # mixins:
2644
+ # - name: google.acl.v1.AccessControl
2645
+ # The mixin construct implies that all methods in `AccessControl` are
2646
+ # also declared with same name and request/response types in
2647
+ # `Storage`. A documentation generator or annotation processor will
2648
+ # see the effective `Storage.GetAcl` method after inherting
2649
+ # documentation and annotations as follows:
2650
+ # service Storage `
2651
+ # // Get the underlying ACL object.
2652
+ # rpc GetAcl(GetAclRequest) returns (Acl) `
2653
+ # option (google.api.http).get = "/v2/`resource=**`:getAcl";
2654
+ # `
2655
+ # ...
2656
+ # `
2657
+ # Note how the version in the path pattern changed from `v1` to `v2`.
2658
+ # If the `root` field in the mixin is specified, it should be a
2659
+ # relative path under which inherited HTTP paths are placed. Example:
2660
+ # apis:
2661
+ # - name: google.storage.v2.Storage
2662
+ # mixins:
2663
+ # - name: google.acl.v1.AccessControl
2664
+ # root: acls
2665
+ # This implies the following inherited HTTP annotation:
2666
+ # service Storage `
2667
+ # // Get the underlying ACL object.
2668
+ # rpc GetAcl(GetAclRequest) returns (Acl) `
2669
+ # option (google.api.http).get = "/v2/acls/`resource=**`:getAcl";
2670
+ # `
2671
+ # ...
2672
+ # `
2673
+ class Mixin
2674
+ include Google::Apis::Core::Hashable
2675
+
2676
+ # The fully qualified name of the interface which is included.
2677
+ # Corresponds to the JSON property `name`
2678
+ # @return [String]
2679
+ attr_accessor :name
2680
+
2681
+ # If non-empty specifies a path under which inherited HTTP paths
2682
+ # are rooted.
2683
+ # Corresponds to the JSON property `root`
2684
+ # @return [String]
2685
+ attr_accessor :root
2686
+
2687
+ def initialize(**args)
2688
+ update!(**args)
2689
+ end
2690
+
2691
+ # Update properties of this object
2692
+ def update!(**args)
2693
+ @name = args[:name] if args.key?(:name)
2694
+ @root = args[:root] if args.key?(:root)
2695
+ end
2696
+ end
2697
+
2698
+ # An object that describes the schema of a MonitoredResource object using a
2699
+ # type name and a set of labels. For example, the monitored resource
2700
+ # descriptor for Google Compute Engine VM instances has a type of
2701
+ # `"gce_instance"` and specifies the use of the labels `"instance_id"` and
2702
+ # `"zone"` to identify particular VM instances.
2703
+ # Different APIs can support different monitored resource types. APIs generally
2704
+ # provide a `list` method that returns the monitored resource descriptors used
2705
+ # by the API.
2706
+ class MonitoredResourceDescriptor
2707
+ include Google::Apis::Core::Hashable
2708
+
2709
+ # Optional. A detailed description of the monitored resource type that might
2710
+ # be used in documentation.
2711
+ # Corresponds to the JSON property `description`
2712
+ # @return [String]
2713
+ attr_accessor :description
2714
+
2715
+ # Optional. A concise name for the monitored resource type that might be
2716
+ # displayed in user interfaces. It should be a Title Cased Noun Phrase,
2717
+ # without any article or other determiners. For example,
2718
+ # `"Google Cloud SQL Database"`.
2719
+ # Corresponds to the JSON property `displayName`
2720
+ # @return [String]
2721
+ attr_accessor :display_name
2722
+
2723
+ # Required. A set of labels used to describe instances of this monitored
2724
+ # resource type. For example, an individual Google Cloud SQL database is
2725
+ # identified by values for the labels `"database_id"` and `"zone"`.
2726
+ # Corresponds to the JSON property `labels`
2727
+ # @return [Array<Google::Apis::ServiceusageV1::LabelDescriptor>]
2728
+ attr_accessor :labels
2729
+
2730
+ # Optional. The resource name of the monitored resource descriptor:
2731
+ # `"projects/`project_id`/monitoredResourceDescriptors/`type`"` where
2732
+ # `type` is the value of the `type` field in this object and
2733
+ # `project_id` is a project ID that provides API-specific context for
2734
+ # accessing the type. APIs that do not use project information can use the
2735
+ # resource name format `"monitoredResourceDescriptors/`type`"`.
2736
+ # Corresponds to the JSON property `name`
2737
+ # @return [String]
2738
+ attr_accessor :name
2739
+
2740
+ # Required. The monitored resource type. For example, the type
2741
+ # `"cloudsql_database"` represents databases in Google Cloud SQL.
2742
+ # The maximum length of this value is 256 characters.
2743
+ # Corresponds to the JSON property `type`
2744
+ # @return [String]
2745
+ attr_accessor :type
2746
+
2747
+ def initialize(**args)
2748
+ update!(**args)
2749
+ end
2750
+
2751
+ # Update properties of this object
2752
+ def update!(**args)
2753
+ @description = args[:description] if args.key?(:description)
2754
+ @display_name = args[:display_name] if args.key?(:display_name)
2755
+ @labels = args[:labels] if args.key?(:labels)
2756
+ @name = args[:name] if args.key?(:name)
2757
+ @type = args[:type] if args.key?(:type)
2758
+ end
2759
+ end
2760
+
2761
+ # Monitoring configuration of the service.
2762
+ # The example below shows how to configure monitored resources and metrics
2763
+ # for monitoring. In the example, a monitored resource and two metrics are
2764
+ # defined. The `library.googleapis.com/book/returned_count` metric is sent
2765
+ # to both producer and consumer projects, whereas the
2766
+ # `library.googleapis.com/book/overdue_count` metric is only sent to the
2767
+ # consumer project.
2768
+ # monitored_resources:
2769
+ # - type: library.googleapis.com/branch
2770
+ # labels:
2771
+ # - key: /city
2772
+ # description: The city where the library branch is located in.
2773
+ # - key: /name
2774
+ # description: The name of the branch.
2775
+ # metrics:
2776
+ # - name: library.googleapis.com/book/returned_count
2777
+ # metric_kind: DELTA
2778
+ # value_type: INT64
2779
+ # labels:
2780
+ # - key: /customer_id
2781
+ # - name: library.googleapis.com/book/overdue_count
2782
+ # metric_kind: GAUGE
2783
+ # value_type: INT64
2784
+ # labels:
2785
+ # - key: /customer_id
2786
+ # monitoring:
2787
+ # producer_destinations:
2788
+ # - monitored_resource: library.googleapis.com/branch
2789
+ # metrics:
2790
+ # - library.googleapis.com/book/returned_count
2791
+ # consumer_destinations:
2792
+ # - monitored_resource: library.googleapis.com/branch
2793
+ # metrics:
2794
+ # - library.googleapis.com/book/returned_count
2795
+ # - library.googleapis.com/book/overdue_count
2796
+ class Monitoring
2797
+ include Google::Apis::Core::Hashable
2798
+
2799
+ # Monitoring configurations for sending metrics to the consumer project.
2800
+ # There can be multiple consumer destinations, each one must have a
2801
+ # different monitored resource type. A metric can be used in at most
2802
+ # one consumer destination.
2803
+ # Corresponds to the JSON property `consumerDestinations`
2804
+ # @return [Array<Google::Apis::ServiceusageV1::MonitoringDestination>]
2805
+ attr_accessor :consumer_destinations
2806
+
2807
+ # Monitoring configurations for sending metrics to the producer project.
2808
+ # There can be multiple producer destinations, each one must have a
2809
+ # different monitored resource type. A metric can be used in at most
2810
+ # one producer destination.
2811
+ # Corresponds to the JSON property `producerDestinations`
2812
+ # @return [Array<Google::Apis::ServiceusageV1::MonitoringDestination>]
2813
+ attr_accessor :producer_destinations
2814
+
2815
+ def initialize(**args)
2816
+ update!(**args)
2817
+ end
2818
+
2819
+ # Update properties of this object
2820
+ def update!(**args)
2821
+ @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations)
2822
+ @producer_destinations = args[:producer_destinations] if args.key?(:producer_destinations)
2823
+ end
2824
+ end
2825
+
2826
+ # Configuration of a specific monitoring destination (the producer project
2827
+ # or the consumer project).
2828
+ class MonitoringDestination
2829
+ include Google::Apis::Core::Hashable
2830
+
2831
+ # Names of the metrics to report to this monitoring destination.
2832
+ # Each name must be defined in Service.metrics section.
2833
+ # Corresponds to the JSON property `metrics`
2834
+ # @return [Array<String>]
2835
+ attr_accessor :metrics
2836
+
2837
+ # The monitored resource type. The type must be defined in
2838
+ # Service.monitored_resources section.
2839
+ # Corresponds to the JSON property `monitoredResource`
2840
+ # @return [String]
2841
+ attr_accessor :monitored_resource
2842
+
2843
+ def initialize(**args)
2844
+ update!(**args)
2845
+ end
2846
+
2847
+ # Update properties of this object
2848
+ def update!(**args)
2849
+ @metrics = args[:metrics] if args.key?(:metrics)
2850
+ @monitored_resource = args[:monitored_resource] if args.key?(:monitored_resource)
2851
+ end
2852
+ end
2853
+
2854
+ # OAuth scopes are a way to define data and permissions on data. For example,
2855
+ # there are scopes defined for "Read-only access to Google Calendar" and
2856
+ # "Access to Cloud Platform". Users can consent to a scope for an application,
2857
+ # giving it permission to access that data on their behalf.
2858
+ # OAuth scope specifications should be fairly coarse grained; a user will need
2859
+ # to see and understand the text description of what your scope means.
2860
+ # In most cases: use one or at most two OAuth scopes for an entire family of
2861
+ # products. If your product has multiple APIs, you should probably be sharing
2862
+ # the OAuth scope across all of those APIs.
2863
+ # When you need finer grained OAuth consent screens: talk with your product
2864
+ # management about how developers will use them in practice.
2865
+ # Please note that even though each of the canonical scopes is enough for a
2866
+ # request to be accepted and passed to the backend, a request can still fail
2867
+ # due to the backend requiring additional scopes or permissions.
2868
+ class OAuthRequirements
2869
+ include Google::Apis::Core::Hashable
2870
+
2871
+ # The list of publicly documented OAuth scopes that are allowed access. An
2872
+ # OAuth token containing any of these scopes will be accepted.
2873
+ # Example:
2874
+ # canonical_scopes: https://www.googleapis.com/auth/calendar,
2875
+ # https://www.googleapis.com/auth/calendar.read
2876
+ # Corresponds to the JSON property `canonicalScopes`
2877
+ # @return [String]
2878
+ attr_accessor :canonical_scopes
2879
+
2880
+ def initialize(**args)
2881
+ update!(**args)
2882
+ end
2883
+
2884
+ # Update properties of this object
2885
+ def update!(**args)
2886
+ @canonical_scopes = args[:canonical_scopes] if args.key?(:canonical_scopes)
2887
+ end
2888
+ end
2889
+
2890
+ # This resource represents a long-running operation that is the result of a
2891
+ # network API call.
2892
+ class Operation
2893
+ include Google::Apis::Core::Hashable
2894
+
2895
+ # If the value is `false`, it means the operation is still in progress.
2896
+ # If `true`, the operation is completed, and either `error` or `response` is
2897
+ # available.
2898
+ # Corresponds to the JSON property `done`
2899
+ # @return [Boolean]
2900
+ attr_accessor :done
2901
+ alias_method :done?, :done
2902
+
2903
+ # The `Status` type defines a logical error model that is suitable for different
2904
+ # programming environments, including REST APIs and RPC APIs. It is used by
2905
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
2906
+ # - Simple to use and understand for most users
2907
+ # - Flexible enough to meet unexpected needs
2908
+ # # Overview
2909
+ # The `Status` message contains three pieces of data: error code, error message,
2910
+ # and error details. The error code should be an enum value of
2911
+ # google.rpc.Code, but it may accept additional error codes if needed. The
2912
+ # error message should be a developer-facing English message that helps
2913
+ # developers *understand* and *resolve* the error. If a localized user-facing
2914
+ # error message is needed, put the localized message in the error details or
2915
+ # localize it in the client. The optional error details may contain arbitrary
2916
+ # information about the error. There is a predefined set of error detail types
2917
+ # in the package `google.rpc` that can be used for common error conditions.
2918
+ # # Language mapping
2919
+ # The `Status` message is the logical representation of the error model, but it
2920
+ # is not necessarily the actual wire format. When the `Status` message is
2921
+ # exposed in different client libraries and different wire protocols, it can be
2922
+ # mapped differently. For example, it will likely be mapped to some exceptions
2923
+ # in Java, but more likely mapped to some error codes in C.
2924
+ # # Other uses
2925
+ # The error model and the `Status` message can be used in a variety of
2926
+ # environments, either with or without APIs, to provide a
2927
+ # consistent developer experience across different environments.
2928
+ # Example uses of this error model include:
2929
+ # - Partial errors. If a service needs to return partial errors to the client,
2930
+ # it may embed the `Status` in the normal response to indicate the partial
2931
+ # errors.
2932
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
2933
+ # have a `Status` message for error reporting.
2934
+ # - Batch operations. If a client uses batch request and batch response, the
2935
+ # `Status` message should be used directly inside batch response, one for
2936
+ # each error sub-response.
2937
+ # - Asynchronous operations. If an API call embeds asynchronous operation
2938
+ # results in its response, the status of those operations should be
2939
+ # represented directly using the `Status` message.
2940
+ # - Logging. If some API errors are stored in logs, the message `Status` could
2941
+ # be used directly after any stripping needed for security/privacy reasons.
2942
+ # Corresponds to the JSON property `error`
2943
+ # @return [Google::Apis::ServiceusageV1::Status]
2944
+ attr_accessor :error
2945
+
2946
+ # Service-specific metadata associated with the operation. It typically
2947
+ # contains progress information and common metadata such as create time.
2948
+ # Some services might not provide such metadata. Any method that returns a
2949
+ # long-running operation should document the metadata type, if any.
2950
+ # Corresponds to the JSON property `metadata`
2951
+ # @return [Hash<String,Object>]
2952
+ attr_accessor :metadata
2953
+
2954
+ # The server-assigned name, which is only unique within the same service that
2955
+ # originally returns it. If you use the default HTTP mapping, the
2956
+ # `name` should have the format of `operations/some/unique/name`.
2957
+ # Corresponds to the JSON property `name`
2958
+ # @return [String]
2959
+ attr_accessor :name
2960
+
2961
+ # The normal response of the operation in case of success. If the original
2962
+ # method returns no data on success, such as `Delete`, the response is
2963
+ # `google.protobuf.Empty`. If the original method is standard
2964
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
2965
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
2966
+ # is the original method name. For example, if the original method name
2967
+ # is `TakeSnapshot()`, the inferred response type is
2968
+ # `TakeSnapshotResponse`.
2969
+ # Corresponds to the JSON property `response`
2970
+ # @return [Hash<String,Object>]
2971
+ attr_accessor :response
2972
+
2973
+ def initialize(**args)
2974
+ update!(**args)
2975
+ end
2976
+
2977
+ # Update properties of this object
2978
+ def update!(**args)
2979
+ @done = args[:done] if args.key?(:done)
2980
+ @error = args[:error] if args.key?(:error)
2981
+ @metadata = args[:metadata] if args.key?(:metadata)
2982
+ @name = args[:name] if args.key?(:name)
2983
+ @response = args[:response] if args.key?(:response)
2984
+ end
2985
+ end
2986
+
2987
+ # The metadata associated with a long running operation resource.
2988
+ class OperationMetadata
2989
+ include Google::Apis::Core::Hashable
2990
+
2991
+ # Percentage of completion of this operation, ranging from 0 to 100.
2992
+ # Corresponds to the JSON property `progressPercentage`
2993
+ # @return [Fixnum]
2994
+ attr_accessor :progress_percentage
2995
+
2996
+ # The full name of the resources that this operation is directly
2997
+ # associated with.
2998
+ # Corresponds to the JSON property `resourceNames`
2999
+ # @return [Array<String>]
3000
+ attr_accessor :resource_names
3001
+
3002
+ # The start time of the operation.
3003
+ # Corresponds to the JSON property `startTime`
3004
+ # @return [String]
3005
+ attr_accessor :start_time
3006
+
3007
+ # Detailed status information for each step. The order is undetermined.
3008
+ # Corresponds to the JSON property `steps`
3009
+ # @return [Array<Google::Apis::ServiceusageV1::Step>]
3010
+ attr_accessor :steps
3011
+
3012
+ def initialize(**args)
3013
+ update!(**args)
3014
+ end
3015
+
3016
+ # Update properties of this object
3017
+ def update!(**args)
3018
+ @progress_percentage = args[:progress_percentage] if args.key?(:progress_percentage)
3019
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
3020
+ @start_time = args[:start_time] if args.key?(:start_time)
3021
+ @steps = args[:steps] if args.key?(:steps)
3022
+ end
3023
+ end
3024
+
3025
+ # A protocol buffer option, which can be attached to a message, field,
3026
+ # enumeration, etc.
3027
+ class Option
3028
+ include Google::Apis::Core::Hashable
3029
+
3030
+ # The option's name. For protobuf built-in options (options defined in
3031
+ # descriptor.proto), this is the short name. For example, `"map_entry"`.
3032
+ # For custom options, it should be the fully-qualified name. For example,
3033
+ # `"google.api.http"`.
3034
+ # Corresponds to the JSON property `name`
3035
+ # @return [String]
3036
+ attr_accessor :name
3037
+
3038
+ # The option's value packed in an Any message. If the value is a primitive,
3039
+ # the corresponding wrapper type defined in google/protobuf/wrappers.proto
3040
+ # should be used. If the value is an enum, it should be stored as an int32
3041
+ # value using the google.protobuf.Int32Value type.
3042
+ # Corresponds to the JSON property `value`
3043
+ # @return [Hash<String,Object>]
3044
+ attr_accessor :value
3045
+
3046
+ def initialize(**args)
3047
+ update!(**args)
3048
+ end
3049
+
3050
+ # Update properties of this object
3051
+ def update!(**args)
3052
+ @name = args[:name] if args.key?(:name)
3053
+ @value = args[:value] if args.key?(:value)
3054
+ end
3055
+ end
3056
+
3057
+ # Represents a documentation page. A page can contain subpages to represent
3058
+ # nested documentation set structure.
3059
+ class Page
3060
+ include Google::Apis::Core::Hashable
3061
+
3062
+ # The Markdown content of the page. You can use <code>&#40;== include `path` ==&#
3063
+ # 41;</code>
3064
+ # to include content from a Markdown file.
3065
+ # Corresponds to the JSON property `content`
3066
+ # @return [String]
3067
+ attr_accessor :content
3068
+
3069
+ # The name of the page. It will be used as an identity of the page to
3070
+ # generate URI of the page, text of the link to this page in navigation,
3071
+ # etc. The full page name (start from the root page name to this page
3072
+ # concatenated with `.`) can be used as reference to the page in your
3073
+ # documentation. For example:
3074
+ # <pre><code>pages:
3075
+ # - name: Tutorial
3076
+ # content: &#40;== include tutorial.md ==&#41;
3077
+ # subpages:
3078
+ # - name: Java
3079
+ # content: &#40;== include tutorial_java.md ==&#41;
3080
+ # </code></pre>
3081
+ # You can reference `Java` page using Markdown reference link syntax:
3082
+ # `Java`.
3083
+ # Corresponds to the JSON property `name`
3084
+ # @return [String]
3085
+ attr_accessor :name
3086
+
3087
+ # Subpages of this page. The order of subpages specified here will be
3088
+ # honored in the generated docset.
3089
+ # Corresponds to the JSON property `subpages`
3090
+ # @return [Array<Google::Apis::ServiceusageV1::Page>]
3091
+ attr_accessor :subpages
3092
+
3093
+ def initialize(**args)
3094
+ update!(**args)
3095
+ end
3096
+
3097
+ # Update properties of this object
3098
+ def update!(**args)
3099
+ @content = args[:content] if args.key?(:content)
3100
+ @name = args[:name] if args.key?(:name)
3101
+ @subpages = args[:subpages] if args.key?(:subpages)
3102
+ end
3103
+ end
3104
+
3105
+ # The published version of a Service that is managed by
3106
+ # Google Service Management.
3107
+ class PublishedService
3108
+ include Google::Apis::Core::Hashable
3109
+
3110
+ # The resource name of the service.
3111
+ # A valid name would be:
3112
+ # - services/serviceusage.googleapis.com
3113
+ # Corresponds to the JSON property `name`
3114
+ # @return [String]
3115
+ attr_accessor :name
3116
+
3117
+ # `Service` is the root object of Google service configuration schema. It
3118
+ # describes basic information about a service, such as the name and the
3119
+ # title, and delegates other aspects to sub-sections. Each sub-section is
3120
+ # either a proto message or a repeated proto message that configures a
3121
+ # specific aspect, such as auth. See each proto message definition for details.
3122
+ # Example:
3123
+ # type: google.api.Service
3124
+ # config_version: 3
3125
+ # name: calendar.googleapis.com
3126
+ # title: Google Calendar API
3127
+ # apis:
3128
+ # - name: google.calendar.v3.Calendar
3129
+ # authentication:
3130
+ # providers:
3131
+ # - id: google_calendar_auth
3132
+ # jwks_uri: https://www.googleapis.com/oauth2/v1/certs
3133
+ # issuer: https://securetoken.google.com
3134
+ # rules:
3135
+ # - selector: "*"
3136
+ # requirements:
3137
+ # provider_id: google_calendar_auth
3138
+ # Corresponds to the JSON property `service`
3139
+ # @return [Google::Apis::ServiceusageV1::GoogleApiService]
3140
+ attr_accessor :service
3141
+
3142
+ def initialize(**args)
3143
+ update!(**args)
3144
+ end
3145
+
3146
+ # Update properties of this object
3147
+ def update!(**args)
3148
+ @name = args[:name] if args.key?(:name)
3149
+ @service = args[:service] if args.key?(:service)
3150
+ end
3151
+ end
3152
+
3153
+ # Quota configuration helps to achieve fairness and budgeting in service
3154
+ # usage.
3155
+ # The quota configuration works this way:
3156
+ # - The service configuration defines a set of metrics.
3157
+ # - For API calls, the quota.metric_rules maps methods to metrics with
3158
+ # corresponding costs.
3159
+ # - The quota.limits defines limits on the metrics, which will be used for
3160
+ # quota checks at runtime.
3161
+ # An example quota configuration in yaml format:
3162
+ # quota:
3163
+ # - name: apiWriteQpsPerProject
3164
+ # metric: library.googleapis.com/write_calls
3165
+ # unit: "1/min/`project`" # rate limit for consumer projects
3166
+ # values:
3167
+ # STANDARD: 10000
3168
+ # # The metric rules bind all methods to the read_calls metric,
3169
+ # # except for the UpdateBook and DeleteBook methods. These two methods
3170
+ # # are mapped to the write_calls metric, with the UpdateBook method
3171
+ # # consuming at twice rate as the DeleteBook method.
3172
+ # metric_rules:
3173
+ # - selector: "*"
3174
+ # metric_costs:
3175
+ # library.googleapis.com/read_calls: 1
3176
+ # - selector: google.example.library.v1.LibraryService.UpdateBook
3177
+ # metric_costs:
3178
+ # library.googleapis.com/write_calls: 2
3179
+ # - selector: google.example.library.v1.LibraryService.DeleteBook
3180
+ # metric_costs:
3181
+ # library.googleapis.com/write_calls: 1
3182
+ # Corresponding Metric definition:
3183
+ # metrics:
3184
+ # - name: library.googleapis.com/read_calls
3185
+ # display_name: Read requests
3186
+ # metric_kind: DELTA
3187
+ # value_type: INT64
3188
+ # - name: library.googleapis.com/write_calls
3189
+ # display_name: Write requests
3190
+ # metric_kind: DELTA
3191
+ # value_type: INT64
3192
+ class Quota
3193
+ include Google::Apis::Core::Hashable
3194
+
3195
+ # List of `QuotaLimit` definitions for the service.
3196
+ # Corresponds to the JSON property `limits`
3197
+ # @return [Array<Google::Apis::ServiceusageV1::QuotaLimit>]
3198
+ attr_accessor :limits
3199
+
3200
+ # List of `MetricRule` definitions, each one mapping a selected method to one
3201
+ # or more metrics.
3202
+ # Corresponds to the JSON property `metricRules`
3203
+ # @return [Array<Google::Apis::ServiceusageV1::MetricRule>]
3204
+ attr_accessor :metric_rules
3205
+
3206
+ def initialize(**args)
3207
+ update!(**args)
3208
+ end
3209
+
3210
+ # Update properties of this object
3211
+ def update!(**args)
3212
+ @limits = args[:limits] if args.key?(:limits)
3213
+ @metric_rules = args[:metric_rules] if args.key?(:metric_rules)
3214
+ end
3215
+ end
3216
+
3217
+ # `QuotaLimit` defines a specific limit that applies over a specified duration
3218
+ # for a limit type. There can be at most one limit for a duration and limit
3219
+ # type combination defined within a `QuotaGroup`.
3220
+ class QuotaLimit
3221
+ include Google::Apis::Core::Hashable
3222
+
3223
+ # Default number of tokens that can be consumed during the specified
3224
+ # duration. This is the number of tokens assigned when a client
3225
+ # application developer activates the service for his/her project.
3226
+ # Specifying a value of 0 will block all requests. This can be used if you
3227
+ # are provisioning quota to selected consumers and blocking others.
3228
+ # Similarly, a value of -1 will indicate an unlimited quota. No other
3229
+ # negative values are allowed.
3230
+ # Used by group-based quotas only.
3231
+ # Corresponds to the JSON property `defaultLimit`
3232
+ # @return [Fixnum]
3233
+ attr_accessor :default_limit
3234
+
3235
+ # Optional. User-visible, extended description for this quota limit.
3236
+ # Should be used only when more context is needed to understand this limit
3237
+ # than provided by the limit's display name (see: `display_name`).
3238
+ # Corresponds to the JSON property `description`
3239
+ # @return [String]
3240
+ attr_accessor :description
3241
+
3242
+ # User-visible display name for this limit.
3243
+ # Optional. If not set, the UI will provide a default display name based on
3244
+ # the quota configuration. This field can be used to override the default
3245
+ # display name generated from the configuration.
3246
+ # Corresponds to the JSON property `displayName`
3247
+ # @return [String]
3248
+ attr_accessor :display_name
3249
+
3250
+ # Duration of this limit in textual notation. Example: "100s", "24h", "1d".
3251
+ # For duration longer than a day, only multiple of days is supported. We
3252
+ # support only "100s" and "1d" for now. Additional support will be added in
3253
+ # the future. "0" indicates indefinite duration.
3254
+ # Used by group-based quotas only.
3255
+ # Corresponds to the JSON property `duration`
3256
+ # @return [String]
3257
+ attr_accessor :duration
3258
+
3259
+ # Free tier value displayed in the Developers Console for this limit.
3260
+ # The free tier is the number of tokens that will be subtracted from the
3261
+ # billed amount when billing is enabled.
3262
+ # This field can only be set on a limit with duration "1d", in a billable
3263
+ # group; it is invalid on any other limit. If this field is not set, it
3264
+ # defaults to 0, indicating that there is no free tier for this service.
3265
+ # Used by group-based quotas only.
3266
+ # Corresponds to the JSON property `freeTier`
3267
+ # @return [Fixnum]
3268
+ attr_accessor :free_tier
3269
+
3270
+ # Maximum number of tokens that can be consumed during the specified
3271
+ # duration. Client application developers can override the default limit up
3272
+ # to this maximum. If specified, this value cannot be set to a value less
3273
+ # than the default limit. If not specified, it is set to the default limit.
3274
+ # To allow clients to apply overrides with no upper bound, set this to -1,
3275
+ # indicating unlimited maximum quota.
3276
+ # Used by group-based quotas only.
3277
+ # Corresponds to the JSON property `maxLimit`
3278
+ # @return [Fixnum]
3279
+ attr_accessor :max_limit
3280
+
3281
+ # The name of the metric this quota limit applies to. The quota limits with
3282
+ # the same metric will be checked together during runtime. The metric must be
3283
+ # defined within the service config.
3284
+ # Corresponds to the JSON property `metric`
3285
+ # @return [String]
3286
+ attr_accessor :metric
3287
+
3288
+ # Name of the quota limit.
3289
+ # The name must be provided, and it must be unique within the service. The
3290
+ # name can only include alphanumeric characters as well as '-'.
3291
+ # The maximum length of the limit name is 64 characters.
3292
+ # Corresponds to the JSON property `name`
3293
+ # @return [String]
3294
+ attr_accessor :name
3295
+
3296
+ # Specify the unit of the quota limit. It uses the same syntax as
3297
+ # Metric.unit. The supported unit kinds are determined by the quota
3298
+ # backend system.
3299
+ # Here are some examples:
3300
+ # * "1/min/`project`" for quota per minute per project.
3301
+ # Note: the order of unit components is insignificant.
3302
+ # The "1" at the beginning is required to follow the metric unit syntax.
3303
+ # Corresponds to the JSON property `unit`
3304
+ # @return [String]
3305
+ attr_accessor :unit
3306
+
3307
+ # Tiered limit values. You must specify this as a key:value pair, with an
3308
+ # integer value that is the maximum number of requests allowed for the
3309
+ # specified unit. Currently only STANDARD is supported.
3310
+ # Corresponds to the JSON property `values`
3311
+ # @return [Hash<String,Fixnum>]
3312
+ attr_accessor :values
3313
+
3314
+ def initialize(**args)
3315
+ update!(**args)
3316
+ end
3317
+
3318
+ # Update properties of this object
3319
+ def update!(**args)
3320
+ @default_limit = args[:default_limit] if args.key?(:default_limit)
3321
+ @description = args[:description] if args.key?(:description)
3322
+ @display_name = args[:display_name] if args.key?(:display_name)
3323
+ @duration = args[:duration] if args.key?(:duration)
3324
+ @free_tier = args[:free_tier] if args.key?(:free_tier)
3325
+ @max_limit = args[:max_limit] if args.key?(:max_limit)
3326
+ @metric = args[:metric] if args.key?(:metric)
3327
+ @name = args[:name] if args.key?(:name)
3328
+ @unit = args[:unit] if args.key?(:unit)
3329
+ @values = args[:values] if args.key?(:values)
3330
+ end
3331
+ end
3332
+
3333
+ # Response message for SearchServices.
3334
+ class SearchServicesResponse
3335
+ include Google::Apis::Core::Hashable
3336
+
3337
+ # Token that can be passed to `SearchServices` to resume a paginated query.
3338
+ # Corresponds to the JSON property `nextPageToken`
3339
+ # @return [String]
3340
+ attr_accessor :next_page_token
3341
+
3342
+ # The state of services available publicly or available to the authenticated
3343
+ # caller.
3344
+ # Corresponds to the JSON property `services`
3345
+ # @return [Array<Google::Apis::ServiceusageV1::PublishedService>]
3346
+ attr_accessor :services
3347
+
3348
+ def initialize(**args)
3349
+ update!(**args)
3350
+ end
3351
+
3352
+ # Update properties of this object
3353
+ def update!(**args)
3354
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
3355
+ @services = args[:services] if args.key?(:services)
3356
+ end
3357
+ end
3358
+
3359
+ # The properties of a consumer with respect to a Service.
3360
+ class ServiceState
3361
+ include Google::Apis::Core::Hashable
3362
+
3363
+ # The EnabledState reflects whether the service has been explicitly enabled or
3364
+ # not.
3365
+ # Corresponds to the JSON property `enabled`
3366
+ # @return [Google::Apis::ServiceusageV1::EnabledState]
3367
+ attr_accessor :enabled
3368
+
3369
+ # The resource name of the consumer and service.
3370
+ # A valid name would be:
3371
+ # - projects/123/services/serviceusage.googleapis.com
3372
+ # Corresponds to the JSON property `name`
3373
+ # @return [String]
3374
+ attr_accessor :name
3375
+
3376
+ # The published version of a Service that is managed by
3377
+ # Google Service Management.
3378
+ # Corresponds to the JSON property `service`
3379
+ # @return [Google::Apis::ServiceusageV1::PublishedService]
3380
+ attr_accessor :service
3381
+
3382
+ def initialize(**args)
3383
+ update!(**args)
3384
+ end
3385
+
3386
+ # Update properties of this object
3387
+ def update!(**args)
3388
+ @enabled = args[:enabled] if args.key?(:enabled)
3389
+ @name = args[:name] if args.key?(:name)
3390
+ @service = args[:service] if args.key?(:service)
3391
+ end
3392
+ end
3393
+
3394
+ # `SourceContext` represents information about the source of a
3395
+ # protobuf element, like the file in which it is defined.
3396
+ class SourceContext
3397
+ include Google::Apis::Core::Hashable
3398
+
3399
+ # The path-qualified name of the .proto file that contained the associated
3400
+ # protobuf element. For example: `"google/protobuf/source_context.proto"`.
3401
+ # Corresponds to the JSON property `fileName`
3402
+ # @return [String]
3403
+ attr_accessor :file_name
3404
+
3405
+ def initialize(**args)
3406
+ update!(**args)
3407
+ end
3408
+
3409
+ # Update properties of this object
3410
+ def update!(**args)
3411
+ @file_name = args[:file_name] if args.key?(:file_name)
3412
+ end
3413
+ end
3414
+
3415
+ # Source information used to create a Service Config
3416
+ class SourceInfo
3417
+ include Google::Apis::Core::Hashable
3418
+
3419
+ # All files used during config generation.
3420
+ # Corresponds to the JSON property `sourceFiles`
3421
+ # @return [Array<Hash<String,Object>>]
3422
+ attr_accessor :source_files
3423
+
3424
+ def initialize(**args)
3425
+ update!(**args)
3426
+ end
3427
+
3428
+ # Update properties of this object
3429
+ def update!(**args)
3430
+ @source_files = args[:source_files] if args.key?(:source_files)
3431
+ end
3432
+ end
3433
+
3434
+ # The `Status` type defines a logical error model that is suitable for different
3435
+ # programming environments, including REST APIs and RPC APIs. It is used by
3436
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
3437
+ # - Simple to use and understand for most users
3438
+ # - Flexible enough to meet unexpected needs
3439
+ # # Overview
3440
+ # The `Status` message contains three pieces of data: error code, error message,
3441
+ # and error details. The error code should be an enum value of
3442
+ # google.rpc.Code, but it may accept additional error codes if needed. The
3443
+ # error message should be a developer-facing English message that helps
3444
+ # developers *understand* and *resolve* the error. If a localized user-facing
3445
+ # error message is needed, put the localized message in the error details or
3446
+ # localize it in the client. The optional error details may contain arbitrary
3447
+ # information about the error. There is a predefined set of error detail types
3448
+ # in the package `google.rpc` that can be used for common error conditions.
3449
+ # # Language mapping
3450
+ # The `Status` message is the logical representation of the error model, but it
3451
+ # is not necessarily the actual wire format. When the `Status` message is
3452
+ # exposed in different client libraries and different wire protocols, it can be
3453
+ # mapped differently. For example, it will likely be mapped to some exceptions
3454
+ # in Java, but more likely mapped to some error codes in C.
3455
+ # # Other uses
3456
+ # The error model and the `Status` message can be used in a variety of
3457
+ # environments, either with or without APIs, to provide a
3458
+ # consistent developer experience across different environments.
3459
+ # Example uses of this error model include:
3460
+ # - Partial errors. If a service needs to return partial errors to the client,
3461
+ # it may embed the `Status` in the normal response to indicate the partial
3462
+ # errors.
3463
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
3464
+ # have a `Status` message for error reporting.
3465
+ # - Batch operations. If a client uses batch request and batch response, the
3466
+ # `Status` message should be used directly inside batch response, one for
3467
+ # each error sub-response.
3468
+ # - Asynchronous operations. If an API call embeds asynchronous operation
3469
+ # results in its response, the status of those operations should be
3470
+ # represented directly using the `Status` message.
3471
+ # - Logging. If some API errors are stored in logs, the message `Status` could
3472
+ # be used directly after any stripping needed for security/privacy reasons.
3473
+ class Status
3474
+ include Google::Apis::Core::Hashable
3475
+
3476
+ # The status code, which should be an enum value of google.rpc.Code.
3477
+ # Corresponds to the JSON property `code`
3478
+ # @return [Fixnum]
3479
+ attr_accessor :code
3480
+
3481
+ # A list of messages that carry the error details. There is a common set of
3482
+ # message types for APIs to use.
3483
+ # Corresponds to the JSON property `details`
3484
+ # @return [Array<Hash<String,Object>>]
3485
+ attr_accessor :details
3486
+
3487
+ # A developer-facing error message, which should be in English. Any
3488
+ # user-facing error message should be localized and sent in the
3489
+ # google.rpc.Status.details field, or localized by the client.
3490
+ # Corresponds to the JSON property `message`
3491
+ # @return [String]
3492
+ attr_accessor :message
3493
+
3494
+ def initialize(**args)
3495
+ update!(**args)
3496
+ end
3497
+
3498
+ # Update properties of this object
3499
+ def update!(**args)
3500
+ @code = args[:code] if args.key?(:code)
3501
+ @details = args[:details] if args.key?(:details)
3502
+ @message = args[:message] if args.key?(:message)
3503
+ end
3504
+ end
3505
+
3506
+ # Represents the status of one operation step.
3507
+ class Step
3508
+ include Google::Apis::Core::Hashable
3509
+
3510
+ # The short description of the step.
3511
+ # Corresponds to the JSON property `description`
3512
+ # @return [String]
3513
+ attr_accessor :description
3514
+
3515
+ # The status code.
3516
+ # Corresponds to the JSON property `status`
3517
+ # @return [String]
3518
+ attr_accessor :status
3519
+
3520
+ def initialize(**args)
3521
+ update!(**args)
3522
+ end
3523
+
3524
+ # Update properties of this object
3525
+ def update!(**args)
3526
+ @description = args[:description] if args.key?(:description)
3527
+ @status = args[:status] if args.key?(:status)
3528
+ end
3529
+ end
3530
+
3531
+ # Define a parameter's name and location. The parameter may be passed as either
3532
+ # an HTTP header or a URL query parameter, and if both are passed the behavior
3533
+ # is implementation-dependent.
3534
+ class SystemParameter
3535
+ include Google::Apis::Core::Hashable
3536
+
3537
+ # Define the HTTP header name to use for the parameter. It is case
3538
+ # insensitive.
3539
+ # Corresponds to the JSON property `httpHeader`
3540
+ # @return [String]
3541
+ attr_accessor :http_header
3542
+
3543
+ # Define the name of the parameter, such as "api_key" . It is case sensitive.
3544
+ # Corresponds to the JSON property `name`
3545
+ # @return [String]
3546
+ attr_accessor :name
3547
+
3548
+ # Define the URL query parameter name to use for the parameter. It is case
3549
+ # sensitive.
3550
+ # Corresponds to the JSON property `urlQueryParameter`
3551
+ # @return [String]
3552
+ attr_accessor :url_query_parameter
3553
+
3554
+ def initialize(**args)
3555
+ update!(**args)
3556
+ end
3557
+
3558
+ # Update properties of this object
3559
+ def update!(**args)
3560
+ @http_header = args[:http_header] if args.key?(:http_header)
3561
+ @name = args[:name] if args.key?(:name)
3562
+ @url_query_parameter = args[:url_query_parameter] if args.key?(:url_query_parameter)
3563
+ end
3564
+ end
3565
+
3566
+ # Define a system parameter rule mapping system parameter definitions to
3567
+ # methods.
3568
+ class SystemParameterRule
3569
+ include Google::Apis::Core::Hashable
3570
+
3571
+ # Define parameters. Multiple names may be defined for a parameter.
3572
+ # For a given method call, only one of them should be used. If multiple
3573
+ # names are used the behavior is implementation-dependent.
3574
+ # If none of the specified names are present the behavior is
3575
+ # parameter-dependent.
3576
+ # Corresponds to the JSON property `parameters`
3577
+ # @return [Array<Google::Apis::ServiceusageV1::SystemParameter>]
3578
+ attr_accessor :parameters
3579
+
3580
+ # Selects the methods to which this rule applies. Use '*' to indicate all
3581
+ # methods in all APIs.
3582
+ # Refer to selector for syntax details.
3583
+ # Corresponds to the JSON property `selector`
3584
+ # @return [String]
3585
+ attr_accessor :selector
3586
+
3587
+ def initialize(**args)
3588
+ update!(**args)
3589
+ end
3590
+
3591
+ # Update properties of this object
3592
+ def update!(**args)
3593
+ @parameters = args[:parameters] if args.key?(:parameters)
3594
+ @selector = args[:selector] if args.key?(:selector)
3595
+ end
3596
+ end
3597
+
3598
+ # ### System parameter configuration
3599
+ # A system parameter is a special kind of parameter defined by the API
3600
+ # system, not by an individual API. It is typically mapped to an HTTP header
3601
+ # and/or a URL query parameter. This configuration specifies which methods
3602
+ # change the names of the system parameters.
3603
+ class SystemParameters
3604
+ include Google::Apis::Core::Hashable
3605
+
3606
+ # Define system parameters.
3607
+ # The parameters defined here will override the default parameters
3608
+ # implemented by the system. If this field is missing from the service
3609
+ # config, default system parameters will be used. Default system parameters
3610
+ # and names is implementation-dependent.
3611
+ # Example: define api key for all methods
3612
+ # system_parameters
3613
+ # rules:
3614
+ # - selector: "*"
3615
+ # parameters:
3616
+ # - name: api_key
3617
+ # url_query_parameter: api_key
3618
+ # Example: define 2 api key names for a specific method.
3619
+ # system_parameters
3620
+ # rules:
3621
+ # - selector: "/ListShelves"
3622
+ # parameters:
3623
+ # - name: api_key
3624
+ # http_header: Api-Key1
3625
+ # - name: api_key
3626
+ # http_header: Api-Key2
3627
+ # **NOTE:** All service configuration rules follow "last one wins" order.
3628
+ # Corresponds to the JSON property `rules`
3629
+ # @return [Array<Google::Apis::ServiceusageV1::SystemParameterRule>]
3630
+ attr_accessor :rules
3631
+
3632
+ def initialize(**args)
3633
+ update!(**args)
3634
+ end
3635
+
3636
+ # Update properties of this object
3637
+ def update!(**args)
3638
+ @rules = args[:rules] if args.key?(:rules)
3639
+ end
3640
+ end
3641
+
3642
+ # A protocol buffer message type.
3643
+ class Type
3644
+ include Google::Apis::Core::Hashable
3645
+
3646
+ # The list of fields.
3647
+ # Corresponds to the JSON property `fields`
3648
+ # @return [Array<Google::Apis::ServiceusageV1::Field>]
3649
+ attr_accessor :fields
3650
+
3651
+ # The fully qualified message name.
3652
+ # Corresponds to the JSON property `name`
3653
+ # @return [String]
3654
+ attr_accessor :name
3655
+
3656
+ # The list of types appearing in `oneof` definitions in this type.
3657
+ # Corresponds to the JSON property `oneofs`
3658
+ # @return [Array<String>]
3659
+ attr_accessor :oneofs
3660
+
3661
+ # The protocol buffer options.
3662
+ # Corresponds to the JSON property `options`
3663
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
3664
+ attr_accessor :options
3665
+
3666
+ # `SourceContext` represents information about the source of a
3667
+ # protobuf element, like the file in which it is defined.
3668
+ # Corresponds to the JSON property `sourceContext`
3669
+ # @return [Google::Apis::ServiceusageV1::SourceContext]
3670
+ attr_accessor :source_context
3671
+
3672
+ # The source syntax.
3673
+ # Corresponds to the JSON property `syntax`
3674
+ # @return [String]
3675
+ attr_accessor :syntax
3676
+
3677
+ def initialize(**args)
3678
+ update!(**args)
3679
+ end
3680
+
3681
+ # Update properties of this object
3682
+ def update!(**args)
3683
+ @fields = args[:fields] if args.key?(:fields)
3684
+ @name = args[:name] if args.key?(:name)
3685
+ @oneofs = args[:oneofs] if args.key?(:oneofs)
3686
+ @options = args[:options] if args.key?(:options)
3687
+ @source_context = args[:source_context] if args.key?(:source_context)
3688
+ @syntax = args[:syntax] if args.key?(:syntax)
3689
+ end
3690
+ end
3691
+
3692
+ # Configuration controlling usage of a service.
3693
+ class Usage
3694
+ include Google::Apis::Core::Hashable
3695
+
3696
+ # The full resource name of a channel used for sending notifications to the
3697
+ # service producer.
3698
+ # Google Service Management currently only supports
3699
+ # [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
3700
+ # channel. To use Google Cloud Pub/Sub as the channel, this must be the name
3701
+ # of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
3702
+ # documented in https://cloud.google.com/pubsub/docs/overview.
3703
+ # Corresponds to the JSON property `producerNotificationChannel`
3704
+ # @return [String]
3705
+ attr_accessor :producer_notification_channel
3706
+
3707
+ # Requirements that must be satisfied before a consumer project can use the
3708
+ # service. Each requirement is of the form <service.name>/<requirement-id>;
3709
+ # for example 'serviceusage.googleapis.com/billing-enabled'.
3710
+ # Corresponds to the JSON property `requirements`
3711
+ # @return [Array<String>]
3712
+ attr_accessor :requirements
3713
+
3714
+ # A list of usage rules that apply to individual API methods.
3715
+ # **NOTE:** All service configuration rules follow "last one wins" order.
3716
+ # Corresponds to the JSON property `rules`
3717
+ # @return [Array<Google::Apis::ServiceusageV1::UsageRule>]
3718
+ attr_accessor :rules
3719
+
3720
+ def initialize(**args)
3721
+ update!(**args)
3722
+ end
3723
+
3724
+ # Update properties of this object
3725
+ def update!(**args)
3726
+ @producer_notification_channel = args[:producer_notification_channel] if args.key?(:producer_notification_channel)
3727
+ @requirements = args[:requirements] if args.key?(:requirements)
3728
+ @rules = args[:rules] if args.key?(:rules)
3729
+ end
3730
+ end
3731
+
3732
+ # Usage configuration rules for the service.
3733
+ # NOTE: Under development.
3734
+ # Use this rule to configure unregistered calls for the service. Unregistered
3735
+ # calls are calls that do not contain consumer project identity.
3736
+ # (Example: calls that do not contain an API key).
3737
+ # By default, API methods do not allow unregistered calls, and each method call
3738
+ # must be identified by a consumer project identity. Use this rule to
3739
+ # allow/disallow unregistered calls.
3740
+ # Example of an API that wants to allow unregistered calls for entire service.
3741
+ # usage:
3742
+ # rules:
3743
+ # - selector: "*"
3744
+ # allow_unregistered_calls: true
3745
+ # Example of a method that wants to allow unregistered calls.
3746
+ # usage:
3747
+ # rules:
3748
+ # - selector: "google.example.library.v1.LibraryService.CreateBook"
3749
+ # allow_unregistered_calls: true
3750
+ class UsageRule
3751
+ include Google::Apis::Core::Hashable
3752
+
3753
+ # If true, the selected method allows unregistered calls, e.g. calls
3754
+ # that don't identify any user or application.
3755
+ # Corresponds to the JSON property `allowUnregisteredCalls`
3756
+ # @return [Boolean]
3757
+ attr_accessor :allow_unregistered_calls
3758
+ alias_method :allow_unregistered_calls?, :allow_unregistered_calls
3759
+
3760
+ # Selects the methods to which this rule applies. Use '*' to indicate all
3761
+ # methods in all APIs.
3762
+ # Refer to selector for syntax details.
3763
+ # Corresponds to the JSON property `selector`
3764
+ # @return [String]
3765
+ attr_accessor :selector
3766
+
3767
+ # If true, the selected method should skip service control and the control
3768
+ # plane features, such as quota and billing, will not be available.
3769
+ # This flag is used by Google Cloud Endpoints to bypass checks for internal
3770
+ # methods, such as service health check methods.
3771
+ # Corresponds to the JSON property `skipServiceControl`
3772
+ # @return [Boolean]
3773
+ attr_accessor :skip_service_control
3774
+ alias_method :skip_service_control?, :skip_service_control
3775
+
3776
+ def initialize(**args)
3777
+ update!(**args)
3778
+ end
3779
+
3780
+ # Update properties of this object
3781
+ def update!(**args)
3782
+ @allow_unregistered_calls = args[:allow_unregistered_calls] if args.key?(:allow_unregistered_calls)
3783
+ @selector = args[:selector] if args.key?(:selector)
3784
+ @skip_service_control = args[:skip_service_control] if args.key?(:skip_service_control)
3785
+ end
3786
+ end
3787
+
3788
+ # `Visibility` defines restrictions for the visibility of service
3789
+ # elements. Restrictions are specified using visibility labels
3790
+ # (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.
3791
+ # Users and projects can have access to more than one visibility label. The
3792
+ # effective visibility for multiple labels is the union of each label's
3793
+ # elements, plus any unrestricted elements.
3794
+ # If an element and its parents have no restrictions, visibility is
3795
+ # unconditionally granted.
3796
+ # Example:
3797
+ # visibility:
3798
+ # rules:
3799
+ # - selector: google.calendar.Calendar.EnhancedSearch
3800
+ # restriction: TRUSTED_TESTER
3801
+ # - selector: google.calendar.Calendar.Delegate
3802
+ # restriction: GOOGLE_INTERNAL
3803
+ # Here, all methods are publicly visible except for the restricted methods
3804
+ # EnhancedSearch and Delegate.
3805
+ class Visibility
3806
+ include Google::Apis::Core::Hashable
3807
+
3808
+ # A list of visibility rules that apply to individual API elements.
3809
+ # **NOTE:** All service configuration rules follow "last one wins" order.
3810
+ # Corresponds to the JSON property `rules`
3811
+ # @return [Array<Google::Apis::ServiceusageV1::VisibilityRule>]
3812
+ attr_accessor :rules
3813
+
3814
+ def initialize(**args)
3815
+ update!(**args)
3816
+ end
3817
+
3818
+ # Update properties of this object
3819
+ def update!(**args)
3820
+ @rules = args[:rules] if args.key?(:rules)
3821
+ end
3822
+ end
3823
+
3824
+ # A visibility rule provides visibility configuration for an individual API
3825
+ # element.
3826
+ class VisibilityRule
3827
+ include Google::Apis::Core::Hashable
3828
+
3829
+ # A comma-separated list of visibility labels that apply to the `selector`.
3830
+ # Any of the listed labels can be used to grant the visibility.
3831
+ # If a rule has multiple labels, removing one of the labels but not all of
3832
+ # them can break clients.
3833
+ # Example:
3834
+ # visibility:
3835
+ # rules:
3836
+ # - selector: google.calendar.Calendar.EnhancedSearch
3837
+ # restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
3838
+ # Removing GOOGLE_INTERNAL from this restriction will break clients that
3839
+ # rely on this method and only had access to it through GOOGLE_INTERNAL.
3840
+ # Corresponds to the JSON property `restriction`
3841
+ # @return [String]
3842
+ attr_accessor :restriction
3843
+
3844
+ # Selects methods, messages, fields, enums, etc. to which this rule applies.
3845
+ # Refer to selector for syntax details.
3846
+ # Corresponds to the JSON property `selector`
3847
+ # @return [String]
3848
+ attr_accessor :selector
3849
+
3850
+ def initialize(**args)
3851
+ update!(**args)
3852
+ end
3853
+
3854
+ # Update properties of this object
3855
+ def update!(**args)
3856
+ @restriction = args[:restriction] if args.key?(:restriction)
3857
+ @selector = args[:selector] if args.key?(:selector)
3858
+ end
3859
+ end
3860
+ end
3861
+ end
3862
+ end