google-api-client 0.10.2 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/MIGRATING.md +22 -7
- data/README.md +4 -8
- data/api_names.yaml +1210 -37815
- data/generated/google/apis/acceleratedmobilepageurl_v1.rb +32 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +144 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +86 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +90 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +764 -764
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +180 -180
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +421 -421
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +1 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +1 -0
- data/generated/google/apis/admin_reports_v1.rb +1 -1
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/classes.rb +187 -187
- data/generated/google/apis/analyticsreporting_v4/representations.rb +42 -42
- data/generated/google/apis/appengine_v1.rb +40 -0
- data/generated/google/apis/appengine_v1/classes.rb +2251 -0
- data/generated/google/apis/appengine_v1/representations.rb +858 -0
- data/generated/google/apis/appengine_v1/service.rb +894 -0
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +11 -6
- data/generated/google/apis/books_v1.rb +1 -1
- data/generated/google/apis/books_v1/classes.rb +26 -0
- data/generated/google/apis/books_v1/representations.rb +15 -0
- data/generated/google/apis/books_v1/service.rb +4 -1
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +638 -637
- data/generated/google/apis/cloudbuild_v1/representations.rb +110 -110
- data/generated/google/apis/cloudbuild_v1/service.rb +139 -139
- data/generated/google/apis/clouddebugger_v2.rb +3 -3
- data/generated/google/apis/clouddebugger_v2/classes.rb +131 -131
- data/generated/google/apis/clouddebugger_v2/representations.rb +25 -25
- data/generated/google/apis/clouderrorreporting_v1beta1.rb +36 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +590 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +252 -0
- data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +350 -0
- data/generated/google/apis/cloudfunctions_v1.rb +35 -0
- data/generated/google/apis/cloudfunctions_v1/classes.rb +98 -0
- data/generated/google/apis/cloudfunctions_v1/representations.rb +57 -0
- data/generated/google/apis/cloudfunctions_v1/service.rb +89 -0
- data/generated/google/apis/cloudkms_v1/classes.rb +277 -270
- data/generated/google/apis/cloudkms_v1/representations.rb +73 -73
- data/generated/google/apis/cloudkms_v1/service.rb +194 -194
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1147 -1144
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +188 -188
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +513 -936
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +307 -916
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +63 -285
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +333 -681
- data/generated/google/apis/cloudtrace_v1/classes.rb +38 -38
- data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
- data/generated/google/apis/cloudtrace_v1/service.rb +16 -16
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +32 -7
- data/generated/google/apis/compute_beta/representations.rb +2 -0
- data/generated/google/apis/compute_beta/service.rb +11 -11
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +95 -2
- data/generated/google/apis/compute_v1/representations.rb +33 -0
- data/generated/google/apis/dataflow_v1b3/classes.rb +3333 -3333
- data/generated/google/apis/dataflow_v1b3/representations.rb +759 -759
- data/generated/google/apis/dataflow_v1b3/service.rb +154 -154
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +1097 -1097
- data/generated/google/apis/dataproc_v1/representations.rb +200 -200
- data/generated/google/apis/dataproc_v1/service.rb +356 -356
- data/generated/google/apis/datastore_v1.rb +4 -4
- data/generated/google/apis/datastore_v1/classes.rb +701 -690
- data/generated/google/apis/datastore_v1/representations.rb +160 -160
- data/generated/google/apis/datastore_v1/service.rb +52 -52
- data/generated/google/apis/deploymentmanager_v2/classes.rb +4 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +158 -35
- data/generated/google/apis/drive_v2/representations.rb +39 -0
- data/generated/google/apis/drive_v2/service.rb +4 -4
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +162 -33
- data/generated/google/apis/drive_v3/representations.rb +39 -0
- data/generated/google/apis/drive_v3/service.rb +4 -4
- data/generated/google/apis/firebasedynamiclinks_v1.rb +35 -0
- data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +466 -0
- data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +222 -0
- data/generated/google/apis/firebasedynamiclinks_v1/service.rb +95 -0
- data/generated/google/apis/firebaserules_v1.rb +41 -0
- data/generated/google/apis/firebaserules_v1/classes.rb +425 -0
- data/generated/google/apis/firebaserules_v1/representations.rb +222 -0
- data/generated/google/apis/firebaserules_v1/service.rb +495 -0
- data/generated/google/apis/games_v1/classes.rb +4 -0
- data/generated/google/apis/genomics_v1.rb +7 -7
- data/generated/google/apis/genomics_v1/classes.rb +2336 -2335
- data/generated/google/apis/genomics_v1/representations.rb +387 -387
- data/generated/google/apis/genomics_v1/service.rb +1187 -1187
- data/generated/google/apis/gmail_v1/classes.rb +3 -0
- data/generated/google/apis/iam_v1.rb +1 -1
- data/generated/google/apis/iam_v1/classes.rb +123 -117
- data/generated/google/apis/iam_v1/representations.rb +33 -33
- data/generated/google/apis/iam_v1/service.rb +109 -109
- data/generated/google/apis/identitytoolkit_v3/classes.rb +5 -0
- data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
- data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
- data/generated/google/apis/kgsearch_v1/service.rb +4 -4
- data/generated/google/apis/language_v1.rb +36 -0
- data/generated/google/apis/language_v1/classes.rb +757 -0
- data/generated/google/apis/language_v1/representations.rb +338 -0
- data/generated/google/apis/language_v1/service.rb +185 -0
- data/generated/google/apis/language_v1beta1/classes.rb +407 -407
- data/generated/google/apis/language_v1beta1/representations.rb +103 -103
- data/generated/google/apis/language_v1beta1/service.rb +45 -45
- data/generated/google/apis/logging_v2.rb +46 -0
- data/generated/google/apis/logging_v2/classes.rb +1271 -0
- data/generated/google/apis/logging_v2/representations.rb +421 -0
- data/generated/google/apis/logging_v2/service.rb +1569 -0
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +886 -886
- data/generated/google/apis/logging_v2beta1/representations.rb +132 -132
- data/generated/google/apis/logging_v2beta1/service.rb +235 -235
- data/generated/google/apis/manufacturers_v1/classes.rb +147 -147
- data/generated/google/apis/manufacturers_v1/representations.rb +29 -29
- data/generated/google/apis/ml_v1.rb +34 -0
- data/generated/google/apis/ml_v1/classes.rb +1617 -0
- data/generated/google/apis/ml_v1/representations.rb +498 -0
- data/generated/google/apis/ml_v1/service.rb +769 -0
- data/generated/google/apis/monitoring_v3.rb +4 -4
- data/generated/google/apis/monitoring_v3/classes.rb +630 -630
- data/generated/google/apis/monitoring_v3/representations.rb +134 -134
- data/generated/google/apis/monitoring_v3/service.rb +240 -240
- data/generated/google/apis/pagespeedonline_v2/classes.rb +1 -0
- data/generated/google/apis/partners_v2.rb +1 -1
- data/generated/google/apis/partners_v2/classes.rb +639 -639
- data/generated/google/apis/partners_v2/representations.rb +168 -168
- data/generated/google/apis/partners_v2/service.rb +381 -381
- data/generated/google/apis/people_v1.rb +10 -10
- data/generated/google/apis/people_v1/classes.rb +524 -524
- data/generated/google/apis/people_v1/representations.rb +143 -143
- data/generated/google/apis/people_v1/service.rb +30 -30
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +454 -444
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +90 -90
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +110 -110
- data/generated/google/apis/pubsub_v1/classes.rb +175 -173
- data/generated/google/apis/pubsub_v1/representations.rb +53 -53
- data/generated/google/apis/pubsub_v1/service.rb +210 -210
- data/generated/google/apis/replicapool_v1beta2/classes.rb +2 -0
- data/generated/google/apis/runtimeconfig_v1.rb +38 -0
- data/generated/google/apis/runtimeconfig_v1/classes.rb +252 -0
- data/generated/google/apis/runtimeconfig_v1/representations.rb +98 -0
- data/generated/google/apis/runtimeconfig_v1/service.rb +176 -0
- data/generated/google/apis/script_v1.rb +1 -1
- data/generated/google/apis/script_v1/classes.rb +6 -6
- data/generated/google/apis/script_v1/representations.rb +1 -1
- data/generated/google/apis/searchconsole_v1.rb +31 -0
- data/generated/google/apis/searchconsole_v1/classes.rb +205 -0
- data/generated/google/apis/searchconsole_v1/representations.rb +129 -0
- data/generated/google/apis/searchconsole_v1/service.rb +88 -0
- data/generated/google/apis/servicecontrol_v1.rb +38 -0
- data/generated/google/apis/servicecontrol_v1/classes.rb +1675 -0
- data/generated/google/apis/servicecontrol_v1/representations.rb +601 -0
- data/generated/google/apis/servicecontrol_v1/service.rb +337 -0
- data/generated/google/apis/servicemanagement_v1.rb +45 -0
- data/generated/google/apis/servicemanagement_v1/classes.rb +4934 -0
- data/generated/google/apis/servicemanagement_v1/representations.rb +1526 -0
- data/generated/google/apis/servicemanagement_v1/service.rb +860 -0
- data/generated/google/apis/serviceuser_v1.rb +42 -0
- data/generated/google/apis/serviceuser_v1/classes.rb +3746 -0
- data/generated/google/apis/serviceuser_v1/representations.rb +1041 -0
- data/generated/google/apis/serviceuser_v1/service.rb +214 -0
- data/generated/google/apis/sheets_v4.rb +3 -3
- data/generated/google/apis/sheets_v4/classes.rb +4390 -4390
- data/generated/google/apis/sheets_v4/representations.rb +381 -381
- data/generated/google/apis/sheets_v4/service.rb +48 -48
- data/generated/google/apis/slides_v1.rb +3 -3
- data/generated/google/apis/slides_v1/classes.rb +2860 -2860
- data/generated/google/apis/slides_v1/representations.rb +693 -693
- data/generated/google/apis/slides_v1/service.rb +30 -30
- data/generated/google/apis/sourcerepo_v1.rb +34 -0
- data/generated/google/apis/sourcerepo_v1/classes.rb +687 -0
- data/generated/google/apis/sourcerepo_v1/representations.rb +285 -0
- data/generated/google/apis/sourcerepo_v1/service.rb +291 -0
- data/generated/google/apis/spanner_v1.rb +35 -0
- data/generated/google/apis/spanner_v1/classes.rb +3294 -0
- data/generated/google/apis/spanner_v1/representations.rb +984 -0
- data/generated/google/apis/spanner_v1/service.rb +1504 -0
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +197 -196
- data/generated/google/apis/speech_v1beta1/representations.rb +53 -53
- data/generated/google/apis/speech_v1beta1/service.rb +27 -27
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +131 -0
- data/generated/google/apis/storage_v1/representations.rb +51 -0
- data/generated/google/apis/storage_v1/service.rb +182 -0
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +732 -661
- data/generated/google/apis/storagetransfer_v1/representations.rb +132 -132
- data/generated/google/apis/storagetransfer_v1/service.rb +174 -197
- data/generated/google/apis/surveys_v2.rb +40 -0
- data/generated/google/apis/surveys_v2/classes.rb +806 -0
- data/generated/google/apis/surveys_v2/representations.rb +347 -0
- data/generated/google/apis/surveys_v2/service.rb +477 -0
- data/generated/google/apis/tagmanager_v2.rb +52 -0
- data/generated/google/apis/tagmanager_v2/classes.rb +2435 -0
- data/generated/google/apis/tagmanager_v2/representations.rb +993 -0
- data/generated/google/apis/tagmanager_v2/service.rb +2865 -0
- data/generated/google/apis/toolresults_v1beta3.rb +34 -0
- data/generated/google/apis/toolresults_v1beta3/classes.rb +2160 -0
- data/generated/google/apis/toolresults_v1beta3/representations.rb +729 -0
- data/generated/google/apis/toolresults_v1beta3/service.rb +1236 -0
- data/generated/google/apis/tracing_v1.rb +40 -0
- data/generated/google/apis/tracing_v1/classes.rb +664 -0
- data/generated/google/apis/tracing_v1/representations.rb +279 -0
- data/generated/google/apis/tracing_v1/service.rb +225 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +1223 -1222
- data/generated/google/apis/vision_v1/representations.rb +234 -234
- data/generated/google/apis/vision_v1/service.rb +10 -10
- data/generated/google/apis/webfonts_v1.rb +33 -0
- data/generated/google/apis/webfonts_v1/classes.rb +113 -0
- data/generated/google/apis/webfonts_v1/representations.rb +62 -0
- data/generated/google/apis/webfonts_v1/service.rb +102 -0
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +31 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +6 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +41 -0
- data/generated/google/apis/youtube_v3/classes.rb +1 -0
- data/generated/google/apis/youtubereporting_v1.rb +4 -4
- data/generated/google/apis/youtubereporting_v1/classes.rb +76 -76
- data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
- data/generated/google/apis/youtubereporting_v1/service.rb +95 -95
- data/lib/google/apis/generator/annotator.rb +5 -4
- data/lib/google/apis/generator/templates/_class.tmpl +3 -0
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/adsense.rb +99 -0
- data/samples/cli/lib/samples/analytics.rb +18 -0
- data/samples/cli/lib/samples/gmail.rb +33 -0
- data/samples/cli/lib/samples/vision.rb +69 -0
- metadata +89 -4
- data/sync.rb +0 -71
|
@@ -0,0 +1,38 @@
|
|
|
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/servicecontrol_v1/service.rb'
|
|
16
|
+
require 'google/apis/servicecontrol_v1/classes.rb'
|
|
17
|
+
require 'google/apis/servicecontrol_v1/representations.rb'
|
|
18
|
+
|
|
19
|
+
module Google
|
|
20
|
+
module Apis
|
|
21
|
+
# Google Service Control API
|
|
22
|
+
#
|
|
23
|
+
# Google Service Control provides control plane functionality to managed
|
|
24
|
+
# services, such as logging, monitoring, and status checks.
|
|
25
|
+
#
|
|
26
|
+
# @see https://cloud.google.com/service-control/
|
|
27
|
+
module ServicecontrolV1
|
|
28
|
+
VERSION = 'V1'
|
|
29
|
+
REVISION = '20170326'
|
|
30
|
+
|
|
31
|
+
# Manage your Google Service Control data
|
|
32
|
+
AUTH_SERVICECONTROL = 'https://www.googleapis.com/auth/servicecontrol'
|
|
33
|
+
|
|
34
|
+
# View and manage your data across Google Cloud Platform services
|
|
35
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,1675 @@
|
|
|
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 ServicecontrolV1
|
|
24
|
+
|
|
25
|
+
# Represents a single metric value.
|
|
26
|
+
class MetricValue
|
|
27
|
+
include Google::Apis::Core::Hashable
|
|
28
|
+
|
|
29
|
+
# A text string value.
|
|
30
|
+
# Corresponds to the JSON property `stringValue`
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :string_value
|
|
33
|
+
|
|
34
|
+
# The labels describing the metric value.
|
|
35
|
+
# See comments on google.api.servicecontrol.v1.Operation.labels for
|
|
36
|
+
# the overriding relationship.
|
|
37
|
+
# Corresponds to the JSON property `labels`
|
|
38
|
+
# @return [Hash<String,String>]
|
|
39
|
+
attr_accessor :labels
|
|
40
|
+
|
|
41
|
+
# A double precision floating point value.
|
|
42
|
+
# Corresponds to the JSON property `doubleValue`
|
|
43
|
+
# @return [Float]
|
|
44
|
+
attr_accessor :double_value
|
|
45
|
+
|
|
46
|
+
# A signed 64-bit integer value.
|
|
47
|
+
# Corresponds to the JSON property `int64Value`
|
|
48
|
+
# @return [String]
|
|
49
|
+
attr_accessor :int64_value
|
|
50
|
+
|
|
51
|
+
# Distribution represents a frequency distribution of double-valued sample
|
|
52
|
+
# points. It contains the size of the population of sample points plus
|
|
53
|
+
# additional optional information:
|
|
54
|
+
# - the arithmetic mean of the samples
|
|
55
|
+
# - the minimum and maximum of the samples
|
|
56
|
+
# - the sum-squared-deviation of the samples, used to compute variance
|
|
57
|
+
# - a histogram of the values of the sample points
|
|
58
|
+
# Corresponds to the JSON property `distributionValue`
|
|
59
|
+
# @return [Google::Apis::ServicecontrolV1::Distribution]
|
|
60
|
+
attr_accessor :distribution_value
|
|
61
|
+
|
|
62
|
+
# A boolean value.
|
|
63
|
+
# Corresponds to the JSON property `boolValue`
|
|
64
|
+
# @return [Boolean]
|
|
65
|
+
attr_accessor :bool_value
|
|
66
|
+
alias_method :bool_value?, :bool_value
|
|
67
|
+
|
|
68
|
+
# The end of the time period over which this metric value's measurement
|
|
69
|
+
# applies.
|
|
70
|
+
# Corresponds to the JSON property `endTime`
|
|
71
|
+
# @return [String]
|
|
72
|
+
attr_accessor :end_time
|
|
73
|
+
|
|
74
|
+
# The start of the time period over which this metric value's measurement
|
|
75
|
+
# applies. The time period has different semantics for different metric
|
|
76
|
+
# types (cumulative, delta, and gauge). See the metric definition
|
|
77
|
+
# documentation in the service configuration for details.
|
|
78
|
+
# Corresponds to the JSON property `startTime`
|
|
79
|
+
# @return [String]
|
|
80
|
+
attr_accessor :start_time
|
|
81
|
+
|
|
82
|
+
# Represents an amount of money with its currency type.
|
|
83
|
+
# Corresponds to the JSON property `moneyValue`
|
|
84
|
+
# @return [Google::Apis::ServicecontrolV1::Money]
|
|
85
|
+
attr_accessor :money_value
|
|
86
|
+
|
|
87
|
+
def initialize(**args)
|
|
88
|
+
update!(**args)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Update properties of this object
|
|
92
|
+
def update!(**args)
|
|
93
|
+
@string_value = args[:string_value] if args.key?(:string_value)
|
|
94
|
+
@labels = args[:labels] if args.key?(:labels)
|
|
95
|
+
@double_value = args[:double_value] if args.key?(:double_value)
|
|
96
|
+
@int64_value = args[:int64_value] if args.key?(:int64_value)
|
|
97
|
+
@distribution_value = args[:distribution_value] if args.key?(:distribution_value)
|
|
98
|
+
@bool_value = args[:bool_value] if args.key?(:bool_value)
|
|
99
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
|
100
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
|
101
|
+
@money_value = args[:money_value] if args.key?(:money_value)
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Represents an amount of money with its currency type.
|
|
106
|
+
class Money
|
|
107
|
+
include Google::Apis::Core::Hashable
|
|
108
|
+
|
|
109
|
+
# The 3-letter currency code defined in ISO 4217.
|
|
110
|
+
# Corresponds to the JSON property `currencyCode`
|
|
111
|
+
# @return [String]
|
|
112
|
+
attr_accessor :currency_code
|
|
113
|
+
|
|
114
|
+
# Number of nano (10^-9) units of the amount.
|
|
115
|
+
# The value must be between -999,999,999 and +999,999,999 inclusive.
|
|
116
|
+
# If `units` is positive, `nanos` must be positive or zero.
|
|
117
|
+
# If `units` is zero, `nanos` can be positive, zero, or negative.
|
|
118
|
+
# If `units` is negative, `nanos` must be negative or zero.
|
|
119
|
+
# For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
|
|
120
|
+
# Corresponds to the JSON property `nanos`
|
|
121
|
+
# @return [Fixnum]
|
|
122
|
+
attr_accessor :nanos
|
|
123
|
+
|
|
124
|
+
# The whole units of the amount.
|
|
125
|
+
# For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
|
|
126
|
+
# Corresponds to the JSON property `units`
|
|
127
|
+
# @return [String]
|
|
128
|
+
attr_accessor :units
|
|
129
|
+
|
|
130
|
+
def initialize(**args)
|
|
131
|
+
update!(**args)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Update properties of this object
|
|
135
|
+
def update!(**args)
|
|
136
|
+
@currency_code = args[:currency_code] if args.key?(:currency_code)
|
|
137
|
+
@nanos = args[:nanos] if args.key?(:nanos)
|
|
138
|
+
@units = args[:units] if args.key?(:units)
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
#
|
|
143
|
+
class EndReconciliationResponse
|
|
144
|
+
include Google::Apis::Core::Hashable
|
|
145
|
+
|
|
146
|
+
# Metric values as tracked by One Platform before the adjustment was made.
|
|
147
|
+
# The following metrics will be included:
|
|
148
|
+
# 1. Per quota metric total usage will be specified using the following gauge
|
|
149
|
+
# metric:
|
|
150
|
+
# "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
|
|
151
|
+
# 2. Value for each quota limit associated with the metrics will be specified
|
|
152
|
+
# using the following gauge metric:
|
|
153
|
+
# "serviceruntime.googleapis.com/quota/limit"
|
|
154
|
+
# 3. Delta value of the usage after the reconciliation for limits associated
|
|
155
|
+
# with the metrics will be specified using the following metric:
|
|
156
|
+
# "serviceruntime.googleapis.com/allocation/reconciliation_delta"
|
|
157
|
+
# The delta value is defined as:
|
|
158
|
+
# new_usage_from_client - existing_value_in_spanner.
|
|
159
|
+
# This metric is not defined in serviceruntime.yaml or in Cloud Monarch.
|
|
160
|
+
# This metric is meant for callers' use only. Since this metric is not
|
|
161
|
+
# defined in the monitoring backend, reporting on this metric will result in
|
|
162
|
+
# an error.
|
|
163
|
+
# Corresponds to the JSON property `quotaMetrics`
|
|
164
|
+
# @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
|
|
165
|
+
attr_accessor :quota_metrics
|
|
166
|
+
|
|
167
|
+
# The same operation_id value used in the EndReconciliationRequest. Used for
|
|
168
|
+
# logging and diagnostics purposes.
|
|
169
|
+
# Corresponds to the JSON property `operationId`
|
|
170
|
+
# @return [String]
|
|
171
|
+
attr_accessor :operation_id
|
|
172
|
+
|
|
173
|
+
# Indicates the decision of the reconciliation end.
|
|
174
|
+
# Corresponds to the JSON property `reconciliationErrors`
|
|
175
|
+
# @return [Array<Google::Apis::ServicecontrolV1::QuotaError>]
|
|
176
|
+
attr_accessor :reconciliation_errors
|
|
177
|
+
|
|
178
|
+
# ID of the actual config used to process the request.
|
|
179
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
180
|
+
# @return [String]
|
|
181
|
+
attr_accessor :service_config_id
|
|
182
|
+
|
|
183
|
+
def initialize(**args)
|
|
184
|
+
update!(**args)
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Update properties of this object
|
|
188
|
+
def update!(**args)
|
|
189
|
+
@quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics)
|
|
190
|
+
@operation_id = args[:operation_id] if args.key?(:operation_id)
|
|
191
|
+
@reconciliation_errors = args[:reconciliation_errors] if args.key?(:reconciliation_errors)
|
|
192
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Describing buckets with arbitrary user-provided width.
|
|
197
|
+
class ExplicitBuckets
|
|
198
|
+
include Google::Apis::Core::Hashable
|
|
199
|
+
|
|
200
|
+
# 'bound' is a list of strictly increasing boundaries between
|
|
201
|
+
# buckets. Note that a list of length N-1 defines N buckets because
|
|
202
|
+
# of fenceposting. See comments on `bucket_options` for details.
|
|
203
|
+
# The i'th finite bucket covers the interval
|
|
204
|
+
# [bound[i-1], bound[i])
|
|
205
|
+
# where i ranges from 1 to bound_size() - 1. Note that there are no
|
|
206
|
+
# finite buckets at all if 'bound' only contains a single element; in
|
|
207
|
+
# that special case the single bound defines the boundary between the
|
|
208
|
+
# underflow and overflow buckets.
|
|
209
|
+
# bucket number lower bound upper bound
|
|
210
|
+
# i == 0 (underflow) -inf bound[i]
|
|
211
|
+
# 0 < i < bound_size() bound[i-1] bound[i]
|
|
212
|
+
# i == bound_size() (overflow) bound[i-1] +inf
|
|
213
|
+
# Corresponds to the JSON property `bounds`
|
|
214
|
+
# @return [Array<Float>]
|
|
215
|
+
attr_accessor :bounds
|
|
216
|
+
|
|
217
|
+
def initialize(**args)
|
|
218
|
+
update!(**args)
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Update properties of this object
|
|
222
|
+
def update!(**args)
|
|
223
|
+
@bounds = args[:bounds] if args.key?(:bounds)
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Distribution represents a frequency distribution of double-valued sample
|
|
228
|
+
# points. It contains the size of the population of sample points plus
|
|
229
|
+
# additional optional information:
|
|
230
|
+
# - the arithmetic mean of the samples
|
|
231
|
+
# - the minimum and maximum of the samples
|
|
232
|
+
# - the sum-squared-deviation of the samples, used to compute variance
|
|
233
|
+
# - a histogram of the values of the sample points
|
|
234
|
+
class Distribution
|
|
235
|
+
include Google::Apis::Core::Hashable
|
|
236
|
+
|
|
237
|
+
# Describing buckets with exponentially growing width.
|
|
238
|
+
# Corresponds to the JSON property `exponentialBuckets`
|
|
239
|
+
# @return [Google::Apis::ServicecontrolV1::ExponentialBuckets]
|
|
240
|
+
attr_accessor :exponential_buckets
|
|
241
|
+
|
|
242
|
+
# The minimum of the population of values. Ignored if `count` is zero.
|
|
243
|
+
# Corresponds to the JSON property `minimum`
|
|
244
|
+
# @return [Float]
|
|
245
|
+
attr_accessor :minimum
|
|
246
|
+
|
|
247
|
+
# Describing buckets with constant width.
|
|
248
|
+
# Corresponds to the JSON property `linearBuckets`
|
|
249
|
+
# @return [Google::Apis::ServicecontrolV1::LinearBuckets]
|
|
250
|
+
attr_accessor :linear_buckets
|
|
251
|
+
|
|
252
|
+
# The total number of samples in the distribution. Must be >= 0.
|
|
253
|
+
# Corresponds to the JSON property `count`
|
|
254
|
+
# @return [String]
|
|
255
|
+
attr_accessor :count
|
|
256
|
+
|
|
257
|
+
# The arithmetic mean of the samples in the distribution. If `count` is
|
|
258
|
+
# zero then this field must be zero.
|
|
259
|
+
# Corresponds to the JSON property `mean`
|
|
260
|
+
# @return [Float]
|
|
261
|
+
attr_accessor :mean
|
|
262
|
+
|
|
263
|
+
# The number of samples in each histogram bucket. `bucket_counts` are
|
|
264
|
+
# optional. If present, they must sum to the `count` value.
|
|
265
|
+
# The buckets are defined below in `bucket_option`. There are N buckets.
|
|
266
|
+
# `bucket_counts[0]` is the number of samples in the underflow bucket.
|
|
267
|
+
# `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
|
|
268
|
+
# in each of the finite buckets. And `bucket_counts[N] is the number
|
|
269
|
+
# of samples in the overflow bucket. See the comments of `bucket_option`
|
|
270
|
+
# below for more details.
|
|
271
|
+
# Any suffix of trailing zeros may be omitted.
|
|
272
|
+
# Corresponds to the JSON property `bucketCounts`
|
|
273
|
+
# @return [Array<String>]
|
|
274
|
+
attr_accessor :bucket_counts
|
|
275
|
+
|
|
276
|
+
# Describing buckets with arbitrary user-provided width.
|
|
277
|
+
# Corresponds to the JSON property `explicitBuckets`
|
|
278
|
+
# @return [Google::Apis::ServicecontrolV1::ExplicitBuckets]
|
|
279
|
+
attr_accessor :explicit_buckets
|
|
280
|
+
|
|
281
|
+
# The maximum of the population of values. Ignored if `count` is zero.
|
|
282
|
+
# Corresponds to the JSON property `maximum`
|
|
283
|
+
# @return [Float]
|
|
284
|
+
attr_accessor :maximum
|
|
285
|
+
|
|
286
|
+
# The sum of squared deviations from the mean:
|
|
287
|
+
# Sum[i=1..count]((x_i - mean)^2)
|
|
288
|
+
# where each x_i is a sample values. If `count` is zero then this field
|
|
289
|
+
# must be zero, otherwise validation of the request fails.
|
|
290
|
+
# Corresponds to the JSON property `sumOfSquaredDeviation`
|
|
291
|
+
# @return [Float]
|
|
292
|
+
attr_accessor :sum_of_squared_deviation
|
|
293
|
+
|
|
294
|
+
def initialize(**args)
|
|
295
|
+
update!(**args)
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Update properties of this object
|
|
299
|
+
def update!(**args)
|
|
300
|
+
@exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets)
|
|
301
|
+
@minimum = args[:minimum] if args.key?(:minimum)
|
|
302
|
+
@linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets)
|
|
303
|
+
@count = args[:count] if args.key?(:count)
|
|
304
|
+
@mean = args[:mean] if args.key?(:mean)
|
|
305
|
+
@bucket_counts = args[:bucket_counts] if args.key?(:bucket_counts)
|
|
306
|
+
@explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets)
|
|
307
|
+
@maximum = args[:maximum] if args.key?(:maximum)
|
|
308
|
+
@sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation)
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# Describing buckets with exponentially growing width.
|
|
313
|
+
class ExponentialBuckets
|
|
314
|
+
include Google::Apis::Core::Hashable
|
|
315
|
+
|
|
316
|
+
# The i'th exponential bucket covers the interval
|
|
317
|
+
# [scale * growth_factor^(i-1), scale * growth_factor^i)
|
|
318
|
+
# where i ranges from 1 to num_finite_buckets inclusive.
|
|
319
|
+
# Must be larger than 1.0.
|
|
320
|
+
# Corresponds to the JSON property `growthFactor`
|
|
321
|
+
# @return [Float]
|
|
322
|
+
attr_accessor :growth_factor
|
|
323
|
+
|
|
324
|
+
# The i'th exponential bucket covers the interval
|
|
325
|
+
# [scale * growth_factor^(i-1), scale * growth_factor^i)
|
|
326
|
+
# where i ranges from 1 to num_finite_buckets inclusive.
|
|
327
|
+
# Must be > 0.
|
|
328
|
+
# Corresponds to the JSON property `scale`
|
|
329
|
+
# @return [Float]
|
|
330
|
+
attr_accessor :scale
|
|
331
|
+
|
|
332
|
+
# The number of finite buckets. With the underflow and overflow buckets,
|
|
333
|
+
# the total number of buckets is `num_finite_buckets` + 2.
|
|
334
|
+
# See comments on `bucket_options` for details.
|
|
335
|
+
# Corresponds to the JSON property `numFiniteBuckets`
|
|
336
|
+
# @return [Fixnum]
|
|
337
|
+
attr_accessor :num_finite_buckets
|
|
338
|
+
|
|
339
|
+
def initialize(**args)
|
|
340
|
+
update!(**args)
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Update properties of this object
|
|
344
|
+
def update!(**args)
|
|
345
|
+
@growth_factor = args[:growth_factor] if args.key?(:growth_factor)
|
|
346
|
+
@scale = args[:scale] if args.key?(:scale)
|
|
347
|
+
@num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
|
|
348
|
+
end
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# Authorization information for the operation.
|
|
352
|
+
class AuthorizationInfo
|
|
353
|
+
include Google::Apis::Core::Hashable
|
|
354
|
+
|
|
355
|
+
# The resource being accessed, as a REST-style string. For example:
|
|
356
|
+
# bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
|
|
357
|
+
# Corresponds to the JSON property `resource`
|
|
358
|
+
# @return [String]
|
|
359
|
+
attr_accessor :resource
|
|
360
|
+
|
|
361
|
+
# Whether or not authorization for `resource` and `permission`
|
|
362
|
+
# was granted.
|
|
363
|
+
# Corresponds to the JSON property `granted`
|
|
364
|
+
# @return [Boolean]
|
|
365
|
+
attr_accessor :granted
|
|
366
|
+
alias_method :granted?, :granted
|
|
367
|
+
|
|
368
|
+
# The required IAM permission.
|
|
369
|
+
# Corresponds to the JSON property `permission`
|
|
370
|
+
# @return [String]
|
|
371
|
+
attr_accessor :permission
|
|
372
|
+
|
|
373
|
+
def initialize(**args)
|
|
374
|
+
update!(**args)
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# Update properties of this object
|
|
378
|
+
def update!(**args)
|
|
379
|
+
@resource = args[:resource] if args.key?(:resource)
|
|
380
|
+
@granted = args[:granted] if args.key?(:granted)
|
|
381
|
+
@permission = args[:permission] if args.key?(:permission)
|
|
382
|
+
end
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
#
|
|
386
|
+
class StartReconciliationResponse
|
|
387
|
+
include Google::Apis::Core::Hashable
|
|
388
|
+
|
|
389
|
+
# The same operation_id value used in the StartReconciliationRequest. Used
|
|
390
|
+
# for logging and diagnostics purposes.
|
|
391
|
+
# Corresponds to the JSON property `operationId`
|
|
392
|
+
# @return [String]
|
|
393
|
+
attr_accessor :operation_id
|
|
394
|
+
|
|
395
|
+
# Indicates the decision of the reconciliation start.
|
|
396
|
+
# Corresponds to the JSON property `reconciliationErrors`
|
|
397
|
+
# @return [Array<Google::Apis::ServicecontrolV1::QuotaError>]
|
|
398
|
+
attr_accessor :reconciliation_errors
|
|
399
|
+
|
|
400
|
+
# ID of the actual config used to process the request.
|
|
401
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
402
|
+
# @return [String]
|
|
403
|
+
attr_accessor :service_config_id
|
|
404
|
+
|
|
405
|
+
# Metric values as tracked by One Platform before the start of
|
|
406
|
+
# reconciliation. The following metrics will be included:
|
|
407
|
+
# 1. Per quota metric total usage will be specified using the following gauge
|
|
408
|
+
# metric:
|
|
409
|
+
# "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
|
|
410
|
+
# 2. Value for each quota limit associated with the metrics will be specified
|
|
411
|
+
# using the following gauge metric:
|
|
412
|
+
# "serviceruntime.googleapis.com/quota/limit"
|
|
413
|
+
# Corresponds to the JSON property `quotaMetrics`
|
|
414
|
+
# @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
|
|
415
|
+
attr_accessor :quota_metrics
|
|
416
|
+
|
|
417
|
+
def initialize(**args)
|
|
418
|
+
update!(**args)
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
# Update properties of this object
|
|
422
|
+
def update!(**args)
|
|
423
|
+
@operation_id = args[:operation_id] if args.key?(:operation_id)
|
|
424
|
+
@reconciliation_errors = args[:reconciliation_errors] if args.key?(:reconciliation_errors)
|
|
425
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
426
|
+
@quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics)
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# Represents the properties needed for quota operations.
|
|
431
|
+
class QuotaProperties
|
|
432
|
+
include Google::Apis::Core::Hashable
|
|
433
|
+
|
|
434
|
+
# LimitType IDs that should be used for checking quota. Key in this map
|
|
435
|
+
# should be a valid LimitType string, and the value is the ID to be used. For
|
|
436
|
+
# example, an entry <USER, 123> will cause all user quota limits to use 123
|
|
437
|
+
# as the user ID. See google/api/quota.proto for the definition of LimitType.
|
|
438
|
+
# CLIENT_PROJECT: Not supported.
|
|
439
|
+
# USER: Value of this entry will be used for enforcing user-level quota
|
|
440
|
+
# limits. If none specified, caller IP passed in the
|
|
441
|
+
# servicecontrol.googleapis.com/caller_ip label will be used instead.
|
|
442
|
+
# If the server cannot resolve a value for this LimitType, an error
|
|
443
|
+
# will be thrown. No validation will be performed on this ID.
|
|
444
|
+
# Deprecated: use servicecontrol.googleapis.com/user label to send user ID.
|
|
445
|
+
# Corresponds to the JSON property `limitByIds`
|
|
446
|
+
# @return [Hash<String,String>]
|
|
447
|
+
attr_accessor :limit_by_ids
|
|
448
|
+
|
|
449
|
+
# Quota mode for this operation.
|
|
450
|
+
# Corresponds to the JSON property `quotaMode`
|
|
451
|
+
# @return [String]
|
|
452
|
+
attr_accessor :quota_mode
|
|
453
|
+
|
|
454
|
+
def initialize(**args)
|
|
455
|
+
update!(**args)
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
# Update properties of this object
|
|
459
|
+
def update!(**args)
|
|
460
|
+
@limit_by_ids = args[:limit_by_ids] if args.key?(:limit_by_ids)
|
|
461
|
+
@quota_mode = args[:quota_mode] if args.key?(:quota_mode)
|
|
462
|
+
end
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
# Describing buckets with constant width.
|
|
466
|
+
class LinearBuckets
|
|
467
|
+
include Google::Apis::Core::Hashable
|
|
468
|
+
|
|
469
|
+
# The i'th linear bucket covers the interval
|
|
470
|
+
# [offset + (i-1) * width, offset + i * width)
|
|
471
|
+
# where i ranges from 1 to num_finite_buckets, inclusive.
|
|
472
|
+
# Corresponds to the JSON property `offset`
|
|
473
|
+
# @return [Float]
|
|
474
|
+
attr_accessor :offset
|
|
475
|
+
|
|
476
|
+
# The number of finite buckets. With the underflow and overflow buckets,
|
|
477
|
+
# the total number of buckets is `num_finite_buckets` + 2.
|
|
478
|
+
# See comments on `bucket_options` for details.
|
|
479
|
+
# Corresponds to the JSON property `numFiniteBuckets`
|
|
480
|
+
# @return [Fixnum]
|
|
481
|
+
attr_accessor :num_finite_buckets
|
|
482
|
+
|
|
483
|
+
# The i'th linear bucket covers the interval
|
|
484
|
+
# [offset + (i-1) * width, offset + i * width)
|
|
485
|
+
# where i ranges from 1 to num_finite_buckets, inclusive.
|
|
486
|
+
# Must be strictly positive.
|
|
487
|
+
# Corresponds to the JSON property `width`
|
|
488
|
+
# @return [Float]
|
|
489
|
+
attr_accessor :width
|
|
490
|
+
|
|
491
|
+
def initialize(**args)
|
|
492
|
+
update!(**args)
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
# Update properties of this object
|
|
496
|
+
def update!(**args)
|
|
497
|
+
@offset = args[:offset] if args.key?(:offset)
|
|
498
|
+
@num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
|
|
499
|
+
@width = args[:width] if args.key?(:width)
|
|
500
|
+
end
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
# Authentication information for the operation.
|
|
504
|
+
class AuthenticationInfo
|
|
505
|
+
include Google::Apis::Core::Hashable
|
|
506
|
+
|
|
507
|
+
# The email address of the authenticated user making the request.
|
|
508
|
+
# Corresponds to the JSON property `principalEmail`
|
|
509
|
+
# @return [String]
|
|
510
|
+
attr_accessor :principal_email
|
|
511
|
+
|
|
512
|
+
# The authority selector specified by the requestor, if any.
|
|
513
|
+
# It is not guaranteed that the principal was allowed to use this authority.
|
|
514
|
+
# Corresponds to the JSON property `authoritySelector`
|
|
515
|
+
# @return [String]
|
|
516
|
+
attr_accessor :authority_selector
|
|
517
|
+
|
|
518
|
+
def initialize(**args)
|
|
519
|
+
update!(**args)
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
# Update properties of this object
|
|
523
|
+
def update!(**args)
|
|
524
|
+
@principal_email = args[:principal_email] if args.key?(:principal_email)
|
|
525
|
+
@authority_selector = args[:authority_selector] if args.key?(:authority_selector)
|
|
526
|
+
end
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# Response message for the AllocateQuota method.
|
|
530
|
+
class AllocateQuotaResponse
|
|
531
|
+
include Google::Apis::Core::Hashable
|
|
532
|
+
|
|
533
|
+
# ID of the actual config used to process the request.
|
|
534
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
535
|
+
# @return [String]
|
|
536
|
+
attr_accessor :service_config_id
|
|
537
|
+
|
|
538
|
+
# Indicates the decision of the allocate.
|
|
539
|
+
# Corresponds to the JSON property `allocateErrors`
|
|
540
|
+
# @return [Array<Google::Apis::ServicecontrolV1::QuotaError>]
|
|
541
|
+
attr_accessor :allocate_errors
|
|
542
|
+
|
|
543
|
+
# Quota metrics to indicate the result of allocation. Depending on the
|
|
544
|
+
# request, one or more of the following metrics will be included:
|
|
545
|
+
# 1. For rate quota, per quota group or per quota metric incremental usage
|
|
546
|
+
# will be specified using the following delta metric:
|
|
547
|
+
# "serviceruntime.googleapis.com/api/consumer/quota_used_count"
|
|
548
|
+
# 2. For allocation quota, per quota metric total usage will be specified
|
|
549
|
+
# using the following gauge metric:
|
|
550
|
+
# "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
|
|
551
|
+
# 3. For both rate quota and allocation quota, the quota limit reached
|
|
552
|
+
# condition will be specified using the following boolean metric:
|
|
553
|
+
# "serviceruntime.googleapis.com/quota/exceeded"
|
|
554
|
+
# 4. For allocation quota, value for each quota limit associated with
|
|
555
|
+
# the metrics will be specified using the following gauge metric:
|
|
556
|
+
# "serviceruntime.googleapis.com/quota/limit"
|
|
557
|
+
# Corresponds to the JSON property `quotaMetrics`
|
|
558
|
+
# @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
|
|
559
|
+
attr_accessor :quota_metrics
|
|
560
|
+
|
|
561
|
+
# The same operation_id value used in the AllocateQuotaRequest. Used for
|
|
562
|
+
# logging and diagnostics purposes.
|
|
563
|
+
# Corresponds to the JSON property `operationId`
|
|
564
|
+
# @return [String]
|
|
565
|
+
attr_accessor :operation_id
|
|
566
|
+
|
|
567
|
+
def initialize(**args)
|
|
568
|
+
update!(**args)
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
# Update properties of this object
|
|
572
|
+
def update!(**args)
|
|
573
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
574
|
+
@allocate_errors = args[:allocate_errors] if args.key?(:allocate_errors)
|
|
575
|
+
@quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics)
|
|
576
|
+
@operation_id = args[:operation_id] if args.key?(:operation_id)
|
|
577
|
+
end
|
|
578
|
+
end
|
|
579
|
+
|
|
580
|
+
# Request message for the ReleaseQuota method.
|
|
581
|
+
class ReleaseQuotaRequest
|
|
582
|
+
include Google::Apis::Core::Hashable
|
|
583
|
+
|
|
584
|
+
# Specifies which version of service configuration should be used to process
|
|
585
|
+
# the request. If unspecified or no matching version can be found, the latest
|
|
586
|
+
# one will be used.
|
|
587
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
588
|
+
# @return [String]
|
|
589
|
+
attr_accessor :service_config_id
|
|
590
|
+
|
|
591
|
+
# Represents information regarding a quota operation.
|
|
592
|
+
# Corresponds to the JSON property `releaseOperation`
|
|
593
|
+
# @return [Google::Apis::ServicecontrolV1::QuotaOperation]
|
|
594
|
+
attr_accessor :release_operation
|
|
595
|
+
|
|
596
|
+
def initialize(**args)
|
|
597
|
+
update!(**args)
|
|
598
|
+
end
|
|
599
|
+
|
|
600
|
+
# Update properties of this object
|
|
601
|
+
def update!(**args)
|
|
602
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
603
|
+
@release_operation = args[:release_operation] if args.key?(:release_operation)
|
|
604
|
+
end
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
# Metadata about the request.
|
|
608
|
+
class RequestMetadata
|
|
609
|
+
include Google::Apis::Core::Hashable
|
|
610
|
+
|
|
611
|
+
# The IP address of the caller.
|
|
612
|
+
# Corresponds to the JSON property `callerIp`
|
|
613
|
+
# @return [String]
|
|
614
|
+
attr_accessor :caller_ip
|
|
615
|
+
|
|
616
|
+
# The user agent of the caller.
|
|
617
|
+
# This information is not authenticated and should be treated accordingly.
|
|
618
|
+
# For example:
|
|
619
|
+
# + `google-api-python-client/1.4.0`:
|
|
620
|
+
# The request was made by the Google API client for Python.
|
|
621
|
+
# + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
|
|
622
|
+
# The request was made by the Google Cloud SDK CLI (gcloud).
|
|
623
|
+
# + `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`
|
|
624
|
+
# :
|
|
625
|
+
# The request was made from the `my-project` App Engine app.
|
|
626
|
+
# Corresponds to the JSON property `callerSuppliedUserAgent`
|
|
627
|
+
# @return [String]
|
|
628
|
+
attr_accessor :caller_supplied_user_agent
|
|
629
|
+
|
|
630
|
+
def initialize(**args)
|
|
631
|
+
update!(**args)
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
# Update properties of this object
|
|
635
|
+
def update!(**args)
|
|
636
|
+
@caller_ip = args[:caller_ip] if args.key?(:caller_ip)
|
|
637
|
+
@caller_supplied_user_agent = args[:caller_supplied_user_agent] if args.key?(:caller_supplied_user_agent)
|
|
638
|
+
end
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
#
|
|
642
|
+
class QuotaError
|
|
643
|
+
include Google::Apis::Core::Hashable
|
|
644
|
+
|
|
645
|
+
# Subject to whom this error applies. See the specific enum for more details
|
|
646
|
+
# on this field. For example, "clientip:<ip address of client>" or
|
|
647
|
+
# "project:<Google developer project id>".
|
|
648
|
+
# Corresponds to the JSON property `subject`
|
|
649
|
+
# @return [String]
|
|
650
|
+
attr_accessor :subject
|
|
651
|
+
|
|
652
|
+
# Free-form text that provides details on the cause of the error.
|
|
653
|
+
# Corresponds to the JSON property `description`
|
|
654
|
+
# @return [String]
|
|
655
|
+
attr_accessor :description
|
|
656
|
+
|
|
657
|
+
# Error code.
|
|
658
|
+
# Corresponds to the JSON property `code`
|
|
659
|
+
# @return [String]
|
|
660
|
+
attr_accessor :code
|
|
661
|
+
|
|
662
|
+
def initialize(**args)
|
|
663
|
+
update!(**args)
|
|
664
|
+
end
|
|
665
|
+
|
|
666
|
+
# Update properties of this object
|
|
667
|
+
def update!(**args)
|
|
668
|
+
@subject = args[:subject] if args.key?(:subject)
|
|
669
|
+
@description = args[:description] if args.key?(:description)
|
|
670
|
+
@code = args[:code] if args.key?(:code)
|
|
671
|
+
end
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
#
|
|
675
|
+
class CheckInfo
|
|
676
|
+
include Google::Apis::Core::Hashable
|
|
677
|
+
|
|
678
|
+
# A list of fields and label keys that are ignored by the server.
|
|
679
|
+
# The client doesn't need to send them for following requests to improve
|
|
680
|
+
# performance and allow better aggregation.
|
|
681
|
+
# Corresponds to the JSON property `unusedArguments`
|
|
682
|
+
# @return [Array<String>]
|
|
683
|
+
attr_accessor :unused_arguments
|
|
684
|
+
|
|
685
|
+
def initialize(**args)
|
|
686
|
+
update!(**args)
|
|
687
|
+
end
|
|
688
|
+
|
|
689
|
+
# Update properties of this object
|
|
690
|
+
def update!(**args)
|
|
691
|
+
@unused_arguments = args[:unused_arguments] if args.key?(:unused_arguments)
|
|
692
|
+
end
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
# Response message for the ReleaseQuota method.
|
|
696
|
+
class ReleaseQuotaResponse
|
|
697
|
+
include Google::Apis::Core::Hashable
|
|
698
|
+
|
|
699
|
+
# Quota metrics to indicate the result of release. Depending on the
|
|
700
|
+
# request, one or more of the following metrics will be included:
|
|
701
|
+
# 1. For rate quota, per quota group or per quota metric released amount
|
|
702
|
+
# will be specified using the following delta metric:
|
|
703
|
+
# "serviceruntime.googleapis.com/api/consumer/quota_refund_count"
|
|
704
|
+
# 2. For allocation quota, per quota metric total usage will be specified
|
|
705
|
+
# using the following gauge metric:
|
|
706
|
+
# "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
|
|
707
|
+
# 3. For allocation quota, value for each quota limit associated with
|
|
708
|
+
# the metrics will be specified using the following gauge metric:
|
|
709
|
+
# "serviceruntime.googleapis.com/quota/limit"
|
|
710
|
+
# Corresponds to the JSON property `quotaMetrics`
|
|
711
|
+
# @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
|
|
712
|
+
attr_accessor :quota_metrics
|
|
713
|
+
|
|
714
|
+
# The same operation_id value used in the ReleaseQuotaRequest. Used for
|
|
715
|
+
# logging and diagnostics purposes.
|
|
716
|
+
# Corresponds to the JSON property `operationId`
|
|
717
|
+
# @return [String]
|
|
718
|
+
attr_accessor :operation_id
|
|
719
|
+
|
|
720
|
+
# ID of the actual config used to process the request.
|
|
721
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
722
|
+
# @return [String]
|
|
723
|
+
attr_accessor :service_config_id
|
|
724
|
+
|
|
725
|
+
# Indicates the decision of the release.
|
|
726
|
+
# Corresponds to the JSON property `releaseErrors`
|
|
727
|
+
# @return [Array<Google::Apis::ServicecontrolV1::QuotaError>]
|
|
728
|
+
attr_accessor :release_errors
|
|
729
|
+
|
|
730
|
+
def initialize(**args)
|
|
731
|
+
update!(**args)
|
|
732
|
+
end
|
|
733
|
+
|
|
734
|
+
# Update properties of this object
|
|
735
|
+
def update!(**args)
|
|
736
|
+
@quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics)
|
|
737
|
+
@operation_id = args[:operation_id] if args.key?(:operation_id)
|
|
738
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
739
|
+
@release_errors = args[:release_errors] if args.key?(:release_errors)
|
|
740
|
+
end
|
|
741
|
+
end
|
|
742
|
+
|
|
743
|
+
# Request message for the AllocateQuota method.
|
|
744
|
+
class AllocateQuotaRequest
|
|
745
|
+
include Google::Apis::Core::Hashable
|
|
746
|
+
|
|
747
|
+
# Specifies which version of service configuration should be used to process
|
|
748
|
+
# the request. If unspecified or no matching version can be found, the latest
|
|
749
|
+
# one will be used.
|
|
750
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
751
|
+
# @return [String]
|
|
752
|
+
attr_accessor :service_config_id
|
|
753
|
+
|
|
754
|
+
# Represents information regarding a quota operation.
|
|
755
|
+
# Corresponds to the JSON property `allocateOperation`
|
|
756
|
+
# @return [Google::Apis::ServicecontrolV1::QuotaOperation]
|
|
757
|
+
attr_accessor :allocate_operation
|
|
758
|
+
|
|
759
|
+
# Allocation mode for this operation.
|
|
760
|
+
# Deprecated: use QuotaMode inside the QuotaOperation.
|
|
761
|
+
# Corresponds to the JSON property `allocationMode`
|
|
762
|
+
# @return [String]
|
|
763
|
+
attr_accessor :allocation_mode
|
|
764
|
+
|
|
765
|
+
def initialize(**args)
|
|
766
|
+
update!(**args)
|
|
767
|
+
end
|
|
768
|
+
|
|
769
|
+
# Update properties of this object
|
|
770
|
+
def update!(**args)
|
|
771
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
772
|
+
@allocate_operation = args[:allocate_operation] if args.key?(:allocate_operation)
|
|
773
|
+
@allocation_mode = args[:allocation_mode] if args.key?(:allocation_mode)
|
|
774
|
+
end
|
|
775
|
+
end
|
|
776
|
+
|
|
777
|
+
# Represents a set of metric values in the same metric.
|
|
778
|
+
# Each metric value in the set should have a unique combination of start time,
|
|
779
|
+
# end time, and label values.
|
|
780
|
+
class MetricValueSet
|
|
781
|
+
include Google::Apis::Core::Hashable
|
|
782
|
+
|
|
783
|
+
# The metric name defined in the service configuration.
|
|
784
|
+
# Corresponds to the JSON property `metricName`
|
|
785
|
+
# @return [String]
|
|
786
|
+
attr_accessor :metric_name
|
|
787
|
+
|
|
788
|
+
# The values in this metric.
|
|
789
|
+
# Corresponds to the JSON property `metricValues`
|
|
790
|
+
# @return [Array<Google::Apis::ServicecontrolV1::MetricValue>]
|
|
791
|
+
attr_accessor :metric_values
|
|
792
|
+
|
|
793
|
+
def initialize(**args)
|
|
794
|
+
update!(**args)
|
|
795
|
+
end
|
|
796
|
+
|
|
797
|
+
# Update properties of this object
|
|
798
|
+
def update!(**args)
|
|
799
|
+
@metric_name = args[:metric_name] if args.key?(:metric_name)
|
|
800
|
+
@metric_values = args[:metric_values] if args.key?(:metric_values)
|
|
801
|
+
end
|
|
802
|
+
end
|
|
803
|
+
|
|
804
|
+
# Represents the processing error of one `Operation` in the request.
|
|
805
|
+
class ReportError
|
|
806
|
+
include Google::Apis::Core::Hashable
|
|
807
|
+
|
|
808
|
+
# The Operation.operation_id value from the request.
|
|
809
|
+
# Corresponds to the JSON property `operationId`
|
|
810
|
+
# @return [String]
|
|
811
|
+
attr_accessor :operation_id
|
|
812
|
+
|
|
813
|
+
# The `Status` type defines a logical error model that is suitable for different
|
|
814
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
|
815
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
|
816
|
+
# - Simple to use and understand for most users
|
|
817
|
+
# - Flexible enough to meet unexpected needs
|
|
818
|
+
# # Overview
|
|
819
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
|
820
|
+
# and error details. The error code should be an enum value of
|
|
821
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
|
822
|
+
# error message should be a developer-facing English message that helps
|
|
823
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
|
824
|
+
# error message is needed, put the localized message in the error details or
|
|
825
|
+
# localize it in the client. The optional error details may contain arbitrary
|
|
826
|
+
# information about the error. There is a predefined set of error detail types
|
|
827
|
+
# in the package `google.rpc` which can be used for common error conditions.
|
|
828
|
+
# # Language mapping
|
|
829
|
+
# The `Status` message is the logical representation of the error model, but it
|
|
830
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
|
831
|
+
# exposed in different client libraries and different wire protocols, it can be
|
|
832
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
|
833
|
+
# in Java, but more likely mapped to some error codes in C.
|
|
834
|
+
# # Other uses
|
|
835
|
+
# The error model and the `Status` message can be used in a variety of
|
|
836
|
+
# environments, either with or without APIs, to provide a
|
|
837
|
+
# consistent developer experience across different environments.
|
|
838
|
+
# Example uses of this error model include:
|
|
839
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
|
840
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
|
841
|
+
# errors.
|
|
842
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
|
843
|
+
# have a `Status` message for error reporting purpose.
|
|
844
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
|
845
|
+
# `Status` message should be used directly inside batch response, one for
|
|
846
|
+
# each error sub-response.
|
|
847
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
|
848
|
+
# results in its response, the status of those operations should be
|
|
849
|
+
# represented directly using the `Status` message.
|
|
850
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
|
851
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
|
852
|
+
# Corresponds to the JSON property `status`
|
|
853
|
+
# @return [Google::Apis::ServicecontrolV1::Status]
|
|
854
|
+
attr_accessor :status
|
|
855
|
+
|
|
856
|
+
def initialize(**args)
|
|
857
|
+
update!(**args)
|
|
858
|
+
end
|
|
859
|
+
|
|
860
|
+
# Update properties of this object
|
|
861
|
+
def update!(**args)
|
|
862
|
+
@operation_id = args[:operation_id] if args.key?(:operation_id)
|
|
863
|
+
@status = args[:status] if args.key?(:status)
|
|
864
|
+
end
|
|
865
|
+
end
|
|
866
|
+
|
|
867
|
+
#
|
|
868
|
+
class StartReconciliationRequest
|
|
869
|
+
include Google::Apis::Core::Hashable
|
|
870
|
+
|
|
871
|
+
# Specifies which version of service configuration should be used to process
|
|
872
|
+
# the request. If unspecified or no matching version can be found, the latest
|
|
873
|
+
# one will be used.
|
|
874
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
875
|
+
# @return [String]
|
|
876
|
+
attr_accessor :service_config_id
|
|
877
|
+
|
|
878
|
+
# Represents information regarding a quota operation.
|
|
879
|
+
# Corresponds to the JSON property `reconciliationOperation`
|
|
880
|
+
# @return [Google::Apis::ServicecontrolV1::QuotaOperation]
|
|
881
|
+
attr_accessor :reconciliation_operation
|
|
882
|
+
|
|
883
|
+
def initialize(**args)
|
|
884
|
+
update!(**args)
|
|
885
|
+
end
|
|
886
|
+
|
|
887
|
+
# Update properties of this object
|
|
888
|
+
def update!(**args)
|
|
889
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
890
|
+
@reconciliation_operation = args[:reconciliation_operation] if args.key?(:reconciliation_operation)
|
|
891
|
+
end
|
|
892
|
+
end
|
|
893
|
+
|
|
894
|
+
# Defines the errors to be returned in
|
|
895
|
+
# google.api.servicecontrol.v1.CheckResponse.check_errors.
|
|
896
|
+
class CheckError
|
|
897
|
+
include Google::Apis::Core::Hashable
|
|
898
|
+
|
|
899
|
+
# Free-form text providing details on the error cause of the error.
|
|
900
|
+
# Corresponds to the JSON property `detail`
|
|
901
|
+
# @return [String]
|
|
902
|
+
attr_accessor :detail
|
|
903
|
+
|
|
904
|
+
# The error code.
|
|
905
|
+
# Corresponds to the JSON property `code`
|
|
906
|
+
# @return [String]
|
|
907
|
+
attr_accessor :code
|
|
908
|
+
|
|
909
|
+
def initialize(**args)
|
|
910
|
+
update!(**args)
|
|
911
|
+
end
|
|
912
|
+
|
|
913
|
+
# Update properties of this object
|
|
914
|
+
def update!(**args)
|
|
915
|
+
@detail = args[:detail] if args.key?(:detail)
|
|
916
|
+
@code = args[:code] if args.key?(:code)
|
|
917
|
+
end
|
|
918
|
+
end
|
|
919
|
+
|
|
920
|
+
# Contains the quota information for a quota check response.
|
|
921
|
+
class QuotaInfo
|
|
922
|
+
include Google::Apis::Core::Hashable
|
|
923
|
+
|
|
924
|
+
# Map of quota group name to the actual number of tokens consumed. If the
|
|
925
|
+
# quota check was not successful, then this will not be populated due to no
|
|
926
|
+
# quota consumption.
|
|
927
|
+
# Deprecated: Use quota_metrics to get per quota group usage.
|
|
928
|
+
# Corresponds to the JSON property `quotaConsumed`
|
|
929
|
+
# @return [Hash<String,Fixnum>]
|
|
930
|
+
attr_accessor :quota_consumed
|
|
931
|
+
|
|
932
|
+
# Quota metrics to indicate the usage. Depending on the check request, one or
|
|
933
|
+
# more of the following metrics will be included:
|
|
934
|
+
# 1. For rate quota, per quota group or per quota metric incremental usage
|
|
935
|
+
# will be specified using the following delta metric:
|
|
936
|
+
# "serviceruntime.googleapis.com/api/consumer/quota_used_count"
|
|
937
|
+
# 2. For allocation quota, per quota metric total usage will be specified
|
|
938
|
+
# using the following gauge metric:
|
|
939
|
+
# "serviceruntime.googleapis.com/allocation/consumer/quota_used_count"
|
|
940
|
+
# 3. For both rate quota and allocation quota, the quota limit reached
|
|
941
|
+
# condition will be specified using the following boolean metric:
|
|
942
|
+
# "serviceruntime.googleapis.com/quota/exceeded"
|
|
943
|
+
# Corresponds to the JSON property `quotaMetrics`
|
|
944
|
+
# @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
|
|
945
|
+
attr_accessor :quota_metrics
|
|
946
|
+
|
|
947
|
+
# Quota Metrics that have exceeded quota limits.
|
|
948
|
+
# For QuotaGroup-based quota, this is QuotaGroup.name
|
|
949
|
+
# For QuotaLimit-based quota, this is QuotaLimit.name
|
|
950
|
+
# See: google.api.Quota
|
|
951
|
+
# Deprecated: Use quota_metrics to get per quota group limit exceeded status.
|
|
952
|
+
# Corresponds to the JSON property `limitExceeded`
|
|
953
|
+
# @return [Array<String>]
|
|
954
|
+
attr_accessor :limit_exceeded
|
|
955
|
+
|
|
956
|
+
def initialize(**args)
|
|
957
|
+
update!(**args)
|
|
958
|
+
end
|
|
959
|
+
|
|
960
|
+
# Update properties of this object
|
|
961
|
+
def update!(**args)
|
|
962
|
+
@quota_consumed = args[:quota_consumed] if args.key?(:quota_consumed)
|
|
963
|
+
@quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics)
|
|
964
|
+
@limit_exceeded = args[:limit_exceeded] if args.key?(:limit_exceeded)
|
|
965
|
+
end
|
|
966
|
+
end
|
|
967
|
+
|
|
968
|
+
# Request message for the Check method.
|
|
969
|
+
class CheckRequest
|
|
970
|
+
include Google::Apis::Core::Hashable
|
|
971
|
+
|
|
972
|
+
# Indicates if service activation check should be skipped for this request.
|
|
973
|
+
# Default behavior is to perform the check and apply relevant quota.
|
|
974
|
+
# Corresponds to the JSON property `skipActivationCheck`
|
|
975
|
+
# @return [Boolean]
|
|
976
|
+
attr_accessor :skip_activation_check
|
|
977
|
+
alias_method :skip_activation_check?, :skip_activation_check
|
|
978
|
+
|
|
979
|
+
# Represents information regarding an operation.
|
|
980
|
+
# Corresponds to the JSON property `operation`
|
|
981
|
+
# @return [Google::Apis::ServicecontrolV1::Operation]
|
|
982
|
+
attr_accessor :operation
|
|
983
|
+
|
|
984
|
+
# Requests the project settings to be returned as part of the check response.
|
|
985
|
+
# Corresponds to the JSON property `requestProjectSettings`
|
|
986
|
+
# @return [Boolean]
|
|
987
|
+
attr_accessor :request_project_settings
|
|
988
|
+
alias_method :request_project_settings?, :request_project_settings
|
|
989
|
+
|
|
990
|
+
# Specifies which version of service configuration should be used to process
|
|
991
|
+
# the request.
|
|
992
|
+
# If unspecified or no matching version can be found, the
|
|
993
|
+
# latest one will be used.
|
|
994
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
995
|
+
# @return [String]
|
|
996
|
+
attr_accessor :service_config_id
|
|
997
|
+
|
|
998
|
+
def initialize(**args)
|
|
999
|
+
update!(**args)
|
|
1000
|
+
end
|
|
1001
|
+
|
|
1002
|
+
# Update properties of this object
|
|
1003
|
+
def update!(**args)
|
|
1004
|
+
@skip_activation_check = args[:skip_activation_check] if args.key?(:skip_activation_check)
|
|
1005
|
+
@operation = args[:operation] if args.key?(:operation)
|
|
1006
|
+
@request_project_settings = args[:request_project_settings] if args.key?(:request_project_settings)
|
|
1007
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
1008
|
+
end
|
|
1009
|
+
end
|
|
1010
|
+
|
|
1011
|
+
# Represents information regarding a quota operation.
|
|
1012
|
+
class QuotaOperation
|
|
1013
|
+
include Google::Apis::Core::Hashable
|
|
1014
|
+
|
|
1015
|
+
# Identity of the consumer for whom this quota operation is being performed.
|
|
1016
|
+
# This can be in one of the following formats:
|
|
1017
|
+
# project:<project_id>,
|
|
1018
|
+
# project_number:<project_number>,
|
|
1019
|
+
# api_key:<api_key>.
|
|
1020
|
+
# Corresponds to the JSON property `consumerId`
|
|
1021
|
+
# @return [String]
|
|
1022
|
+
attr_accessor :consumer_id
|
|
1023
|
+
|
|
1024
|
+
# Identity of the operation. This must be unique within the scope of the
|
|
1025
|
+
# service that generated the operation. If the service calls AllocateQuota
|
|
1026
|
+
# and ReleaseQuota on the same operation, the two calls should carry the
|
|
1027
|
+
# same ID.
|
|
1028
|
+
# UUID version 4 is recommended, though not required. In scenarios where an
|
|
1029
|
+
# operation is computed from existing information and an idempotent id is
|
|
1030
|
+
# desirable for deduplication purpose, UUID version 5 is recommended. See
|
|
1031
|
+
# RFC 4122 for details.
|
|
1032
|
+
# Corresponds to the JSON property `operationId`
|
|
1033
|
+
# @return [String]
|
|
1034
|
+
attr_accessor :operation_id
|
|
1035
|
+
|
|
1036
|
+
# Quota mode for this operation.
|
|
1037
|
+
# Corresponds to the JSON property `quotaMode`
|
|
1038
|
+
# @return [String]
|
|
1039
|
+
attr_accessor :quota_mode
|
|
1040
|
+
|
|
1041
|
+
# Fully qualified name of the API method for which this quota operation is
|
|
1042
|
+
# requested. This name is used for matching quota rules or metric rules and
|
|
1043
|
+
# billing status rules defined in service configuration. This field is not
|
|
1044
|
+
# required if the quota operation is performed on non-API resources.
|
|
1045
|
+
# Example of an RPC method name:
|
|
1046
|
+
# google.example.library.v1.LibraryService.CreateShelf
|
|
1047
|
+
# Corresponds to the JSON property `methodName`
|
|
1048
|
+
# @return [String]
|
|
1049
|
+
attr_accessor :method_name
|
|
1050
|
+
|
|
1051
|
+
# Represents information about this operation. Each MetricValueSet
|
|
1052
|
+
# corresponds to a metric defined in the service configuration.
|
|
1053
|
+
# The data type used in the MetricValueSet must agree with
|
|
1054
|
+
# the data type specified in the metric definition.
|
|
1055
|
+
# Within a single operation, it is not allowed to have more than one
|
|
1056
|
+
# MetricValue instances that have the same metric names and identical
|
|
1057
|
+
# label value combinations. If a request has such duplicated MetricValue
|
|
1058
|
+
# instances, the entire request is rejected with
|
|
1059
|
+
# an invalid argument error.
|
|
1060
|
+
# Corresponds to the JSON property `quotaMetrics`
|
|
1061
|
+
# @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
|
|
1062
|
+
attr_accessor :quota_metrics
|
|
1063
|
+
|
|
1064
|
+
# Labels describing the operation.
|
|
1065
|
+
# Corresponds to the JSON property `labels`
|
|
1066
|
+
# @return [Hash<String,String>]
|
|
1067
|
+
attr_accessor :labels
|
|
1068
|
+
|
|
1069
|
+
def initialize(**args)
|
|
1070
|
+
update!(**args)
|
|
1071
|
+
end
|
|
1072
|
+
|
|
1073
|
+
# Update properties of this object
|
|
1074
|
+
def update!(**args)
|
|
1075
|
+
@consumer_id = args[:consumer_id] if args.key?(:consumer_id)
|
|
1076
|
+
@operation_id = args[:operation_id] if args.key?(:operation_id)
|
|
1077
|
+
@quota_mode = args[:quota_mode] if args.key?(:quota_mode)
|
|
1078
|
+
@method_name = args[:method_name] if args.key?(:method_name)
|
|
1079
|
+
@quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics)
|
|
1080
|
+
@labels = args[:labels] if args.key?(:labels)
|
|
1081
|
+
end
|
|
1082
|
+
end
|
|
1083
|
+
|
|
1084
|
+
#
|
|
1085
|
+
class EndReconciliationRequest
|
|
1086
|
+
include Google::Apis::Core::Hashable
|
|
1087
|
+
|
|
1088
|
+
# Represents information regarding a quota operation.
|
|
1089
|
+
# Corresponds to the JSON property `reconciliationOperation`
|
|
1090
|
+
# @return [Google::Apis::ServicecontrolV1::QuotaOperation]
|
|
1091
|
+
attr_accessor :reconciliation_operation
|
|
1092
|
+
|
|
1093
|
+
# Specifies which version of service configuration should be used to process
|
|
1094
|
+
# the request. If unspecified or no matching version can be found, the latest
|
|
1095
|
+
# one will be used.
|
|
1096
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
1097
|
+
# @return [String]
|
|
1098
|
+
attr_accessor :service_config_id
|
|
1099
|
+
|
|
1100
|
+
def initialize(**args)
|
|
1101
|
+
update!(**args)
|
|
1102
|
+
end
|
|
1103
|
+
|
|
1104
|
+
# Update properties of this object
|
|
1105
|
+
def update!(**args)
|
|
1106
|
+
@reconciliation_operation = args[:reconciliation_operation] if args.key?(:reconciliation_operation)
|
|
1107
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
1108
|
+
end
|
|
1109
|
+
end
|
|
1110
|
+
|
|
1111
|
+
#
|
|
1112
|
+
class ReportInfo
|
|
1113
|
+
include Google::Apis::Core::Hashable
|
|
1114
|
+
|
|
1115
|
+
# The Operation.operation_id value from the request.
|
|
1116
|
+
# Corresponds to the JSON property `operationId`
|
|
1117
|
+
# @return [String]
|
|
1118
|
+
attr_accessor :operation_id
|
|
1119
|
+
|
|
1120
|
+
# Contains the quota information for a quota check response.
|
|
1121
|
+
# Corresponds to the JSON property `quotaInfo`
|
|
1122
|
+
# @return [Google::Apis::ServicecontrolV1::QuotaInfo]
|
|
1123
|
+
attr_accessor :quota_info
|
|
1124
|
+
|
|
1125
|
+
def initialize(**args)
|
|
1126
|
+
update!(**args)
|
|
1127
|
+
end
|
|
1128
|
+
|
|
1129
|
+
# Update properties of this object
|
|
1130
|
+
def update!(**args)
|
|
1131
|
+
@operation_id = args[:operation_id] if args.key?(:operation_id)
|
|
1132
|
+
@quota_info = args[:quota_info] if args.key?(:quota_info)
|
|
1133
|
+
end
|
|
1134
|
+
end
|
|
1135
|
+
|
|
1136
|
+
# Represents information regarding an operation.
|
|
1137
|
+
class Operation
|
|
1138
|
+
include Google::Apis::Core::Hashable
|
|
1139
|
+
|
|
1140
|
+
# Fully qualified name of the operation. Reserved for future use.
|
|
1141
|
+
# Corresponds to the JSON property `operationName`
|
|
1142
|
+
# @return [String]
|
|
1143
|
+
attr_accessor :operation_name
|
|
1144
|
+
|
|
1145
|
+
# End time of the operation.
|
|
1146
|
+
# Required when the operation is used in ServiceController.Report,
|
|
1147
|
+
# but optional when the operation is used in ServiceController.Check.
|
|
1148
|
+
# Corresponds to the JSON property `endTime`
|
|
1149
|
+
# @return [String]
|
|
1150
|
+
attr_accessor :end_time
|
|
1151
|
+
|
|
1152
|
+
# Required. Start time of the operation.
|
|
1153
|
+
# Corresponds to the JSON property `startTime`
|
|
1154
|
+
# @return [String]
|
|
1155
|
+
attr_accessor :start_time
|
|
1156
|
+
|
|
1157
|
+
# DO NOT USE. This is an experimental field.
|
|
1158
|
+
# Corresponds to the JSON property `importance`
|
|
1159
|
+
# @return [String]
|
|
1160
|
+
attr_accessor :importance
|
|
1161
|
+
|
|
1162
|
+
# The resource name of the parent of a resource in the resource hierarchy.
|
|
1163
|
+
# This can be in one of the following formats:
|
|
1164
|
+
# - “projects/<project-id or project-number>”
|
|
1165
|
+
# - “folders/<folder-id>”
|
|
1166
|
+
# - “organizations/<organization-id>”
|
|
1167
|
+
# Corresponds to the JSON property `resourceContainer`
|
|
1168
|
+
# @return [String]
|
|
1169
|
+
attr_accessor :resource_container
|
|
1170
|
+
|
|
1171
|
+
# Labels describing the operation. Only the following labels are allowed:
|
|
1172
|
+
# - Labels describing monitored resources as defined in
|
|
1173
|
+
# the service configuration.
|
|
1174
|
+
# - Default labels of metric values. When specified, labels defined in the
|
|
1175
|
+
# metric value override these default.
|
|
1176
|
+
# - The following labels defined by Google Cloud Platform:
|
|
1177
|
+
# - `cloud.googleapis.com/location` describing the location where the
|
|
1178
|
+
# operation happened,
|
|
1179
|
+
# - `servicecontrol.googleapis.com/user_agent` describing the user agent
|
|
1180
|
+
# of the API request,
|
|
1181
|
+
# - `servicecontrol.googleapis.com/service_agent` describing the service
|
|
1182
|
+
# used to handle the API request (e.g. ESP),
|
|
1183
|
+
# - `servicecontrol.googleapis.com/platform` describing the platform
|
|
1184
|
+
# where the API is served (e.g. GAE, GCE, GKE).
|
|
1185
|
+
# Corresponds to the JSON property `labels`
|
|
1186
|
+
# @return [Hash<String,String>]
|
|
1187
|
+
attr_accessor :labels
|
|
1188
|
+
|
|
1189
|
+
# Represents information to be logged.
|
|
1190
|
+
# Corresponds to the JSON property `logEntries`
|
|
1191
|
+
# @return [Array<Google::Apis::ServicecontrolV1::LogEntry>]
|
|
1192
|
+
attr_accessor :log_entries
|
|
1193
|
+
|
|
1194
|
+
# User defined labels for the resource that this operation is associated
|
|
1195
|
+
# with.
|
|
1196
|
+
# Corresponds to the JSON property `userLabels`
|
|
1197
|
+
# @return [Hash<String,String>]
|
|
1198
|
+
attr_accessor :user_labels
|
|
1199
|
+
|
|
1200
|
+
# Represents information about this operation. Each MetricValueSet
|
|
1201
|
+
# corresponds to a metric defined in the service configuration.
|
|
1202
|
+
# The data type used in the MetricValueSet must agree with
|
|
1203
|
+
# the data type specified in the metric definition.
|
|
1204
|
+
# Within a single operation, it is not allowed to have more than one
|
|
1205
|
+
# MetricValue instances that have the same metric names and identical
|
|
1206
|
+
# label value combinations. If a request has such duplicated MetricValue
|
|
1207
|
+
# instances, the entire request is rejected with
|
|
1208
|
+
# an invalid argument error.
|
|
1209
|
+
# Corresponds to the JSON property `metricValueSets`
|
|
1210
|
+
# @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
|
|
1211
|
+
attr_accessor :metric_value_sets
|
|
1212
|
+
|
|
1213
|
+
# Represents the properties needed for quota operations.
|
|
1214
|
+
# Corresponds to the JSON property `quotaProperties`
|
|
1215
|
+
# @return [Google::Apis::ServicecontrolV1::QuotaProperties]
|
|
1216
|
+
attr_accessor :quota_properties
|
|
1217
|
+
|
|
1218
|
+
# Identity of the consumer who is using the service.
|
|
1219
|
+
# This field should be filled in for the operations initiated by a
|
|
1220
|
+
# consumer, but not for service-initiated operations that are
|
|
1221
|
+
# not related to a specific consumer.
|
|
1222
|
+
# This can be in one of the following formats:
|
|
1223
|
+
# project:<project_id>,
|
|
1224
|
+
# project_number:<project_number>,
|
|
1225
|
+
# api_key:<api_key>.
|
|
1226
|
+
# Corresponds to the JSON property `consumerId`
|
|
1227
|
+
# @return [String]
|
|
1228
|
+
attr_accessor :consumer_id
|
|
1229
|
+
|
|
1230
|
+
# Identity of the operation. This must be unique within the scope of the
|
|
1231
|
+
# service that generated the operation. If the service calls
|
|
1232
|
+
# Check() and Report() on the same operation, the two calls should carry
|
|
1233
|
+
# the same id.
|
|
1234
|
+
# UUID version 4 is recommended, though not required.
|
|
1235
|
+
# In scenarios where an operation is computed from existing information
|
|
1236
|
+
# and an idempotent id is desirable for deduplication purpose, UUID version 5
|
|
1237
|
+
# is recommended. See RFC 4122 for details.
|
|
1238
|
+
# Corresponds to the JSON property `operationId`
|
|
1239
|
+
# @return [String]
|
|
1240
|
+
attr_accessor :operation_id
|
|
1241
|
+
|
|
1242
|
+
def initialize(**args)
|
|
1243
|
+
update!(**args)
|
|
1244
|
+
end
|
|
1245
|
+
|
|
1246
|
+
# Update properties of this object
|
|
1247
|
+
def update!(**args)
|
|
1248
|
+
@operation_name = args[:operation_name] if args.key?(:operation_name)
|
|
1249
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
|
1250
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
|
1251
|
+
@importance = args[:importance] if args.key?(:importance)
|
|
1252
|
+
@resource_container = args[:resource_container] if args.key?(:resource_container)
|
|
1253
|
+
@labels = args[:labels] if args.key?(:labels)
|
|
1254
|
+
@log_entries = args[:log_entries] if args.key?(:log_entries)
|
|
1255
|
+
@user_labels = args[:user_labels] if args.key?(:user_labels)
|
|
1256
|
+
@metric_value_sets = args[:metric_value_sets] if args.key?(:metric_value_sets)
|
|
1257
|
+
@quota_properties = args[:quota_properties] if args.key?(:quota_properties)
|
|
1258
|
+
@consumer_id = args[:consumer_id] if args.key?(:consumer_id)
|
|
1259
|
+
@operation_id = args[:operation_id] if args.key?(:operation_id)
|
|
1260
|
+
end
|
|
1261
|
+
end
|
|
1262
|
+
|
|
1263
|
+
# Response message for the Report method.
|
|
1264
|
+
class ReportResponse
|
|
1265
|
+
include Google::Apis::Core::Hashable
|
|
1266
|
+
|
|
1267
|
+
# Quota usage for each quota release `Operation` request.
|
|
1268
|
+
# Fully or partially failed quota release request may or may not be present
|
|
1269
|
+
# in `report_quota_info`. For example, a failed quota release request will
|
|
1270
|
+
# have the current quota usage info when precise quota library returns the
|
|
1271
|
+
# info. A deadline exceeded quota request will not have quota usage info.
|
|
1272
|
+
# If there is no quota release request, report_quota_info will be empty.
|
|
1273
|
+
# Corresponds to the JSON property `reportInfos`
|
|
1274
|
+
# @return [Array<Google::Apis::ServicecontrolV1::ReportInfo>]
|
|
1275
|
+
attr_accessor :report_infos
|
|
1276
|
+
|
|
1277
|
+
# The actual config id used to process the request.
|
|
1278
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
1279
|
+
# @return [String]
|
|
1280
|
+
attr_accessor :service_config_id
|
|
1281
|
+
|
|
1282
|
+
# Partial failures, one for each `Operation` in the request that failed
|
|
1283
|
+
# processing. There are three possible combinations of the RPC status:
|
|
1284
|
+
# 1. The combination of a successful RPC status and an empty `report_errors`
|
|
1285
|
+
# list indicates a complete success where all `Operations` in the
|
|
1286
|
+
# request are processed successfully.
|
|
1287
|
+
# 2. The combination of a successful RPC status and a non-empty
|
|
1288
|
+
# `report_errors` list indicates a partial success where some
|
|
1289
|
+
# `Operations` in the request succeeded. Each
|
|
1290
|
+
# `Operation` that failed processing has a corresponding item
|
|
1291
|
+
# in this list.
|
|
1292
|
+
# 3. A failed RPC status indicates a general non-deterministic failure.
|
|
1293
|
+
# When this happens, it's impossible to know which of the
|
|
1294
|
+
# 'Operations' in the request succeeded or failed.
|
|
1295
|
+
# Corresponds to the JSON property `reportErrors`
|
|
1296
|
+
# @return [Array<Google::Apis::ServicecontrolV1::ReportError>]
|
|
1297
|
+
attr_accessor :report_errors
|
|
1298
|
+
|
|
1299
|
+
def initialize(**args)
|
|
1300
|
+
update!(**args)
|
|
1301
|
+
end
|
|
1302
|
+
|
|
1303
|
+
# Update properties of this object
|
|
1304
|
+
def update!(**args)
|
|
1305
|
+
@report_infos = args[:report_infos] if args.key?(:report_infos)
|
|
1306
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
1307
|
+
@report_errors = args[:report_errors] if args.key?(:report_errors)
|
|
1308
|
+
end
|
|
1309
|
+
end
|
|
1310
|
+
|
|
1311
|
+
# Response message for the Check method.
|
|
1312
|
+
class CheckResponse
|
|
1313
|
+
include Google::Apis::Core::Hashable
|
|
1314
|
+
|
|
1315
|
+
# The same operation_id value used in the CheckRequest.
|
|
1316
|
+
# Used for logging and diagnostics purposes.
|
|
1317
|
+
# Corresponds to the JSON property `operationId`
|
|
1318
|
+
# @return [String]
|
|
1319
|
+
attr_accessor :operation_id
|
|
1320
|
+
|
|
1321
|
+
# Indicate the decision of the check.
|
|
1322
|
+
# If no check errors are present, the service should process the operation.
|
|
1323
|
+
# Otherwise the service should use the list of errors to determine the
|
|
1324
|
+
# appropriate action.
|
|
1325
|
+
# Corresponds to the JSON property `checkErrors`
|
|
1326
|
+
# @return [Array<Google::Apis::ServicecontrolV1::CheckError>]
|
|
1327
|
+
attr_accessor :check_errors
|
|
1328
|
+
|
|
1329
|
+
# Feedback data returned from the server during processing a Check request.
|
|
1330
|
+
# Corresponds to the JSON property `checkInfo`
|
|
1331
|
+
# @return [Google::Apis::ServicecontrolV1::CheckInfo]
|
|
1332
|
+
attr_accessor :check_info
|
|
1333
|
+
|
|
1334
|
+
# Contains the quota information for a quota check response.
|
|
1335
|
+
# Corresponds to the JSON property `quotaInfo`
|
|
1336
|
+
# @return [Google::Apis::ServicecontrolV1::QuotaInfo]
|
|
1337
|
+
attr_accessor :quota_info
|
|
1338
|
+
|
|
1339
|
+
# The actual config id used to process the request.
|
|
1340
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
1341
|
+
# @return [String]
|
|
1342
|
+
attr_accessor :service_config_id
|
|
1343
|
+
|
|
1344
|
+
def initialize(**args)
|
|
1345
|
+
update!(**args)
|
|
1346
|
+
end
|
|
1347
|
+
|
|
1348
|
+
# Update properties of this object
|
|
1349
|
+
def update!(**args)
|
|
1350
|
+
@operation_id = args[:operation_id] if args.key?(:operation_id)
|
|
1351
|
+
@check_errors = args[:check_errors] if args.key?(:check_errors)
|
|
1352
|
+
@check_info = args[:check_info] if args.key?(:check_info)
|
|
1353
|
+
@quota_info = args[:quota_info] if args.key?(:quota_info)
|
|
1354
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
1355
|
+
end
|
|
1356
|
+
end
|
|
1357
|
+
|
|
1358
|
+
# The `Status` type defines a logical error model that is suitable for different
|
|
1359
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
|
1360
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
|
1361
|
+
# - Simple to use and understand for most users
|
|
1362
|
+
# - Flexible enough to meet unexpected needs
|
|
1363
|
+
# # Overview
|
|
1364
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
|
1365
|
+
# and error details. The error code should be an enum value of
|
|
1366
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
|
1367
|
+
# error message should be a developer-facing English message that helps
|
|
1368
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
|
1369
|
+
# error message is needed, put the localized message in the error details or
|
|
1370
|
+
# localize it in the client. The optional error details may contain arbitrary
|
|
1371
|
+
# information about the error. There is a predefined set of error detail types
|
|
1372
|
+
# in the package `google.rpc` which can be used for common error conditions.
|
|
1373
|
+
# # Language mapping
|
|
1374
|
+
# The `Status` message is the logical representation of the error model, but it
|
|
1375
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
|
1376
|
+
# exposed in different client libraries and different wire protocols, it can be
|
|
1377
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
|
1378
|
+
# in Java, but more likely mapped to some error codes in C.
|
|
1379
|
+
# # Other uses
|
|
1380
|
+
# The error model and the `Status` message can be used in a variety of
|
|
1381
|
+
# environments, either with or without APIs, to provide a
|
|
1382
|
+
# consistent developer experience across different environments.
|
|
1383
|
+
# Example uses of this error model include:
|
|
1384
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
|
1385
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
|
1386
|
+
# errors.
|
|
1387
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
|
1388
|
+
# have a `Status` message for error reporting purpose.
|
|
1389
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
|
1390
|
+
# `Status` message should be used directly inside batch response, one for
|
|
1391
|
+
# each error sub-response.
|
|
1392
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
|
1393
|
+
# results in its response, the status of those operations should be
|
|
1394
|
+
# represented directly using the `Status` message.
|
|
1395
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
|
1396
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
|
1397
|
+
class Status
|
|
1398
|
+
include Google::Apis::Core::Hashable
|
|
1399
|
+
|
|
1400
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
|
1401
|
+
# Corresponds to the JSON property `code`
|
|
1402
|
+
# @return [Fixnum]
|
|
1403
|
+
attr_accessor :code
|
|
1404
|
+
|
|
1405
|
+
# A developer-facing error message, which should be in English. Any
|
|
1406
|
+
# user-facing error message should be localized and sent in the
|
|
1407
|
+
# google.rpc.Status.details field, or localized by the client.
|
|
1408
|
+
# Corresponds to the JSON property `message`
|
|
1409
|
+
# @return [String]
|
|
1410
|
+
attr_accessor :message
|
|
1411
|
+
|
|
1412
|
+
# A list of messages that carry the error details. There will be a
|
|
1413
|
+
# common set of message types for APIs to use.
|
|
1414
|
+
# Corresponds to the JSON property `details`
|
|
1415
|
+
# @return [Array<Hash<String,Object>>]
|
|
1416
|
+
attr_accessor :details
|
|
1417
|
+
|
|
1418
|
+
def initialize(**args)
|
|
1419
|
+
update!(**args)
|
|
1420
|
+
end
|
|
1421
|
+
|
|
1422
|
+
# Update properties of this object
|
|
1423
|
+
def update!(**args)
|
|
1424
|
+
@code = args[:code] if args.key?(:code)
|
|
1425
|
+
@message = args[:message] if args.key?(:message)
|
|
1426
|
+
@details = args[:details] if args.key?(:details)
|
|
1427
|
+
end
|
|
1428
|
+
end
|
|
1429
|
+
|
|
1430
|
+
# Request message for the Report method.
|
|
1431
|
+
class ReportRequest
|
|
1432
|
+
include Google::Apis::Core::Hashable
|
|
1433
|
+
|
|
1434
|
+
# Operations to be reported.
|
|
1435
|
+
# Typically the service should report one operation per request.
|
|
1436
|
+
# Putting multiple operations into a single request is allowed, but should
|
|
1437
|
+
# be used only when multiple operations are natually available at the time
|
|
1438
|
+
# of the report.
|
|
1439
|
+
# If multiple operations are in a single request, the total request size
|
|
1440
|
+
# should be no larger than 1MB. See ReportResponse.report_errors for
|
|
1441
|
+
# partial failure behavior.
|
|
1442
|
+
# Corresponds to the JSON property `operations`
|
|
1443
|
+
# @return [Array<Google::Apis::ServicecontrolV1::Operation>]
|
|
1444
|
+
attr_accessor :operations
|
|
1445
|
+
|
|
1446
|
+
# Specifies which version of service config should be used to process the
|
|
1447
|
+
# request.
|
|
1448
|
+
# If unspecified or no matching version can be found, the
|
|
1449
|
+
# latest one will be used.
|
|
1450
|
+
# Corresponds to the JSON property `serviceConfigId`
|
|
1451
|
+
# @return [String]
|
|
1452
|
+
attr_accessor :service_config_id
|
|
1453
|
+
|
|
1454
|
+
def initialize(**args)
|
|
1455
|
+
update!(**args)
|
|
1456
|
+
end
|
|
1457
|
+
|
|
1458
|
+
# Update properties of this object
|
|
1459
|
+
def update!(**args)
|
|
1460
|
+
@operations = args[:operations] if args.key?(:operations)
|
|
1461
|
+
@service_config_id = args[:service_config_id] if args.key?(:service_config_id)
|
|
1462
|
+
end
|
|
1463
|
+
end
|
|
1464
|
+
|
|
1465
|
+
# Common audit log format for Google Cloud Platform API operations.
|
|
1466
|
+
class AuditLog
|
|
1467
|
+
include Google::Apis::Core::Hashable
|
|
1468
|
+
|
|
1469
|
+
# Other service-specific data about the request, response, and other
|
|
1470
|
+
# activities.
|
|
1471
|
+
# Corresponds to the JSON property `serviceData`
|
|
1472
|
+
# @return [Hash<String,Object>]
|
|
1473
|
+
attr_accessor :service_data
|
|
1474
|
+
|
|
1475
|
+
# Metadata about the request.
|
|
1476
|
+
# Corresponds to the JSON property `requestMetadata`
|
|
1477
|
+
# @return [Google::Apis::ServicecontrolV1::RequestMetadata]
|
|
1478
|
+
attr_accessor :request_metadata
|
|
1479
|
+
|
|
1480
|
+
# The number of items returned from a List or Query API method,
|
|
1481
|
+
# if applicable.
|
|
1482
|
+
# Corresponds to the JSON property `numResponseItems`
|
|
1483
|
+
# @return [String]
|
|
1484
|
+
attr_accessor :num_response_items
|
|
1485
|
+
|
|
1486
|
+
# The `Status` type defines a logical error model that is suitable for different
|
|
1487
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
|
1488
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
|
1489
|
+
# - Simple to use and understand for most users
|
|
1490
|
+
# - Flexible enough to meet unexpected needs
|
|
1491
|
+
# # Overview
|
|
1492
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
|
1493
|
+
# and error details. The error code should be an enum value of
|
|
1494
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
|
1495
|
+
# error message should be a developer-facing English message that helps
|
|
1496
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
|
1497
|
+
# error message is needed, put the localized message in the error details or
|
|
1498
|
+
# localize it in the client. The optional error details may contain arbitrary
|
|
1499
|
+
# information about the error. There is a predefined set of error detail types
|
|
1500
|
+
# in the package `google.rpc` which can be used for common error conditions.
|
|
1501
|
+
# # Language mapping
|
|
1502
|
+
# The `Status` message is the logical representation of the error model, but it
|
|
1503
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
|
1504
|
+
# exposed in different client libraries and different wire protocols, it can be
|
|
1505
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
|
1506
|
+
# in Java, but more likely mapped to some error codes in C.
|
|
1507
|
+
# # Other uses
|
|
1508
|
+
# The error model and the `Status` message can be used in a variety of
|
|
1509
|
+
# environments, either with or without APIs, to provide a
|
|
1510
|
+
# consistent developer experience across different environments.
|
|
1511
|
+
# Example uses of this error model include:
|
|
1512
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
|
1513
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
|
1514
|
+
# errors.
|
|
1515
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
|
1516
|
+
# have a `Status` message for error reporting purpose.
|
|
1517
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
|
1518
|
+
# `Status` message should be used directly inside batch response, one for
|
|
1519
|
+
# each error sub-response.
|
|
1520
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
|
1521
|
+
# results in its response, the status of those operations should be
|
|
1522
|
+
# represented directly using the `Status` message.
|
|
1523
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
|
1524
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
|
1525
|
+
# Corresponds to the JSON property `status`
|
|
1526
|
+
# @return [Google::Apis::ServicecontrolV1::Status]
|
|
1527
|
+
attr_accessor :status
|
|
1528
|
+
|
|
1529
|
+
# Authentication information for the operation.
|
|
1530
|
+
# Corresponds to the JSON property `authenticationInfo`
|
|
1531
|
+
# @return [Google::Apis::ServicecontrolV1::AuthenticationInfo]
|
|
1532
|
+
attr_accessor :authentication_info
|
|
1533
|
+
|
|
1534
|
+
# The name of the API service performing the operation. For example,
|
|
1535
|
+
# `"datastore.googleapis.com"`.
|
|
1536
|
+
# Corresponds to the JSON property `serviceName`
|
|
1537
|
+
# @return [String]
|
|
1538
|
+
attr_accessor :service_name
|
|
1539
|
+
|
|
1540
|
+
# The operation response. This may not include all response elements,
|
|
1541
|
+
# such as those that are too large, privacy-sensitive, or duplicated
|
|
1542
|
+
# elsewhere in the log record.
|
|
1543
|
+
# It should never include user-generated data, such as file contents.
|
|
1544
|
+
# When the JSON object represented here has a proto equivalent, the proto
|
|
1545
|
+
# name will be indicated in the `@type` property.
|
|
1546
|
+
# Corresponds to the JSON property `response`
|
|
1547
|
+
# @return [Hash<String,Object>]
|
|
1548
|
+
attr_accessor :response
|
|
1549
|
+
|
|
1550
|
+
# The name of the service method or operation.
|
|
1551
|
+
# For API calls, this should be the name of the API method.
|
|
1552
|
+
# For example,
|
|
1553
|
+
# "google.datastore.v1.Datastore.RunQuery"
|
|
1554
|
+
# "google.logging.v1.LoggingService.DeleteLog"
|
|
1555
|
+
# Corresponds to the JSON property `methodName`
|
|
1556
|
+
# @return [String]
|
|
1557
|
+
attr_accessor :method_name
|
|
1558
|
+
|
|
1559
|
+
# Authorization information. If there are multiple
|
|
1560
|
+
# resources or permissions involved, then there is
|
|
1561
|
+
# one AuthorizationInfo element for each `resource, permission` tuple.
|
|
1562
|
+
# Corresponds to the JSON property `authorizationInfo`
|
|
1563
|
+
# @return [Array<Google::Apis::ServicecontrolV1::AuthorizationInfo>]
|
|
1564
|
+
attr_accessor :authorization_info
|
|
1565
|
+
|
|
1566
|
+
# The resource or collection that is the target of the operation.
|
|
1567
|
+
# The name is a scheme-less URI, not including the API service name.
|
|
1568
|
+
# For example:
|
|
1569
|
+
# "shelves/SHELF_ID/books"
|
|
1570
|
+
# "shelves/SHELF_ID/books/BOOK_ID"
|
|
1571
|
+
# Corresponds to the JSON property `resourceName`
|
|
1572
|
+
# @return [String]
|
|
1573
|
+
attr_accessor :resource_name
|
|
1574
|
+
|
|
1575
|
+
# The operation request. This may not include all request parameters,
|
|
1576
|
+
# such as those that are too large, privacy-sensitive, or duplicated
|
|
1577
|
+
# elsewhere in the log record.
|
|
1578
|
+
# It should never include user-generated data, such as file contents.
|
|
1579
|
+
# When the JSON object represented here has a proto equivalent, the proto
|
|
1580
|
+
# name will be indicated in the `@type` property.
|
|
1581
|
+
# Corresponds to the JSON property `request`
|
|
1582
|
+
# @return [Hash<String,Object>]
|
|
1583
|
+
attr_accessor :request
|
|
1584
|
+
|
|
1585
|
+
def initialize(**args)
|
|
1586
|
+
update!(**args)
|
|
1587
|
+
end
|
|
1588
|
+
|
|
1589
|
+
# Update properties of this object
|
|
1590
|
+
def update!(**args)
|
|
1591
|
+
@service_data = args[:service_data] if args.key?(:service_data)
|
|
1592
|
+
@request_metadata = args[:request_metadata] if args.key?(:request_metadata)
|
|
1593
|
+
@num_response_items = args[:num_response_items] if args.key?(:num_response_items)
|
|
1594
|
+
@status = args[:status] if args.key?(:status)
|
|
1595
|
+
@authentication_info = args[:authentication_info] if args.key?(:authentication_info)
|
|
1596
|
+
@service_name = args[:service_name] if args.key?(:service_name)
|
|
1597
|
+
@response = args[:response] if args.key?(:response)
|
|
1598
|
+
@method_name = args[:method_name] if args.key?(:method_name)
|
|
1599
|
+
@authorization_info = args[:authorization_info] if args.key?(:authorization_info)
|
|
1600
|
+
@resource_name = args[:resource_name] if args.key?(:resource_name)
|
|
1601
|
+
@request = args[:request] if args.key?(:request)
|
|
1602
|
+
end
|
|
1603
|
+
end
|
|
1604
|
+
|
|
1605
|
+
# An individual log entry.
|
|
1606
|
+
class LogEntry
|
|
1607
|
+
include Google::Apis::Core::Hashable
|
|
1608
|
+
|
|
1609
|
+
# A set of user-defined (key, value) data that provides additional
|
|
1610
|
+
# information about the log entry.
|
|
1611
|
+
# Corresponds to the JSON property `labels`
|
|
1612
|
+
# @return [Hash<String,String>]
|
|
1613
|
+
attr_accessor :labels
|
|
1614
|
+
|
|
1615
|
+
# The severity of the log entry. The default value is
|
|
1616
|
+
# `LogSeverity.DEFAULT`.
|
|
1617
|
+
# Corresponds to the JSON property `severity`
|
|
1618
|
+
# @return [String]
|
|
1619
|
+
attr_accessor :severity
|
|
1620
|
+
|
|
1621
|
+
# A unique ID for the log entry used for deduplication. If omitted,
|
|
1622
|
+
# the implementation will generate one based on operation_id.
|
|
1623
|
+
# Corresponds to the JSON property `insertId`
|
|
1624
|
+
# @return [String]
|
|
1625
|
+
attr_accessor :insert_id
|
|
1626
|
+
|
|
1627
|
+
# Required. The log to which this log entry belongs. Examples: `"syslog"`,
|
|
1628
|
+
# `"book_log"`.
|
|
1629
|
+
# Corresponds to the JSON property `name`
|
|
1630
|
+
# @return [String]
|
|
1631
|
+
attr_accessor :name
|
|
1632
|
+
|
|
1633
|
+
# The log entry payload, represented as a structure that
|
|
1634
|
+
# is expressed as a JSON object.
|
|
1635
|
+
# Corresponds to the JSON property `structPayload`
|
|
1636
|
+
# @return [Hash<String,Object>]
|
|
1637
|
+
attr_accessor :struct_payload
|
|
1638
|
+
|
|
1639
|
+
# The log entry payload, represented as a Unicode string (UTF-8).
|
|
1640
|
+
# Corresponds to the JSON property `textPayload`
|
|
1641
|
+
# @return [String]
|
|
1642
|
+
attr_accessor :text_payload
|
|
1643
|
+
|
|
1644
|
+
# The log entry payload, represented as a protocol buffer that is
|
|
1645
|
+
# expressed as a JSON object. You can only pass `protoPayload`
|
|
1646
|
+
# values that belong to a set of approved types.
|
|
1647
|
+
# Corresponds to the JSON property `protoPayload`
|
|
1648
|
+
# @return [Hash<String,Object>]
|
|
1649
|
+
attr_accessor :proto_payload
|
|
1650
|
+
|
|
1651
|
+
# The time the event described by the log entry occurred. If
|
|
1652
|
+
# omitted, defaults to operation start time.
|
|
1653
|
+
# Corresponds to the JSON property `timestamp`
|
|
1654
|
+
# @return [String]
|
|
1655
|
+
attr_accessor :timestamp
|
|
1656
|
+
|
|
1657
|
+
def initialize(**args)
|
|
1658
|
+
update!(**args)
|
|
1659
|
+
end
|
|
1660
|
+
|
|
1661
|
+
# Update properties of this object
|
|
1662
|
+
def update!(**args)
|
|
1663
|
+
@labels = args[:labels] if args.key?(:labels)
|
|
1664
|
+
@severity = args[:severity] if args.key?(:severity)
|
|
1665
|
+
@insert_id = args[:insert_id] if args.key?(:insert_id)
|
|
1666
|
+
@name = args[:name] if args.key?(:name)
|
|
1667
|
+
@struct_payload = args[:struct_payload] if args.key?(:struct_payload)
|
|
1668
|
+
@text_payload = args[:text_payload] if args.key?(:text_payload)
|
|
1669
|
+
@proto_payload = args[:proto_payload] if args.key?(:proto_payload)
|
|
1670
|
+
@timestamp = args[:timestamp] if args.key?(:timestamp)
|
|
1671
|
+
end
|
|
1672
|
+
end
|
|
1673
|
+
end
|
|
1674
|
+
end
|
|
1675
|
+
end
|