google-apis-servicecontrol_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 56a349c0eb2ce4a01798e1bdb85603c2510d578f296bd45502772897a7f1fecb
4
+ data.tar.gz: e77b60366fbea5a10cb5c8760c77afcb0f1cfe51cc516a6c26a807399edd9668
5
+ SHA512:
6
+ metadata.gz: c6f721fb5355894c848f6b1d453bf79f30a5269503914137bc2e8f5d3c0908af59e4de5c686c4bb3b3c37b8c6aa119a9313cf9f904e695a989515cb065486aab
7
+ data.tar.gz: df8b579b832aa791bc40ba6bfd307f9b1ee182dc54035b9433aeb531d935bce5fea5f5b35a6f48a691363985c0d59122695ddcbcceced719f99cfd75a0d0aacb
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-servicecontrol_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/servicecontrol_v1/*.rb
9
+ lib/google/apis/servicecontrol_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-servicecontrol_v1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201207
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1 of the Service Control API
2
+
3
+ This is a simple client library for version V1 of the Service Control API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/servicecontrol.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-servicecontrol_v1', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-servicecontrol_v1
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/servicecontrol_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::ServicecontrolV1::ServiceControlService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Servicecontrol service in particular.)
67
+
68
+ For reference information on specific calls in the Service Control API, see the {Google::Apis::ServicecontrolV1::ServiceControlService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-servicecontrol_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://cloud.google.com/service-control/) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
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"
@@ -0,0 +1,40 @@
1
+ # Copyright 2020 Google LLC
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
+ require 'google/apis/servicecontrol_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Service Control API
23
+ #
24
+ # Provides admission control and telemetry reporting for services integrated
25
+ # with Service Infrastructure.
26
+ #
27
+ # @see https://cloud.google.com/service-control/
28
+ module ServicecontrolV1
29
+ # Version of the Service Control API this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V1'
32
+
33
+ # View and manage your data across Google Cloud Platform services
34
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
35
+
36
+ # Manage your Google Service Control data
37
+ AUTH_SERVICECONTROL = 'https://www.googleapis.com/auth/servicecontrol'
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,2461 @@
1
+ # Copyright 2020 Google LLC
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
+ #
26
+ class AllocateInfo
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # A list of label keys that were unused by the server in processing the request.
30
+ # Thus, for similar requests repeated in a certain future time window, the
31
+ # caller can choose to ignore these labels in the requests to achieve better
32
+ # client-side cache hits and quota aggregation for rate quota. This field is not
33
+ # populated for allocation quota checks.
34
+ # Corresponds to the JSON property `unusedArguments`
35
+ # @return [Array<String>]
36
+ attr_accessor :unused_arguments
37
+
38
+ def initialize(**args)
39
+ update!(**args)
40
+ end
41
+
42
+ # Update properties of this object
43
+ def update!(**args)
44
+ @unused_arguments = args[:unused_arguments] if args.key?(:unused_arguments)
45
+ end
46
+ end
47
+
48
+ # Request message for the AllocateQuota method.
49
+ class AllocateQuotaRequest
50
+ include Google::Apis::Core::Hashable
51
+
52
+ # Represents information regarding a quota operation.
53
+ # Corresponds to the JSON property `allocateOperation`
54
+ # @return [Google::Apis::ServicecontrolV1::QuotaOperation]
55
+ attr_accessor :allocate_operation
56
+
57
+ # Specifies which version of service configuration should be used to process the
58
+ # request. If unspecified or no matching version can be found, the latest one
59
+ # will be used.
60
+ # Corresponds to the JSON property `serviceConfigId`
61
+ # @return [String]
62
+ attr_accessor :service_config_id
63
+
64
+ def initialize(**args)
65
+ update!(**args)
66
+ end
67
+
68
+ # Update properties of this object
69
+ def update!(**args)
70
+ @allocate_operation = args[:allocate_operation] if args.key?(:allocate_operation)
71
+ @service_config_id = args[:service_config_id] if args.key?(:service_config_id)
72
+ end
73
+ end
74
+
75
+ # Response message for the AllocateQuota method.
76
+ class AllocateQuotaResponse
77
+ include Google::Apis::Core::Hashable
78
+
79
+ # Indicates the decision of the allocate.
80
+ # Corresponds to the JSON property `allocateErrors`
81
+ # @return [Array<Google::Apis::ServicecontrolV1::QuotaError>]
82
+ attr_accessor :allocate_errors
83
+
84
+ # WARNING: DO NOT use this field until this warning message is removed.
85
+ # Corresponds to the JSON property `allocateInfo`
86
+ # @return [Google::Apis::ServicecontrolV1::AllocateInfo]
87
+ attr_accessor :allocate_info
88
+
89
+ # The same operation_id value used in the AllocateQuotaRequest. Used for logging
90
+ # and diagnostics purposes.
91
+ # Corresponds to the JSON property `operationId`
92
+ # @return [String]
93
+ attr_accessor :operation_id
94
+
95
+ # Quota metrics to indicate the result of allocation. Depending on the request,
96
+ # one or more of the following metrics will be included: 1. Per quota group or
97
+ # per quota metric incremental usage will be specified using the following delta
98
+ # metric : "serviceruntime.googleapis.com/api/consumer/quota_used_count" 2. The
99
+ # quota limit reached condition will be specified using the following boolean
100
+ # metric : "serviceruntime.googleapis.com/quota/exceeded"
101
+ # Corresponds to the JSON property `quotaMetrics`
102
+ # @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
103
+ attr_accessor :quota_metrics
104
+
105
+ # ID of the actual config used to process the request.
106
+ # Corresponds to the JSON property `serviceConfigId`
107
+ # @return [String]
108
+ attr_accessor :service_config_id
109
+
110
+ def initialize(**args)
111
+ update!(**args)
112
+ end
113
+
114
+ # Update properties of this object
115
+ def update!(**args)
116
+ @allocate_errors = args[:allocate_errors] if args.key?(:allocate_errors)
117
+ @allocate_info = args[:allocate_info] if args.key?(:allocate_info)
118
+ @operation_id = args[:operation_id] if args.key?(:operation_id)
119
+ @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics)
120
+ @service_config_id = args[:service_config_id] if args.key?(:service_config_id)
121
+ end
122
+ end
123
+
124
+ # The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
125
+ class AttributeValue
126
+ include Google::Apis::Core::Hashable
127
+
128
+ # A Boolean value represented by `true` or `false`.
129
+ # Corresponds to the JSON property `boolValue`
130
+ # @return [Boolean]
131
+ attr_accessor :bool_value
132
+ alias_method :bool_value?, :bool_value
133
+
134
+ # A 64-bit signed integer.
135
+ # Corresponds to the JSON property `intValue`
136
+ # @return [Fixnum]
137
+ attr_accessor :int_value
138
+
139
+ # Represents a string that might be shortened to a specified length.
140
+ # Corresponds to the JSON property `stringValue`
141
+ # @return [Google::Apis::ServicecontrolV1::TruncatableString]
142
+ attr_accessor :string_value
143
+
144
+ def initialize(**args)
145
+ update!(**args)
146
+ end
147
+
148
+ # Update properties of this object
149
+ def update!(**args)
150
+ @bool_value = args[:bool_value] if args.key?(:bool_value)
151
+ @int_value = args[:int_value] if args.key?(:int_value)
152
+ @string_value = args[:string_value] if args.key?(:string_value)
153
+ end
154
+ end
155
+
156
+ # A set of attributes, each in the format `[KEY]:[VALUE]`.
157
+ class Attributes
158
+ include Google::Apis::Core::Hashable
159
+
160
+ # The set of attributes. Each attribute's key can be up to 128 bytes long. The
161
+ # value can be a string up to 256 bytes, a signed 64-bit integer, or the Boolean
162
+ # values `true` and `false`. For example: "/instance_id": "my-instance" "/http/
163
+ # user_agent": "" "/http/request_bytes": 300 "abc.com/myattribute": true
164
+ # Corresponds to the JSON property `attributeMap`
165
+ # @return [Hash<String,Google::Apis::ServicecontrolV1::AttributeValue>]
166
+ attr_accessor :attribute_map
167
+
168
+ # The number of attributes that were discarded. Attributes can be discarded
169
+ # because their keys are too long or because there are too many attributes. If
170
+ # this value is 0 then all attributes are valid.
171
+ # Corresponds to the JSON property `droppedAttributesCount`
172
+ # @return [Fixnum]
173
+ attr_accessor :dropped_attributes_count
174
+
175
+ def initialize(**args)
176
+ update!(**args)
177
+ end
178
+
179
+ # Update properties of this object
180
+ def update!(**args)
181
+ @attribute_map = args[:attribute_map] if args.key?(:attribute_map)
182
+ @dropped_attributes_count = args[:dropped_attributes_count] if args.key?(:dropped_attributes_count)
183
+ end
184
+ end
185
+
186
+ # Common audit log format for Google Cloud Platform API operations.
187
+ class AuditLog
188
+ include Google::Apis::Core::Hashable
189
+
190
+ # Authentication information for the operation.
191
+ # Corresponds to the JSON property `authenticationInfo`
192
+ # @return [Google::Apis::ServicecontrolV1::AuthenticationInfo]
193
+ attr_accessor :authentication_info
194
+
195
+ # Authorization information. If there are multiple resources or permissions
196
+ # involved, then there is one AuthorizationInfo element for each `resource,
197
+ # permission` tuple.
198
+ # Corresponds to the JSON property `authorizationInfo`
199
+ # @return [Array<Google::Apis::ServicecontrolV1::AuthorizationInfo>]
200
+ attr_accessor :authorization_info
201
+
202
+ # Other service-specific data about the request, response, and other information
203
+ # associated with the current audited event.
204
+ # Corresponds to the JSON property `metadata`
205
+ # @return [Hash<String,Object>]
206
+ attr_accessor :metadata
207
+
208
+ # The name of the service method or operation. For API calls, this should be the
209
+ # name of the API method. For example, "google.cloud.bigquery.v2.TableService.
210
+ # InsertTable" "google.logging.v2.ConfigServiceV2.CreateSink"
211
+ # Corresponds to the JSON property `methodName`
212
+ # @return [String]
213
+ attr_accessor :method_name
214
+
215
+ # The number of items returned from a List or Query API method, if applicable.
216
+ # Corresponds to the JSON property `numResponseItems`
217
+ # @return [Fixnum]
218
+ attr_accessor :num_response_items
219
+
220
+ # The operation request. This may not include all request parameters, such as
221
+ # those that are too large, privacy-sensitive, or duplicated elsewhere in the
222
+ # log record. It should never include user-generated data, such as file contents.
223
+ # When the JSON object represented here has a proto equivalent, the proto name
224
+ # will be indicated in the `@type` property.
225
+ # Corresponds to the JSON property `request`
226
+ # @return [Hash<String,Object>]
227
+ attr_accessor :request
228
+
229
+ # Metadata about the request.
230
+ # Corresponds to the JSON property `requestMetadata`
231
+ # @return [Google::Apis::ServicecontrolV1::RequestMetadata]
232
+ attr_accessor :request_metadata
233
+
234
+ # Location information about a resource.
235
+ # Corresponds to the JSON property `resourceLocation`
236
+ # @return [Google::Apis::ServicecontrolV1::ResourceLocation]
237
+ attr_accessor :resource_location
238
+
239
+ # The resource or collection that is the target of the operation. The name is a
240
+ # scheme-less URI, not including the API service name. For example: "projects/
241
+ # PROJECT_ID/zones/us-central1-a/instances" "projects/PROJECT_ID/datasets/
242
+ # DATASET_ID"
243
+ # Corresponds to the JSON property `resourceName`
244
+ # @return [String]
245
+ attr_accessor :resource_name
246
+
247
+ # The resource's original state before mutation. Present only for operations
248
+ # which have successfully modified the targeted resource(s). In general, this
249
+ # field should contain all changed fields, except those that are already been
250
+ # included in `request`, `response`, `metadata` or `service_data` fields. When
251
+ # the JSON object represented here has a proto equivalent, the proto name will
252
+ # be indicated in the `@type` property.
253
+ # Corresponds to the JSON property `resourceOriginalState`
254
+ # @return [Hash<String,Object>]
255
+ attr_accessor :resource_original_state
256
+
257
+ # The operation response. This may not include all response elements, such as
258
+ # those that are too large, privacy-sensitive, or duplicated elsewhere in the
259
+ # log record. It should never include user-generated data, such as file contents.
260
+ # When the JSON object represented here has a proto equivalent, the proto name
261
+ # will be indicated in the `@type` property.
262
+ # Corresponds to the JSON property `response`
263
+ # @return [Hash<String,Object>]
264
+ attr_accessor :response
265
+
266
+ # Deprecated. Use the `metadata` field instead. Other service-specific data
267
+ # about the request, response, and other activities.
268
+ # Corresponds to the JSON property `serviceData`
269
+ # @return [Hash<String,Object>]
270
+ attr_accessor :service_data
271
+
272
+ # The name of the API service performing the operation. For example, `"compute.
273
+ # googleapis.com"`.
274
+ # Corresponds to the JSON property `serviceName`
275
+ # @return [String]
276
+ attr_accessor :service_name
277
+
278
+ # The `Status` type defines a logical error model that is suitable for different
279
+ # programming environments, including REST APIs and RPC APIs. It is used by [
280
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
281
+ # data: error code, error message, and error details. You can find out more
282
+ # about this error model and how to work with it in the [API Design Guide](https:
283
+ # //cloud.google.com/apis/design/errors).
284
+ # Corresponds to the JSON property `status`
285
+ # @return [Google::Apis::ServicecontrolV1::Status]
286
+ attr_accessor :status
287
+
288
+ def initialize(**args)
289
+ update!(**args)
290
+ end
291
+
292
+ # Update properties of this object
293
+ def update!(**args)
294
+ @authentication_info = args[:authentication_info] if args.key?(:authentication_info)
295
+ @authorization_info = args[:authorization_info] if args.key?(:authorization_info)
296
+ @metadata = args[:metadata] if args.key?(:metadata)
297
+ @method_name = args[:method_name] if args.key?(:method_name)
298
+ @num_response_items = args[:num_response_items] if args.key?(:num_response_items)
299
+ @request = args[:request] if args.key?(:request)
300
+ @request_metadata = args[:request_metadata] if args.key?(:request_metadata)
301
+ @resource_location = args[:resource_location] if args.key?(:resource_location)
302
+ @resource_name = args[:resource_name] if args.key?(:resource_name)
303
+ @resource_original_state = args[:resource_original_state] if args.key?(:resource_original_state)
304
+ @response = args[:response] if args.key?(:response)
305
+ @service_data = args[:service_data] if args.key?(:service_data)
306
+ @service_name = args[:service_name] if args.key?(:service_name)
307
+ @status = args[:status] if args.key?(:status)
308
+ end
309
+ end
310
+
311
+ # This message defines request authentication attributes. Terminology is based
312
+ # on the JSON Web Token (JWT) standard, but the terms also correlate to concepts
313
+ # in other standards.
314
+ class Auth
315
+ include Google::Apis::Core::Hashable
316
+
317
+ # A list of access level resource names that allow resources to be accessed by
318
+ # authenticated requester. It is part of Secure GCP processing for the incoming
319
+ # request. An access level string has the format: "//`api_service_name`/
320
+ # accessPolicies/`policy_id`/accessLevels/`short_name`" Example: "//
321
+ # accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/
322
+ # MY_LEVEL"
323
+ # Corresponds to the JSON property `accessLevels`
324
+ # @return [Array<String>]
325
+ attr_accessor :access_levels
326
+
327
+ # The intended audience(s) for this authentication information. Reflects the
328
+ # audience (`aud`) claim within a JWT. The audience value(s) depends on the `
329
+ # issuer`, but typically include one or more of the following pieces of
330
+ # information: * The services intended to receive the credential. For example, ["
331
+ # https://pubsub.googleapis.com/", "https://storage.googleapis.com/"]. * A set
332
+ # of service-based scopes. For example, ["https://www.googleapis.com/auth/cloud-
333
+ # platform"]. * The client id of an app, such as the Firebase project id for
334
+ # JWTs from Firebase Auth. Consult the documentation for the credential issuer
335
+ # to determine the information provided.
336
+ # Corresponds to the JSON property `audiences`
337
+ # @return [Array<String>]
338
+ attr_accessor :audiences
339
+
340
+ # Structured claims presented with the credential. JWTs include ``key: value``
341
+ # pairs for standard and private claims. The following is a subset of the
342
+ # standard required and optional claims that would typically be presented for a
343
+ # Google-based JWT: `'iss': 'accounts.google.com', 'sub': '113289723416554971153'
344
+ # , 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.
345
+ # googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp'
346
+ # : 1353604926` SAML assertions are similarly specified, but with an identity
347
+ # provider dependent structure.
348
+ # Corresponds to the JSON property `claims`
349
+ # @return [Hash<String,Object>]
350
+ attr_accessor :claims
351
+
352
+ # The authorized presenter of the credential. Reflects the optional Authorized
353
+ # Presenter (`azp`) claim within a JWT or the OAuth client id. For example, a
354
+ # Google Cloud Platform client id looks as follows: "123456789012.apps.
355
+ # googleusercontent.com".
356
+ # Corresponds to the JSON property `presenter`
357
+ # @return [String]
358
+ attr_accessor :presenter
359
+
360
+ # The authenticated principal. Reflects the issuer (`iss`) and subject (`sub`)
361
+ # claims within a JWT. The issuer and subject should be `/` delimited, with `/`
362
+ # percent-encoded within the subject fragment. For Google accounts, the
363
+ # principal format is: "https://accounts.google.com/`id`"
364
+ # Corresponds to the JSON property `principal`
365
+ # @return [String]
366
+ attr_accessor :principal
367
+
368
+ def initialize(**args)
369
+ update!(**args)
370
+ end
371
+
372
+ # Update properties of this object
373
+ def update!(**args)
374
+ @access_levels = args[:access_levels] if args.key?(:access_levels)
375
+ @audiences = args[:audiences] if args.key?(:audiences)
376
+ @claims = args[:claims] if args.key?(:claims)
377
+ @presenter = args[:presenter] if args.key?(:presenter)
378
+ @principal = args[:principal] if args.key?(:principal)
379
+ end
380
+ end
381
+
382
+ # Authentication information for the operation.
383
+ class AuthenticationInfo
384
+ include Google::Apis::Core::Hashable
385
+
386
+ # The authority selector specified by the requestor, if any. It is not
387
+ # guaranteed that the principal was allowed to use this authority.
388
+ # Corresponds to the JSON property `authoritySelector`
389
+ # @return [String]
390
+ attr_accessor :authority_selector
391
+
392
+ # The email address of the authenticated user (or service account on behalf of
393
+ # third party principal) making the request. For third party identity callers,
394
+ # the `principal_subject` field is populated instead of this field. For privacy
395
+ # reasons, the principal email address is sometimes redacted. For more
396
+ # information, see [Caller identities in audit logs](https://cloud.google.com/
397
+ # logging/docs/audit#user-id).
398
+ # Corresponds to the JSON property `principalEmail`
399
+ # @return [String]
400
+ attr_accessor :principal_email
401
+
402
+ # String representation of identity of requesting party. Populated for both
403
+ # first and third party identities.
404
+ # Corresponds to the JSON property `principalSubject`
405
+ # @return [String]
406
+ attr_accessor :principal_subject
407
+
408
+ # Identity delegation history of an authenticated service account that makes the
409
+ # request. It contains information on the real authorities that try to access
410
+ # GCP resources by delegating on a service account. When multiple authorities
411
+ # present, they are guaranteed to be sorted based on the original ordering of
412
+ # the identity delegation events.
413
+ # Corresponds to the JSON property `serviceAccountDelegationInfo`
414
+ # @return [Array<Google::Apis::ServicecontrolV1::ServiceAccountDelegationInfo>]
415
+ attr_accessor :service_account_delegation_info
416
+
417
+ # The name of the service account key used to create or exchange credentials for
418
+ # authenticating the service account making the request. This is a scheme-less
419
+ # URI full resource name. For example: "//iam.googleapis.com/projects/`
420
+ # PROJECT_ID`/serviceAccounts/`ACCOUNT`/keys/`key`"
421
+ # Corresponds to the JSON property `serviceAccountKeyName`
422
+ # @return [String]
423
+ attr_accessor :service_account_key_name
424
+
425
+ # The third party identification (if any) of the authenticated user making the
426
+ # request. When the JSON object represented here has a proto equivalent, the
427
+ # proto name will be indicated in the `@type` property.
428
+ # Corresponds to the JSON property `thirdPartyPrincipal`
429
+ # @return [Hash<String,Object>]
430
+ attr_accessor :third_party_principal
431
+
432
+ def initialize(**args)
433
+ update!(**args)
434
+ end
435
+
436
+ # Update properties of this object
437
+ def update!(**args)
438
+ @authority_selector = args[:authority_selector] if args.key?(:authority_selector)
439
+ @principal_email = args[:principal_email] if args.key?(:principal_email)
440
+ @principal_subject = args[:principal_subject] if args.key?(:principal_subject)
441
+ @service_account_delegation_info = args[:service_account_delegation_info] if args.key?(:service_account_delegation_info)
442
+ @service_account_key_name = args[:service_account_key_name] if args.key?(:service_account_key_name)
443
+ @third_party_principal = args[:third_party_principal] if args.key?(:third_party_principal)
444
+ end
445
+ end
446
+
447
+ # Authorization information for the operation.
448
+ class AuthorizationInfo
449
+ include Google::Apis::Core::Hashable
450
+
451
+ # Whether or not authorization for `resource` and `permission` was granted.
452
+ # Corresponds to the JSON property `granted`
453
+ # @return [Boolean]
454
+ attr_accessor :granted
455
+ alias_method :granted?, :granted
456
+
457
+ # The required IAM permission.
458
+ # Corresponds to the JSON property `permission`
459
+ # @return [String]
460
+ attr_accessor :permission
461
+
462
+ # The resource being accessed, as a REST-style string. For example: bigquery.
463
+ # googleapis.com/projects/PROJECTID/datasets/DATASETID
464
+ # Corresponds to the JSON property `resource`
465
+ # @return [String]
466
+ attr_accessor :resource
467
+
468
+ # This message defines core attributes for a resource. A resource is an
469
+ # addressable (named) entity provided by the destination service. For example, a
470
+ # file stored on a network storage service.
471
+ # Corresponds to the JSON property `resourceAttributes`
472
+ # @return [Google::Apis::ServicecontrolV1::Resource]
473
+ attr_accessor :resource_attributes
474
+
475
+ def initialize(**args)
476
+ update!(**args)
477
+ end
478
+
479
+ # Update properties of this object
480
+ def update!(**args)
481
+ @granted = args[:granted] if args.key?(:granted)
482
+ @permission = args[:permission] if args.key?(:permission)
483
+ @resource = args[:resource] if args.key?(:resource)
484
+ @resource_attributes = args[:resource_attributes] if args.key?(:resource_attributes)
485
+ end
486
+ end
487
+
488
+ # Defines the errors to be returned in google.api.servicecontrol.v1.
489
+ # CheckResponse.check_errors.
490
+ class CheckError
491
+ include Google::Apis::Core::Hashable
492
+
493
+ # The error code.
494
+ # Corresponds to the JSON property `code`
495
+ # @return [String]
496
+ attr_accessor :code
497
+
498
+ # Free-form text providing details on the error cause of the error.
499
+ # Corresponds to the JSON property `detail`
500
+ # @return [String]
501
+ attr_accessor :detail
502
+
503
+ # The `Status` type defines a logical error model that is suitable for different
504
+ # programming environments, including REST APIs and RPC APIs. It is used by [
505
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
506
+ # data: error code, error message, and error details. You can find out more
507
+ # about this error model and how to work with it in the [API Design Guide](https:
508
+ # //cloud.google.com/apis/design/errors).
509
+ # Corresponds to the JSON property `status`
510
+ # @return [Google::Apis::ServicecontrolV1::Status]
511
+ attr_accessor :status
512
+
513
+ # Subject to whom this error applies. See the specific code enum for more
514
+ # details on this field. For example: - "project:" - "folder:" - "organization:"
515
+ # Corresponds to the JSON property `subject`
516
+ # @return [String]
517
+ attr_accessor :subject
518
+
519
+ def initialize(**args)
520
+ update!(**args)
521
+ end
522
+
523
+ # Update properties of this object
524
+ def update!(**args)
525
+ @code = args[:code] if args.key?(:code)
526
+ @detail = args[:detail] if args.key?(:detail)
527
+ @status = args[:status] if args.key?(:status)
528
+ @subject = args[:subject] if args.key?(:subject)
529
+ end
530
+ end
531
+
532
+ # Contains additional information about the check operation.
533
+ class CheckInfo
534
+ include Google::Apis::Core::Hashable
535
+
536
+ # `ConsumerInfo` provides information about the consumer.
537
+ # Corresponds to the JSON property `consumerInfo`
538
+ # @return [Google::Apis::ServicecontrolV1::ConsumerInfo]
539
+ attr_accessor :consumer_info
540
+
541
+ # A list of fields and label keys that are ignored by the server. The client
542
+ # doesn't need to send them for following requests to improve performance and
543
+ # allow better aggregation.
544
+ # Corresponds to the JSON property `unusedArguments`
545
+ # @return [Array<String>]
546
+ attr_accessor :unused_arguments
547
+
548
+ def initialize(**args)
549
+ update!(**args)
550
+ end
551
+
552
+ # Update properties of this object
553
+ def update!(**args)
554
+ @consumer_info = args[:consumer_info] if args.key?(:consumer_info)
555
+ @unused_arguments = args[:unused_arguments] if args.key?(:unused_arguments)
556
+ end
557
+ end
558
+
559
+ # Request message for the Check method.
560
+ class CheckRequest
561
+ include Google::Apis::Core::Hashable
562
+
563
+ # Represents information regarding an operation.
564
+ # Corresponds to the JSON property `operation`
565
+ # @return [Google::Apis::ServicecontrolV1::Operation]
566
+ attr_accessor :operation
567
+
568
+ # Requests the project settings to be returned as part of the check response.
569
+ # Corresponds to the JSON property `requestProjectSettings`
570
+ # @return [Boolean]
571
+ attr_accessor :request_project_settings
572
+ alias_method :request_project_settings?, :request_project_settings
573
+
574
+ # Specifies which version of service configuration should be used to process the
575
+ # request. If unspecified or no matching version can be found, the latest one
576
+ # will be used.
577
+ # Corresponds to the JSON property `serviceConfigId`
578
+ # @return [String]
579
+ attr_accessor :service_config_id
580
+
581
+ # Indicates if service activation check should be skipped for this request.
582
+ # Default behavior is to perform the check and apply relevant quota. WARNING:
583
+ # Setting this flag to "true" will disable quota enforcement.
584
+ # Corresponds to the JSON property `skipActivationCheck`
585
+ # @return [Boolean]
586
+ attr_accessor :skip_activation_check
587
+ alias_method :skip_activation_check?, :skip_activation_check
588
+
589
+ def initialize(**args)
590
+ update!(**args)
591
+ end
592
+
593
+ # Update properties of this object
594
+ def update!(**args)
595
+ @operation = args[:operation] if args.key?(:operation)
596
+ @request_project_settings = args[:request_project_settings] if args.key?(:request_project_settings)
597
+ @service_config_id = args[:service_config_id] if args.key?(:service_config_id)
598
+ @skip_activation_check = args[:skip_activation_check] if args.key?(:skip_activation_check)
599
+ end
600
+ end
601
+
602
+ # Response message for the Check method.
603
+ class CheckResponse
604
+ include Google::Apis::Core::Hashable
605
+
606
+ # Indicate the decision of the check. If no check errors are present, the
607
+ # service should process the operation. Otherwise the service should use the
608
+ # list of errors to determine the appropriate action.
609
+ # Corresponds to the JSON property `checkErrors`
610
+ # @return [Array<Google::Apis::ServicecontrolV1::CheckError>]
611
+ attr_accessor :check_errors
612
+
613
+ # Contains additional information about the check operation.
614
+ # Corresponds to the JSON property `checkInfo`
615
+ # @return [Google::Apis::ServicecontrolV1::CheckInfo]
616
+ attr_accessor :check_info
617
+
618
+ # The same operation_id value used in the CheckRequest. Used for logging and
619
+ # diagnostics purposes.
620
+ # Corresponds to the JSON property `operationId`
621
+ # @return [String]
622
+ attr_accessor :operation_id
623
+
624
+ # Contains the quota information for a quota check response.
625
+ # Corresponds to the JSON property `quotaInfo`
626
+ # @return [Google::Apis::ServicecontrolV1::QuotaInfo]
627
+ attr_accessor :quota_info
628
+
629
+ # The actual config id used to process the request.
630
+ # Corresponds to the JSON property `serviceConfigId`
631
+ # @return [String]
632
+ attr_accessor :service_config_id
633
+
634
+ # The current service rollout id used to process the request.
635
+ # Corresponds to the JSON property `serviceRolloutId`
636
+ # @return [String]
637
+ attr_accessor :service_rollout_id
638
+
639
+ def initialize(**args)
640
+ update!(**args)
641
+ end
642
+
643
+ # Update properties of this object
644
+ def update!(**args)
645
+ @check_errors = args[:check_errors] if args.key?(:check_errors)
646
+ @check_info = args[:check_info] if args.key?(:check_info)
647
+ @operation_id = args[:operation_id] if args.key?(:operation_id)
648
+ @quota_info = args[:quota_info] if args.key?(:quota_info)
649
+ @service_config_id = args[:service_config_id] if args.key?(:service_config_id)
650
+ @service_rollout_id = args[:service_rollout_id] if args.key?(:service_rollout_id)
651
+ end
652
+ end
653
+
654
+ # `ConsumerInfo` provides information about the consumer.
655
+ class ConsumerInfo
656
+ include Google::Apis::Core::Hashable
657
+
658
+ # The consumer identity number, can be Google cloud project number, folder
659
+ # number or organization number e.g. 1234567890. A value of 0 indicates no
660
+ # consumer number is found.
661
+ # Corresponds to the JSON property `consumerNumber`
662
+ # @return [Fixnum]
663
+ attr_accessor :consumer_number
664
+
665
+ # The Google cloud project number, e.g. 1234567890. A value of 0 indicates no
666
+ # project number is found. NOTE: This field is deprecated after Chemist support
667
+ # flexible consumer id. New code should not depend on this field anymore.
668
+ # Corresponds to the JSON property `projectNumber`
669
+ # @return [Fixnum]
670
+ attr_accessor :project_number
671
+
672
+ # The type of the consumer which should have been defined in [Google Resource
673
+ # Manager](https://cloud.google.com/resource-manager/).
674
+ # Corresponds to the JSON property `type`
675
+ # @return [String]
676
+ attr_accessor :type
677
+
678
+ def initialize(**args)
679
+ update!(**args)
680
+ end
681
+
682
+ # Update properties of this object
683
+ def update!(**args)
684
+ @consumer_number = args[:consumer_number] if args.key?(:consumer_number)
685
+ @project_number = args[:project_number] if args.key?(:project_number)
686
+ @type = args[:type] if args.key?(:type)
687
+ end
688
+ end
689
+
690
+ # Distribution represents a frequency distribution of double-valued sample
691
+ # points. It contains the size of the population of sample points plus
692
+ # additional optional information: - the arithmetic mean of the samples - the
693
+ # minimum and maximum of the samples - the sum-squared-deviation of the samples,
694
+ # used to compute variance - a histogram of the values of the sample points
695
+ class Distribution
696
+ include Google::Apis::Core::Hashable
697
+
698
+ # The number of samples in each histogram bucket. `bucket_counts` are optional.
699
+ # If present, they must sum to the `count` value. The buckets are defined below
700
+ # in `bucket_option`. There are N buckets. `bucket_counts[0]` is the number of
701
+ # samples in the underflow bucket. `bucket_counts[1]` to `bucket_counts[N-1]`
702
+ # are the numbers of samples in each of the finite buckets. And `bucket_counts[N]
703
+ # is the number of samples in the overflow bucket. See the comments of `
704
+ # bucket_option` below for more details. Any suffix of trailing zeros may be
705
+ # omitted.
706
+ # Corresponds to the JSON property `bucketCounts`
707
+ # @return [Array<Fixnum>]
708
+ attr_accessor :bucket_counts
709
+
710
+ # The total number of samples in the distribution. Must be >= 0.
711
+ # Corresponds to the JSON property `count`
712
+ # @return [Fixnum]
713
+ attr_accessor :count
714
+
715
+ # Example points. Must be in increasing order of `value` field.
716
+ # Corresponds to the JSON property `exemplars`
717
+ # @return [Array<Google::Apis::ServicecontrolV1::Exemplar>]
718
+ attr_accessor :exemplars
719
+
720
+ # Describing buckets with arbitrary user-provided width.
721
+ # Corresponds to the JSON property `explicitBuckets`
722
+ # @return [Google::Apis::ServicecontrolV1::ExplicitBuckets]
723
+ attr_accessor :explicit_buckets
724
+
725
+ # Describing buckets with exponentially growing width.
726
+ # Corresponds to the JSON property `exponentialBuckets`
727
+ # @return [Google::Apis::ServicecontrolV1::ExponentialBuckets]
728
+ attr_accessor :exponential_buckets
729
+
730
+ # Describing buckets with constant width.
731
+ # Corresponds to the JSON property `linearBuckets`
732
+ # @return [Google::Apis::ServicecontrolV1::LinearBuckets]
733
+ attr_accessor :linear_buckets
734
+
735
+ # The maximum of the population of values. Ignored if `count` is zero.
736
+ # Corresponds to the JSON property `maximum`
737
+ # @return [Float]
738
+ attr_accessor :maximum
739
+
740
+ # The arithmetic mean of the samples in the distribution. If `count` is zero
741
+ # then this field must be zero.
742
+ # Corresponds to the JSON property `mean`
743
+ # @return [Float]
744
+ attr_accessor :mean
745
+
746
+ # The minimum of the population of values. Ignored if `count` is zero.
747
+ # Corresponds to the JSON property `minimum`
748
+ # @return [Float]
749
+ attr_accessor :minimum
750
+
751
+ # The sum of squared deviations from the mean: Sum[i=1..count]((x_i - mean)^2)
752
+ # where each x_i is a sample values. If `count` is zero then this field must be
753
+ # zero, otherwise validation of the request fails.
754
+ # Corresponds to the JSON property `sumOfSquaredDeviation`
755
+ # @return [Float]
756
+ attr_accessor :sum_of_squared_deviation
757
+
758
+ def initialize(**args)
759
+ update!(**args)
760
+ end
761
+
762
+ # Update properties of this object
763
+ def update!(**args)
764
+ @bucket_counts = args[:bucket_counts] if args.key?(:bucket_counts)
765
+ @count = args[:count] if args.key?(:count)
766
+ @exemplars = args[:exemplars] if args.key?(:exemplars)
767
+ @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets)
768
+ @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets)
769
+ @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets)
770
+ @maximum = args[:maximum] if args.key?(:maximum)
771
+ @mean = args[:mean] if args.key?(:mean)
772
+ @minimum = args[:minimum] if args.key?(:minimum)
773
+ @sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation)
774
+ end
775
+ end
776
+
777
+ # Exemplars are example points that may be used to annotate aggregated
778
+ # distribution values. They are metadata that gives information about a
779
+ # particular value added to a Distribution bucket, such as a trace ID that was
780
+ # active when a value was added. They may contain further information, such as a
781
+ # example values and timestamps, origin, etc.
782
+ class Exemplar
783
+ include Google::Apis::Core::Hashable
784
+
785
+ # Contextual information about the example value. Examples are: Trace: type.
786
+ # googleapis.com/google.monitoring.v3.SpanContext Literal string: type.
787
+ # googleapis.com/google.protobuf.StringValue Labels dropped during aggregation:
788
+ # type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a
789
+ # single attachment of any given message type in a single exemplar, and this is
790
+ # enforced by the system.
791
+ # Corresponds to the JSON property `attachments`
792
+ # @return [Array<Hash<String,Object>>]
793
+ attr_accessor :attachments
794
+
795
+ # The observation (sampling) time of the above value.
796
+ # Corresponds to the JSON property `timestamp`
797
+ # @return [String]
798
+ attr_accessor :timestamp
799
+
800
+ # Value of the exemplar point. This value determines to which bucket the
801
+ # exemplar belongs.
802
+ # Corresponds to the JSON property `value`
803
+ # @return [Float]
804
+ attr_accessor :value
805
+
806
+ def initialize(**args)
807
+ update!(**args)
808
+ end
809
+
810
+ # Update properties of this object
811
+ def update!(**args)
812
+ @attachments = args[:attachments] if args.key?(:attachments)
813
+ @timestamp = args[:timestamp] if args.key?(:timestamp)
814
+ @value = args[:value] if args.key?(:value)
815
+ end
816
+ end
817
+
818
+ # Describing buckets with arbitrary user-provided width.
819
+ class ExplicitBuckets
820
+ include Google::Apis::Core::Hashable
821
+
822
+ # 'bound' is a list of strictly increasing boundaries between buckets. Note that
823
+ # a list of length N-1 defines N buckets because of fenceposting. See comments
824
+ # on `bucket_options` for details. The i'th finite bucket covers the interval [
825
+ # bound[i-1], bound[i]) where i ranges from 1 to bound_size() - 1. Note that
826
+ # there are no finite buckets at all if 'bound' only contains a single element;
827
+ # in that special case the single bound defines the boundary between the
828
+ # underflow and overflow buckets. bucket number lower bound upper bound i == 0 (
829
+ # underflow) -inf bound[i] 0 < i < bound_size() bound[i-1] bound[i] i ==
830
+ # bound_size() (overflow) bound[i-1] +inf
831
+ # Corresponds to the JSON property `bounds`
832
+ # @return [Array<Float>]
833
+ attr_accessor :bounds
834
+
835
+ def initialize(**args)
836
+ update!(**args)
837
+ end
838
+
839
+ # Update properties of this object
840
+ def update!(**args)
841
+ @bounds = args[:bounds] if args.key?(:bounds)
842
+ end
843
+ end
844
+
845
+ # Describing buckets with exponentially growing width.
846
+ class ExponentialBuckets
847
+ include Google::Apis::Core::Hashable
848
+
849
+ # The i'th exponential bucket covers the interval [scale * growth_factor^(i-1),
850
+ # scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive.
851
+ # Must be larger than 1.0.
852
+ # Corresponds to the JSON property `growthFactor`
853
+ # @return [Float]
854
+ attr_accessor :growth_factor
855
+
856
+ # The number of finite buckets. With the underflow and overflow buckets, the
857
+ # total number of buckets is `num_finite_buckets` + 2. See comments on `
858
+ # bucket_options` for details.
859
+ # Corresponds to the JSON property `numFiniteBuckets`
860
+ # @return [Fixnum]
861
+ attr_accessor :num_finite_buckets
862
+
863
+ # The i'th exponential bucket covers the interval [scale * growth_factor^(i-1),
864
+ # scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive.
865
+ # Must be > 0.
866
+ # Corresponds to the JSON property `scale`
867
+ # @return [Float]
868
+ attr_accessor :scale
869
+
870
+ def initialize(**args)
871
+ update!(**args)
872
+ end
873
+
874
+ # Update properties of this object
875
+ def update!(**args)
876
+ @growth_factor = args[:growth_factor] if args.key?(:growth_factor)
877
+ @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
878
+ @scale = args[:scale] if args.key?(:scale)
879
+ end
880
+ end
881
+
882
+ # First party identity principal.
883
+ class FirstPartyPrincipal
884
+ include Google::Apis::Core::Hashable
885
+
886
+ # The email address of a Google account. .
887
+ # Corresponds to the JSON property `principalEmail`
888
+ # @return [String]
889
+ attr_accessor :principal_email
890
+
891
+ # Metadata about the service that uses the service account. .
892
+ # Corresponds to the JSON property `serviceMetadata`
893
+ # @return [Hash<String,Object>]
894
+ attr_accessor :service_metadata
895
+
896
+ def initialize(**args)
897
+ update!(**args)
898
+ end
899
+
900
+ # Update properties of this object
901
+ def update!(**args)
902
+ @principal_email = args[:principal_email] if args.key?(:principal_email)
903
+ @service_metadata = args[:service_metadata] if args.key?(:service_metadata)
904
+ end
905
+ end
906
+
907
+ # A common proto for logging HTTP requests. Only contains semantics defined by
908
+ # the HTTP specification. Product-specific logging information MUST be defined
909
+ # in a separate message.
910
+ class HttpRequest
911
+ include Google::Apis::Core::Hashable
912
+
913
+ # The number of HTTP response bytes inserted into cache. Set only when a cache
914
+ # fill was attempted.
915
+ # Corresponds to the JSON property `cacheFillBytes`
916
+ # @return [Fixnum]
917
+ attr_accessor :cache_fill_bytes
918
+
919
+ # Whether or not an entity was served from cache (with or without validation).
920
+ # Corresponds to the JSON property `cacheHit`
921
+ # @return [Boolean]
922
+ attr_accessor :cache_hit
923
+ alias_method :cache_hit?, :cache_hit
924
+
925
+ # Whether or not a cache lookup was attempted.
926
+ # Corresponds to the JSON property `cacheLookup`
927
+ # @return [Boolean]
928
+ attr_accessor :cache_lookup
929
+ alias_method :cache_lookup?, :cache_lookup
930
+
931
+ # Whether or not the response was validated with the origin server before being
932
+ # served from cache. This field is only meaningful if `cache_hit` is True.
933
+ # Corresponds to the JSON property `cacheValidatedWithOriginServer`
934
+ # @return [Boolean]
935
+ attr_accessor :cache_validated_with_origin_server
936
+ alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server
937
+
938
+ # The request processing latency on the server, from the time the request was
939
+ # received until the response was sent.
940
+ # Corresponds to the JSON property `latency`
941
+ # @return [String]
942
+ attr_accessor :latency
943
+
944
+ # Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
945
+ # Corresponds to the JSON property `protocol`
946
+ # @return [String]
947
+ attr_accessor :protocol
948
+
949
+ # The referer URL of the request, as defined in [HTTP/1.1 Header Field
950
+ # Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
951
+ # Corresponds to the JSON property `referer`
952
+ # @return [String]
953
+ attr_accessor :referer
954
+
955
+ # The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
956
+ # Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
957
+ # Corresponds to the JSON property `remoteIp`
958
+ # @return [String]
959
+ attr_accessor :remote_ip
960
+
961
+ # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
962
+ # Corresponds to the JSON property `requestMethod`
963
+ # @return [String]
964
+ attr_accessor :request_method
965
+
966
+ # The size of the HTTP request message in bytes, including the request headers
967
+ # and the request body.
968
+ # Corresponds to the JSON property `requestSize`
969
+ # @return [Fixnum]
970
+ attr_accessor :request_size
971
+
972
+ # The scheme (http, https), the host name, the path, and the query portion of
973
+ # the URL that was requested. Example: `"http://example.com/some/info?color=red"`
974
+ # .
975
+ # Corresponds to the JSON property `requestUrl`
976
+ # @return [String]
977
+ attr_accessor :request_url
978
+
979
+ # The size of the HTTP response message sent back to the client, in bytes,
980
+ # including the response headers and the response body.
981
+ # Corresponds to the JSON property `responseSize`
982
+ # @return [Fixnum]
983
+ attr_accessor :response_size
984
+
985
+ # The IP address (IPv4 or IPv6) of the origin server that the request was sent
986
+ # to.
987
+ # Corresponds to the JSON property `serverIp`
988
+ # @return [String]
989
+ attr_accessor :server_ip
990
+
991
+ # The response code indicating the status of the response. Examples: 200, 404.
992
+ # Corresponds to the JSON property `status`
993
+ # @return [Fixnum]
994
+ attr_accessor :status
995
+
996
+ # The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.
997
+ # 0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
998
+ # Corresponds to the JSON property `userAgent`
999
+ # @return [String]
1000
+ attr_accessor :user_agent
1001
+
1002
+ def initialize(**args)
1003
+ update!(**args)
1004
+ end
1005
+
1006
+ # Update properties of this object
1007
+ def update!(**args)
1008
+ @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes)
1009
+ @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
1010
+ @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup)
1011
+ @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server)
1012
+ @latency = args[:latency] if args.key?(:latency)
1013
+ @protocol = args[:protocol] if args.key?(:protocol)
1014
+ @referer = args[:referer] if args.key?(:referer)
1015
+ @remote_ip = args[:remote_ip] if args.key?(:remote_ip)
1016
+ @request_method = args[:request_method] if args.key?(:request_method)
1017
+ @request_size = args[:request_size] if args.key?(:request_size)
1018
+ @request_url = args[:request_url] if args.key?(:request_url)
1019
+ @response_size = args[:response_size] if args.key?(:response_size)
1020
+ @server_ip = args[:server_ip] if args.key?(:server_ip)
1021
+ @status = args[:status] if args.key?(:status)
1022
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
1023
+ end
1024
+ end
1025
+
1026
+ # Describing buckets with constant width.
1027
+ class LinearBuckets
1028
+ include Google::Apis::Core::Hashable
1029
+
1030
+ # The number of finite buckets. With the underflow and overflow buckets, the
1031
+ # total number of buckets is `num_finite_buckets` + 2. See comments on `
1032
+ # bucket_options` for details.
1033
+ # Corresponds to the JSON property `numFiniteBuckets`
1034
+ # @return [Fixnum]
1035
+ attr_accessor :num_finite_buckets
1036
+
1037
+ # The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i
1038
+ # * width) where i ranges from 1 to num_finite_buckets, inclusive.
1039
+ # Corresponds to the JSON property `offset`
1040
+ # @return [Float]
1041
+ attr_accessor :offset
1042
+
1043
+ # The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i
1044
+ # * width) where i ranges from 1 to num_finite_buckets, inclusive. Must be
1045
+ # strictly positive.
1046
+ # Corresponds to the JSON property `width`
1047
+ # @return [Float]
1048
+ attr_accessor :width
1049
+
1050
+ def initialize(**args)
1051
+ update!(**args)
1052
+ end
1053
+
1054
+ # Update properties of this object
1055
+ def update!(**args)
1056
+ @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
1057
+ @offset = args[:offset] if args.key?(:offset)
1058
+ @width = args[:width] if args.key?(:width)
1059
+ end
1060
+ end
1061
+
1062
+ # An individual log entry.
1063
+ class LogEntry
1064
+ include Google::Apis::Core::Hashable
1065
+
1066
+ # A common proto for logging HTTP requests. Only contains semantics defined by
1067
+ # the HTTP specification. Product-specific logging information MUST be defined
1068
+ # in a separate message.
1069
+ # Corresponds to the JSON property `httpRequest`
1070
+ # @return [Google::Apis::ServicecontrolV1::HttpRequest]
1071
+ attr_accessor :http_request
1072
+
1073
+ # A unique ID for the log entry used for deduplication. If omitted, the
1074
+ # implementation will generate one based on operation_id.
1075
+ # Corresponds to the JSON property `insertId`
1076
+ # @return [String]
1077
+ attr_accessor :insert_id
1078
+
1079
+ # A set of user-defined (key, value) data that provides additional information
1080
+ # about the log entry.
1081
+ # Corresponds to the JSON property `labels`
1082
+ # @return [Hash<String,String>]
1083
+ attr_accessor :labels
1084
+
1085
+ # Required. The log to which this log entry belongs. Examples: `"syslog"`, `"
1086
+ # book_log"`.
1087
+ # Corresponds to the JSON property `name`
1088
+ # @return [String]
1089
+ attr_accessor :name
1090
+
1091
+ # Additional information about a potentially long-running operation with which a
1092
+ # log entry is associated.
1093
+ # Corresponds to the JSON property `operation`
1094
+ # @return [Google::Apis::ServicecontrolV1::LogEntryOperation]
1095
+ attr_accessor :operation
1096
+
1097
+ # The log entry payload, represented as a protocol buffer that is expressed as a
1098
+ # JSON object. The only accepted type currently is AuditLog.
1099
+ # Corresponds to the JSON property `protoPayload`
1100
+ # @return [Hash<String,Object>]
1101
+ attr_accessor :proto_payload
1102
+
1103
+ # The severity of the log entry. The default value is `LogSeverity.DEFAULT`.
1104
+ # Corresponds to the JSON property `severity`
1105
+ # @return [String]
1106
+ attr_accessor :severity
1107
+
1108
+ # Additional information about the source code location that produced the log
1109
+ # entry.
1110
+ # Corresponds to the JSON property `sourceLocation`
1111
+ # @return [Google::Apis::ServicecontrolV1::LogEntrySourceLocation]
1112
+ attr_accessor :source_location
1113
+
1114
+ # The log entry payload, represented as a structure that is expressed as a JSON
1115
+ # object.
1116
+ # Corresponds to the JSON property `structPayload`
1117
+ # @return [Hash<String,Object>]
1118
+ attr_accessor :struct_payload
1119
+
1120
+ # The log entry payload, represented as a Unicode string (UTF-8).
1121
+ # Corresponds to the JSON property `textPayload`
1122
+ # @return [String]
1123
+ attr_accessor :text_payload
1124
+
1125
+ # The time the event described by the log entry occurred. If omitted, defaults
1126
+ # to operation start time.
1127
+ # Corresponds to the JSON property `timestamp`
1128
+ # @return [String]
1129
+ attr_accessor :timestamp
1130
+
1131
+ # Optional. Resource name of the trace associated with the log entry, if any. If
1132
+ # this field contains a relative resource name, you can assume the name is
1133
+ # relative to `//tracing.googleapis.com`. Example: `projects/my-projectid/traces/
1134
+ # 06796866738c859f2f19b7cfb3214824`
1135
+ # Corresponds to the JSON property `trace`
1136
+ # @return [String]
1137
+ attr_accessor :trace
1138
+
1139
+ def initialize(**args)
1140
+ update!(**args)
1141
+ end
1142
+
1143
+ # Update properties of this object
1144
+ def update!(**args)
1145
+ @http_request = args[:http_request] if args.key?(:http_request)
1146
+ @insert_id = args[:insert_id] if args.key?(:insert_id)
1147
+ @labels = args[:labels] if args.key?(:labels)
1148
+ @name = args[:name] if args.key?(:name)
1149
+ @operation = args[:operation] if args.key?(:operation)
1150
+ @proto_payload = args[:proto_payload] if args.key?(:proto_payload)
1151
+ @severity = args[:severity] if args.key?(:severity)
1152
+ @source_location = args[:source_location] if args.key?(:source_location)
1153
+ @struct_payload = args[:struct_payload] if args.key?(:struct_payload)
1154
+ @text_payload = args[:text_payload] if args.key?(:text_payload)
1155
+ @timestamp = args[:timestamp] if args.key?(:timestamp)
1156
+ @trace = args[:trace] if args.key?(:trace)
1157
+ end
1158
+ end
1159
+
1160
+ # Additional information about a potentially long-running operation with which a
1161
+ # log entry is associated.
1162
+ class LogEntryOperation
1163
+ include Google::Apis::Core::Hashable
1164
+
1165
+ # Optional. Set this to True if this is the first log entry in the operation.
1166
+ # Corresponds to the JSON property `first`
1167
+ # @return [Boolean]
1168
+ attr_accessor :first
1169
+ alias_method :first?, :first
1170
+
1171
+ # Optional. An arbitrary operation identifier. Log entries with the same
1172
+ # identifier are assumed to be part of the same operation.
1173
+ # Corresponds to the JSON property `id`
1174
+ # @return [String]
1175
+ attr_accessor :id
1176
+
1177
+ # Optional. Set this to True if this is the last log entry in the operation.
1178
+ # Corresponds to the JSON property `last`
1179
+ # @return [Boolean]
1180
+ attr_accessor :last
1181
+ alias_method :last?, :last
1182
+
1183
+ # Optional. An arbitrary producer identifier. The combination of `id` and `
1184
+ # producer` must be globally unique. Examples for `producer`: `"MyDivision.
1185
+ # MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`.
1186
+ # Corresponds to the JSON property `producer`
1187
+ # @return [String]
1188
+ attr_accessor :producer
1189
+
1190
+ def initialize(**args)
1191
+ update!(**args)
1192
+ end
1193
+
1194
+ # Update properties of this object
1195
+ def update!(**args)
1196
+ @first = args[:first] if args.key?(:first)
1197
+ @id = args[:id] if args.key?(:id)
1198
+ @last = args[:last] if args.key?(:last)
1199
+ @producer = args[:producer] if args.key?(:producer)
1200
+ end
1201
+ end
1202
+
1203
+ # Additional information about the source code location that produced the log
1204
+ # entry.
1205
+ class LogEntrySourceLocation
1206
+ include Google::Apis::Core::Hashable
1207
+
1208
+ # Optional. Source file name. Depending on the runtime environment, this might
1209
+ # be a simple name or a fully-qualified name.
1210
+ # Corresponds to the JSON property `file`
1211
+ # @return [String]
1212
+ attr_accessor :file
1213
+
1214
+ # Optional. Human-readable name of the function or method being invoked, with
1215
+ # optional context such as the class or package name. This information may be
1216
+ # used in contexts such as the logs viewer, where a file and line number are
1217
+ # less meaningful. The format can vary by language. For example: `qual.if.ied.
1218
+ # Class.method` (Java), `dir/package.func` (Go), `function` (Python).
1219
+ # Corresponds to the JSON property `function`
1220
+ # @return [String]
1221
+ attr_accessor :function
1222
+
1223
+ # Optional. Line within the source file. 1-based; 0 indicates no line number
1224
+ # available.
1225
+ # Corresponds to the JSON property `line`
1226
+ # @return [Fixnum]
1227
+ attr_accessor :line
1228
+
1229
+ def initialize(**args)
1230
+ update!(**args)
1231
+ end
1232
+
1233
+ # Update properties of this object
1234
+ def update!(**args)
1235
+ @file = args[:file] if args.key?(:file)
1236
+ @function = args[:function] if args.key?(:function)
1237
+ @line = args[:line] if args.key?(:line)
1238
+ end
1239
+ end
1240
+
1241
+ # Represents a single metric value.
1242
+ class MetricValue
1243
+ include Google::Apis::Core::Hashable
1244
+
1245
+ # A boolean value.
1246
+ # Corresponds to the JSON property `boolValue`
1247
+ # @return [Boolean]
1248
+ attr_accessor :bool_value
1249
+ alias_method :bool_value?, :bool_value
1250
+
1251
+ # Distribution represents a frequency distribution of double-valued sample
1252
+ # points. It contains the size of the population of sample points plus
1253
+ # additional optional information: - the arithmetic mean of the samples - the
1254
+ # minimum and maximum of the samples - the sum-squared-deviation of the samples,
1255
+ # used to compute variance - a histogram of the values of the sample points
1256
+ # Corresponds to the JSON property `distributionValue`
1257
+ # @return [Google::Apis::ServicecontrolV1::Distribution]
1258
+ attr_accessor :distribution_value
1259
+
1260
+ # A double precision floating point value.
1261
+ # Corresponds to the JSON property `doubleValue`
1262
+ # @return [Float]
1263
+ attr_accessor :double_value
1264
+
1265
+ # The end of the time period over which this metric value's measurement applies.
1266
+ # If not specified, google.api.servicecontrol.v1.Operation.end_time will be used.
1267
+ # Corresponds to the JSON property `endTime`
1268
+ # @return [String]
1269
+ attr_accessor :end_time
1270
+
1271
+ # A signed 64-bit integer value.
1272
+ # Corresponds to the JSON property `int64Value`
1273
+ # @return [Fixnum]
1274
+ attr_accessor :int64_value
1275
+
1276
+ # The labels describing the metric value. See comments on google.api.
1277
+ # servicecontrol.v1.Operation.labels for the overriding relationship. Note that
1278
+ # this map must not contain monitored resource labels.
1279
+ # Corresponds to the JSON property `labels`
1280
+ # @return [Hash<String,String>]
1281
+ attr_accessor :labels
1282
+
1283
+ # Represents an amount of money with its currency type.
1284
+ # Corresponds to the JSON property `moneyValue`
1285
+ # @return [Google::Apis::ServicecontrolV1::Money]
1286
+ attr_accessor :money_value
1287
+
1288
+ # The start of the time period over which this metric value's measurement
1289
+ # applies. The time period has different semantics for different metric types (
1290
+ # cumulative, delta, and gauge). See the metric definition documentation in the
1291
+ # service configuration for details. If not specified, google.api.servicecontrol.
1292
+ # v1.Operation.start_time will be used.
1293
+ # Corresponds to the JSON property `startTime`
1294
+ # @return [String]
1295
+ attr_accessor :start_time
1296
+
1297
+ # A text string value.
1298
+ # Corresponds to the JSON property `stringValue`
1299
+ # @return [String]
1300
+ attr_accessor :string_value
1301
+
1302
+ def initialize(**args)
1303
+ update!(**args)
1304
+ end
1305
+
1306
+ # Update properties of this object
1307
+ def update!(**args)
1308
+ @bool_value = args[:bool_value] if args.key?(:bool_value)
1309
+ @distribution_value = args[:distribution_value] if args.key?(:distribution_value)
1310
+ @double_value = args[:double_value] if args.key?(:double_value)
1311
+ @end_time = args[:end_time] if args.key?(:end_time)
1312
+ @int64_value = args[:int64_value] if args.key?(:int64_value)
1313
+ @labels = args[:labels] if args.key?(:labels)
1314
+ @money_value = args[:money_value] if args.key?(:money_value)
1315
+ @start_time = args[:start_time] if args.key?(:start_time)
1316
+ @string_value = args[:string_value] if args.key?(:string_value)
1317
+ end
1318
+ end
1319
+
1320
+ # Represents a set of metric values in the same metric. Each metric value in the
1321
+ # set should have a unique combination of start time, end time, and label values.
1322
+ class MetricValueSet
1323
+ include Google::Apis::Core::Hashable
1324
+
1325
+ # The metric name defined in the service configuration.
1326
+ # Corresponds to the JSON property `metricName`
1327
+ # @return [String]
1328
+ attr_accessor :metric_name
1329
+
1330
+ # The values in this metric.
1331
+ # Corresponds to the JSON property `metricValues`
1332
+ # @return [Array<Google::Apis::ServicecontrolV1::MetricValue>]
1333
+ attr_accessor :metric_values
1334
+
1335
+ def initialize(**args)
1336
+ update!(**args)
1337
+ end
1338
+
1339
+ # Update properties of this object
1340
+ def update!(**args)
1341
+ @metric_name = args[:metric_name] if args.key?(:metric_name)
1342
+ @metric_values = args[:metric_values] if args.key?(:metric_values)
1343
+ end
1344
+ end
1345
+
1346
+ # Represents an amount of money with its currency type.
1347
+ class Money
1348
+ include Google::Apis::Core::Hashable
1349
+
1350
+ # The three-letter currency code defined in ISO 4217.
1351
+ # Corresponds to the JSON property `currencyCode`
1352
+ # @return [String]
1353
+ attr_accessor :currency_code
1354
+
1355
+ # Number of nano (10^-9) units of the amount. The value must be between -999,999,
1356
+ # 999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be
1357
+ # positive or zero. If `units` is zero, `nanos` can be positive, zero, or
1358
+ # negative. If `units` is negative, `nanos` must be negative or zero. For
1359
+ # example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
1360
+ # Corresponds to the JSON property `nanos`
1361
+ # @return [Fixnum]
1362
+ attr_accessor :nanos
1363
+
1364
+ # The whole units of the amount. For example if `currencyCode` is `"USD"`, then
1365
+ # 1 unit is one US dollar.
1366
+ # Corresponds to the JSON property `units`
1367
+ # @return [Fixnum]
1368
+ attr_accessor :units
1369
+
1370
+ def initialize(**args)
1371
+ update!(**args)
1372
+ end
1373
+
1374
+ # Update properties of this object
1375
+ def update!(**args)
1376
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
1377
+ @nanos = args[:nanos] if args.key?(:nanos)
1378
+ @units = args[:units] if args.key?(:units)
1379
+ end
1380
+ end
1381
+
1382
+ # Represents information regarding an operation.
1383
+ class Operation
1384
+ include Google::Apis::Core::Hashable
1385
+
1386
+ # Identity of the consumer who is using the service. This field should be filled
1387
+ # in for the operations initiated by a consumer, but not for service-initiated
1388
+ # operations that are not related to a specific consumer. - This can be in one
1389
+ # of the following formats: - project:PROJECT_ID, - project`_`number:
1390
+ # PROJECT_NUMBER, - projects/PROJECT_ID or PROJECT_NUMBER, - folders/
1391
+ # FOLDER_NUMBER, - organizations/ORGANIZATION_NUMBER, - api`_`key:API_KEY.
1392
+ # Corresponds to the JSON property `consumerId`
1393
+ # @return [String]
1394
+ attr_accessor :consumer_id
1395
+
1396
+ # End time of the operation. Required when the operation is used in
1397
+ # ServiceController.Report, but optional when the operation is used in
1398
+ # ServiceController.Check.
1399
+ # Corresponds to the JSON property `endTime`
1400
+ # @return [String]
1401
+ attr_accessor :end_time
1402
+
1403
+ # Unimplemented.
1404
+ # Corresponds to the JSON property `extensions`
1405
+ # @return [Array<Hash<String,Object>>]
1406
+ attr_accessor :extensions
1407
+
1408
+ # DO NOT USE. This is an experimental field.
1409
+ # Corresponds to the JSON property `importance`
1410
+ # @return [String]
1411
+ attr_accessor :importance
1412
+
1413
+ # Labels describing the operation. Only the following labels are allowed: -
1414
+ # Labels describing monitored resources as defined in the service configuration.
1415
+ # - Default labels of metric values. When specified, labels defined in the
1416
+ # metric value override these default. - The following labels defined by Google
1417
+ # Cloud Platform: - `cloud.googleapis.com/location` describing the location
1418
+ # where the operation happened, - `servicecontrol.googleapis.com/user_agent`
1419
+ # describing the user agent of the API request, - `servicecontrol.googleapis.com/
1420
+ # service_agent` describing the service used to handle the API request (e.g. ESP)
1421
+ # , - `servicecontrol.googleapis.com/platform` describing the platform where the
1422
+ # API is served, such as App Engine, Compute Engine, or Kubernetes Engine.
1423
+ # Corresponds to the JSON property `labels`
1424
+ # @return [Hash<String,String>]
1425
+ attr_accessor :labels
1426
+
1427
+ # Represents information to be logged.
1428
+ # Corresponds to the JSON property `logEntries`
1429
+ # @return [Array<Google::Apis::ServicecontrolV1::LogEntry>]
1430
+ attr_accessor :log_entries
1431
+
1432
+ # Represents information about this operation. Each MetricValueSet corresponds
1433
+ # to a metric defined in the service configuration. The data type used in the
1434
+ # MetricValueSet must agree with the data type specified in the metric
1435
+ # definition. Within a single operation, it is not allowed to have more than one
1436
+ # MetricValue instances that have the same metric names and identical label
1437
+ # value combinations. If a request has such duplicated MetricValue instances,
1438
+ # the entire request is rejected with an invalid argument error.
1439
+ # Corresponds to the JSON property `metricValueSets`
1440
+ # @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
1441
+ attr_accessor :metric_value_sets
1442
+
1443
+ # Identity of the operation. This must be unique within the scope of the service
1444
+ # that generated the operation. If the service calls Check() and Report() on the
1445
+ # same operation, the two calls should carry the same id. UUID version 4 is
1446
+ # recommended, though not required. In scenarios where an operation is computed
1447
+ # from existing information and an idempotent id is desirable for deduplication
1448
+ # purpose, UUID version 5 is recommended. See RFC 4122 for details.
1449
+ # Corresponds to the JSON property `operationId`
1450
+ # @return [String]
1451
+ attr_accessor :operation_id
1452
+
1453
+ # Fully qualified name of the operation. Reserved for future use.
1454
+ # Corresponds to the JSON property `operationName`
1455
+ # @return [String]
1456
+ attr_accessor :operation_name
1457
+
1458
+ # Represents the properties needed for quota operations.
1459
+ # Corresponds to the JSON property `quotaProperties`
1460
+ # @return [Google::Apis::ServicecontrolV1::QuotaProperties]
1461
+ attr_accessor :quota_properties
1462
+
1463
+ # The resources that are involved in the operation. The maximum supported number
1464
+ # of entries in this field is 100.
1465
+ # Corresponds to the JSON property `resources`
1466
+ # @return [Array<Google::Apis::ServicecontrolV1::ResourceInfo>]
1467
+ attr_accessor :resources
1468
+
1469
+ # Required. Start time of the operation.
1470
+ # Corresponds to the JSON property `startTime`
1471
+ # @return [String]
1472
+ attr_accessor :start_time
1473
+
1474
+ # Unimplemented. A list of Cloud Trace spans. The span names shall contain the
1475
+ # id of the destination project which can be either the produce or the consumer
1476
+ # project.
1477
+ # Corresponds to the JSON property `traceSpans`
1478
+ # @return [Array<Google::Apis::ServicecontrolV1::TraceSpan>]
1479
+ attr_accessor :trace_spans
1480
+
1481
+ # User defined labels for the resource that this operation is associated with.
1482
+ # Only a combination of 1000 user labels per consumer project are allowed.
1483
+ # Corresponds to the JSON property `userLabels`
1484
+ # @return [Hash<String,String>]
1485
+ attr_accessor :user_labels
1486
+
1487
+ def initialize(**args)
1488
+ update!(**args)
1489
+ end
1490
+
1491
+ # Update properties of this object
1492
+ def update!(**args)
1493
+ @consumer_id = args[:consumer_id] if args.key?(:consumer_id)
1494
+ @end_time = args[:end_time] if args.key?(:end_time)
1495
+ @extensions = args[:extensions] if args.key?(:extensions)
1496
+ @importance = args[:importance] if args.key?(:importance)
1497
+ @labels = args[:labels] if args.key?(:labels)
1498
+ @log_entries = args[:log_entries] if args.key?(:log_entries)
1499
+ @metric_value_sets = args[:metric_value_sets] if args.key?(:metric_value_sets)
1500
+ @operation_id = args[:operation_id] if args.key?(:operation_id)
1501
+ @operation_name = args[:operation_name] if args.key?(:operation_name)
1502
+ @quota_properties = args[:quota_properties] if args.key?(:quota_properties)
1503
+ @resources = args[:resources] if args.key?(:resources)
1504
+ @start_time = args[:start_time] if args.key?(:start_time)
1505
+ @trace_spans = args[:trace_spans] if args.key?(:trace_spans)
1506
+ @user_labels = args[:user_labels] if args.key?(:user_labels)
1507
+ end
1508
+ end
1509
+
1510
+ # This message defines attributes for a node that handles a network request. The
1511
+ # node can be either a service or an application that sends, forwards, or
1512
+ # receives the request. Service peers should fill in `principal` and `labels` as
1513
+ # appropriate.
1514
+ class Peer
1515
+ include Google::Apis::Core::Hashable
1516
+
1517
+ # The IP address of the peer.
1518
+ # Corresponds to the JSON property `ip`
1519
+ # @return [String]
1520
+ attr_accessor :ip
1521
+
1522
+ # The labels associated with the peer.
1523
+ # Corresponds to the JSON property `labels`
1524
+ # @return [Hash<String,String>]
1525
+ attr_accessor :labels
1526
+
1527
+ # The network port of the peer.
1528
+ # Corresponds to the JSON property `port`
1529
+ # @return [Fixnum]
1530
+ attr_accessor :port
1531
+
1532
+ # The identity of this peer. Similar to `Request.auth.principal`, but relative
1533
+ # to the peer instead of the request. For example, the idenity associated with a
1534
+ # load balancer that forwared the request.
1535
+ # Corresponds to the JSON property `principal`
1536
+ # @return [String]
1537
+ attr_accessor :principal
1538
+
1539
+ # The CLDR country/region code associated with the above IP address. If the IP
1540
+ # address is private, the `region_code` should reflect the physical location
1541
+ # where this peer is running.
1542
+ # Corresponds to the JSON property `regionCode`
1543
+ # @return [String]
1544
+ attr_accessor :region_code
1545
+
1546
+ def initialize(**args)
1547
+ update!(**args)
1548
+ end
1549
+
1550
+ # Update properties of this object
1551
+ def update!(**args)
1552
+ @ip = args[:ip] if args.key?(:ip)
1553
+ @labels = args[:labels] if args.key?(:labels)
1554
+ @port = args[:port] if args.key?(:port)
1555
+ @principal = args[:principal] if args.key?(:principal)
1556
+ @region_code = args[:region_code] if args.key?(:region_code)
1557
+ end
1558
+ end
1559
+
1560
+ # Represents error information for QuotaOperation.
1561
+ class QuotaError
1562
+ include Google::Apis::Core::Hashable
1563
+
1564
+ # Error code.
1565
+ # Corresponds to the JSON property `code`
1566
+ # @return [String]
1567
+ attr_accessor :code
1568
+
1569
+ # Free-form text that provides details on the cause of the error.
1570
+ # Corresponds to the JSON property `description`
1571
+ # @return [String]
1572
+ attr_accessor :description
1573
+
1574
+ # The `Status` type defines a logical error model that is suitable for different
1575
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1576
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1577
+ # data: error code, error message, and error details. You can find out more
1578
+ # about this error model and how to work with it in the [API Design Guide](https:
1579
+ # //cloud.google.com/apis/design/errors).
1580
+ # Corresponds to the JSON property `status`
1581
+ # @return [Google::Apis::ServicecontrolV1::Status]
1582
+ attr_accessor :status
1583
+
1584
+ # Subject to whom this error applies. See the specific enum for more details on
1585
+ # this field. For example, "clientip:" or "project:".
1586
+ # Corresponds to the JSON property `subject`
1587
+ # @return [String]
1588
+ attr_accessor :subject
1589
+
1590
+ def initialize(**args)
1591
+ update!(**args)
1592
+ end
1593
+
1594
+ # Update properties of this object
1595
+ def update!(**args)
1596
+ @code = args[:code] if args.key?(:code)
1597
+ @description = args[:description] if args.key?(:description)
1598
+ @status = args[:status] if args.key?(:status)
1599
+ @subject = args[:subject] if args.key?(:subject)
1600
+ end
1601
+ end
1602
+
1603
+ # Contains the quota information for a quota check response.
1604
+ class QuotaInfo
1605
+ include Google::Apis::Core::Hashable
1606
+
1607
+ # Quota Metrics that have exceeded quota limits. For QuotaGroup-based quota,
1608
+ # this is QuotaGroup.name For QuotaLimit-based quota, this is QuotaLimit.name
1609
+ # See: google.api.Quota Deprecated: Use quota_metrics to get per quota group
1610
+ # limit exceeded status.
1611
+ # Corresponds to the JSON property `limitExceeded`
1612
+ # @return [Array<String>]
1613
+ attr_accessor :limit_exceeded
1614
+
1615
+ # Map of quota group name to the actual number of tokens consumed. If the quota
1616
+ # check was not successful, then this will not be populated due to no quota
1617
+ # consumption. We are not merging this field with 'quota_metrics' field because
1618
+ # of the complexity of scaling in Chemist client code base. For simplicity, we
1619
+ # will keep this field for Castor (that scales quota usage) and 'quota_metrics'
1620
+ # for SuperQuota (that doesn't scale quota usage).
1621
+ # Corresponds to the JSON property `quotaConsumed`
1622
+ # @return [Hash<String,Fixnum>]
1623
+ attr_accessor :quota_consumed
1624
+
1625
+ # Quota metrics to indicate the usage. Depending on the check request, one or
1626
+ # more of the following metrics will be included: 1. For rate quota, per quota
1627
+ # group or per quota metric incremental usage will be specified using the
1628
+ # following delta metric: "serviceruntime.googleapis.com/api/consumer/
1629
+ # quota_used_count" 2. For allocation quota, per quota metric total usage will
1630
+ # be specified using the following gauge metric: "serviceruntime.googleapis.com/
1631
+ # allocation/consumer/quota_used_count" 3. For both rate quota and allocation
1632
+ # quota, the quota limit reached condition will be specified using the following
1633
+ # boolean metric: "serviceruntime.googleapis.com/quota/exceeded"
1634
+ # Corresponds to the JSON property `quotaMetrics`
1635
+ # @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
1636
+ attr_accessor :quota_metrics
1637
+
1638
+ def initialize(**args)
1639
+ update!(**args)
1640
+ end
1641
+
1642
+ # Update properties of this object
1643
+ def update!(**args)
1644
+ @limit_exceeded = args[:limit_exceeded] if args.key?(:limit_exceeded)
1645
+ @quota_consumed = args[:quota_consumed] if args.key?(:quota_consumed)
1646
+ @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics)
1647
+ end
1648
+ end
1649
+
1650
+ # Represents information regarding a quota operation.
1651
+ class QuotaOperation
1652
+ include Google::Apis::Core::Hashable
1653
+
1654
+ # Identity of the consumer for whom this quota operation is being performed.
1655
+ # This can be in one of the following formats: project:, project_number:,
1656
+ # api_key:.
1657
+ # Corresponds to the JSON property `consumerId`
1658
+ # @return [String]
1659
+ attr_accessor :consumer_id
1660
+
1661
+ # Labels describing the operation.
1662
+ # Corresponds to the JSON property `labels`
1663
+ # @return [Hash<String,String>]
1664
+ attr_accessor :labels
1665
+
1666
+ # Fully qualified name of the API method for which this quota operation is
1667
+ # requested. This name is used for matching quota rules or metric rules and
1668
+ # billing status rules defined in service configuration. This field should not
1669
+ # be set if any of the following is true: (1) the quota operation is performed
1670
+ # on non-API resources. (2) quota_metrics is set because the caller is doing
1671
+ # quota override. Example of an RPC method name: google.example.library.v1.
1672
+ # LibraryService.CreateShelf
1673
+ # Corresponds to the JSON property `methodName`
1674
+ # @return [String]
1675
+ attr_accessor :method_name
1676
+
1677
+ # Identity of the operation. This is expected to be unique within the scope of
1678
+ # the service that generated the operation, and guarantees idempotency in case
1679
+ # of retries. In order to ensure best performance and latency in the Quota
1680
+ # backends, operation_ids are optimally associated with time, so that related
1681
+ # operations can be accessed fast in storage. For this reason, the recommended
1682
+ # token for services that intend to operate at a high QPS is Unix time in nanos +
1683
+ # UUID
1684
+ # Corresponds to the JSON property `operationId`
1685
+ # @return [String]
1686
+ attr_accessor :operation_id
1687
+
1688
+ # Represents information about this operation. Each MetricValueSet corresponds
1689
+ # to a metric defined in the service configuration. The data type used in the
1690
+ # MetricValueSet must agree with the data type specified in the metric
1691
+ # definition. Within a single operation, it is not allowed to have more than one
1692
+ # MetricValue instances that have the same metric names and identical label
1693
+ # value combinations. If a request has such duplicated MetricValue instances,
1694
+ # the entire request is rejected with an invalid argument error. This field is
1695
+ # mutually exclusive with method_name.
1696
+ # Corresponds to the JSON property `quotaMetrics`
1697
+ # @return [Array<Google::Apis::ServicecontrolV1::MetricValueSet>]
1698
+ attr_accessor :quota_metrics
1699
+
1700
+ # Quota mode for this operation.
1701
+ # Corresponds to the JSON property `quotaMode`
1702
+ # @return [String]
1703
+ attr_accessor :quota_mode
1704
+
1705
+ def initialize(**args)
1706
+ update!(**args)
1707
+ end
1708
+
1709
+ # Update properties of this object
1710
+ def update!(**args)
1711
+ @consumer_id = args[:consumer_id] if args.key?(:consumer_id)
1712
+ @labels = args[:labels] if args.key?(:labels)
1713
+ @method_name = args[:method_name] if args.key?(:method_name)
1714
+ @operation_id = args[:operation_id] if args.key?(:operation_id)
1715
+ @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics)
1716
+ @quota_mode = args[:quota_mode] if args.key?(:quota_mode)
1717
+ end
1718
+ end
1719
+
1720
+ # Represents the properties needed for quota operations.
1721
+ class QuotaProperties
1722
+ include Google::Apis::Core::Hashable
1723
+
1724
+ # Quota mode for this operation.
1725
+ # Corresponds to the JSON property `quotaMode`
1726
+ # @return [String]
1727
+ attr_accessor :quota_mode
1728
+
1729
+ def initialize(**args)
1730
+ update!(**args)
1731
+ end
1732
+
1733
+ # Update properties of this object
1734
+ def update!(**args)
1735
+ @quota_mode = args[:quota_mode] if args.key?(:quota_mode)
1736
+ end
1737
+ end
1738
+
1739
+ # Represents the processing error of one Operation in the request.
1740
+ class ReportError
1741
+ include Google::Apis::Core::Hashable
1742
+
1743
+ # The Operation.operation_id value from the request.
1744
+ # Corresponds to the JSON property `operationId`
1745
+ # @return [String]
1746
+ attr_accessor :operation_id
1747
+
1748
+ # The `Status` type defines a logical error model that is suitable for different
1749
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1750
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1751
+ # data: error code, error message, and error details. You can find out more
1752
+ # about this error model and how to work with it in the [API Design Guide](https:
1753
+ # //cloud.google.com/apis/design/errors).
1754
+ # Corresponds to the JSON property `status`
1755
+ # @return [Google::Apis::ServicecontrolV1::Status]
1756
+ attr_accessor :status
1757
+
1758
+ def initialize(**args)
1759
+ update!(**args)
1760
+ end
1761
+
1762
+ # Update properties of this object
1763
+ def update!(**args)
1764
+ @operation_id = args[:operation_id] if args.key?(:operation_id)
1765
+ @status = args[:status] if args.key?(:status)
1766
+ end
1767
+ end
1768
+
1769
+ # Contains additional info about the report operation.
1770
+ class ReportInfo
1771
+ include Google::Apis::Core::Hashable
1772
+
1773
+ # The Operation.operation_id value from the request.
1774
+ # Corresponds to the JSON property `operationId`
1775
+ # @return [String]
1776
+ attr_accessor :operation_id
1777
+
1778
+ # Contains the quota information for a quota check response.
1779
+ # Corresponds to the JSON property `quotaInfo`
1780
+ # @return [Google::Apis::ServicecontrolV1::QuotaInfo]
1781
+ attr_accessor :quota_info
1782
+
1783
+ def initialize(**args)
1784
+ update!(**args)
1785
+ end
1786
+
1787
+ # Update properties of this object
1788
+ def update!(**args)
1789
+ @operation_id = args[:operation_id] if args.key?(:operation_id)
1790
+ @quota_info = args[:quota_info] if args.key?(:quota_info)
1791
+ end
1792
+ end
1793
+
1794
+ # Request message for the Report method.
1795
+ class ReportRequest
1796
+ include Google::Apis::Core::Hashable
1797
+
1798
+ # Operations to be reported. Typically the service should report one operation
1799
+ # per request. Putting multiple operations into a single request is allowed, but
1800
+ # should be used only when multiple operations are natually available at the
1801
+ # time of the report. There is no limit on the number of operations in the same
1802
+ # ReportRequest, however the ReportRequest size should be no larger than 1MB.
1803
+ # See ReportResponse.report_errors for partial failure behavior.
1804
+ # Corresponds to the JSON property `operations`
1805
+ # @return [Array<Google::Apis::ServicecontrolV1::Operation>]
1806
+ attr_accessor :operations
1807
+
1808
+ # Specifies which version of service config should be used to process the
1809
+ # request. If unspecified or no matching version can be found, the latest one
1810
+ # will be used.
1811
+ # Corresponds to the JSON property `serviceConfigId`
1812
+ # @return [String]
1813
+ attr_accessor :service_config_id
1814
+
1815
+ def initialize(**args)
1816
+ update!(**args)
1817
+ end
1818
+
1819
+ # Update properties of this object
1820
+ def update!(**args)
1821
+ @operations = args[:operations] if args.key?(:operations)
1822
+ @service_config_id = args[:service_config_id] if args.key?(:service_config_id)
1823
+ end
1824
+ end
1825
+
1826
+ # Response message for the Report method.
1827
+ class ReportResponse
1828
+ include Google::Apis::Core::Hashable
1829
+
1830
+ # Partial failures, one for each `Operation` in the request that failed
1831
+ # processing. There are three possible combinations of the RPC status: 1. The
1832
+ # combination of a successful RPC status and an empty `report_errors` list
1833
+ # indicates a complete success where all `Operations` in the request are
1834
+ # processed successfully. 2. The combination of a successful RPC status and a
1835
+ # non-empty `report_errors` list indicates a partial success where some `
1836
+ # Operations` in the request succeeded. Each `Operation` that failed processing
1837
+ # has a corresponding item in this list. 3. A failed RPC status indicates a
1838
+ # general non-deterministic failure. When this happens, it's impossible to know
1839
+ # which of the 'Operations' in the request succeeded or failed.
1840
+ # Corresponds to the JSON property `reportErrors`
1841
+ # @return [Array<Google::Apis::ServicecontrolV1::ReportError>]
1842
+ attr_accessor :report_errors
1843
+
1844
+ # Quota usage for each quota release `Operation` request. Fully or partially
1845
+ # failed quota release request may or may not be present in `report_quota_info`.
1846
+ # For example, a failed quota release request will have the current quota usage
1847
+ # info when precise quota library returns the info. A deadline exceeded quota
1848
+ # request will not have quota usage info. If there is no quota release request,
1849
+ # report_quota_info will be empty.
1850
+ # Corresponds to the JSON property `reportInfos`
1851
+ # @return [Array<Google::Apis::ServicecontrolV1::ReportInfo>]
1852
+ attr_accessor :report_infos
1853
+
1854
+ # The actual config id used to process the request.
1855
+ # Corresponds to the JSON property `serviceConfigId`
1856
+ # @return [String]
1857
+ attr_accessor :service_config_id
1858
+
1859
+ # The current service rollout id used to process the request.
1860
+ # Corresponds to the JSON property `serviceRolloutId`
1861
+ # @return [String]
1862
+ attr_accessor :service_rollout_id
1863
+
1864
+ def initialize(**args)
1865
+ update!(**args)
1866
+ end
1867
+
1868
+ # Update properties of this object
1869
+ def update!(**args)
1870
+ @report_errors = args[:report_errors] if args.key?(:report_errors)
1871
+ @report_infos = args[:report_infos] if args.key?(:report_infos)
1872
+ @service_config_id = args[:service_config_id] if args.key?(:service_config_id)
1873
+ @service_rollout_id = args[:service_rollout_id] if args.key?(:service_rollout_id)
1874
+ end
1875
+ end
1876
+
1877
+ # This message defines attributes for an HTTP request. If the actual request is
1878
+ # not an HTTP request, the runtime system should try to map the actual request
1879
+ # to an equivalent HTTP request.
1880
+ class Request
1881
+ include Google::Apis::Core::Hashable
1882
+
1883
+ # This message defines request authentication attributes. Terminology is based
1884
+ # on the JSON Web Token (JWT) standard, but the terms also correlate to concepts
1885
+ # in other standards.
1886
+ # Corresponds to the JSON property `auth`
1887
+ # @return [Google::Apis::ServicecontrolV1::Auth]
1888
+ attr_accessor :auth
1889
+
1890
+ # The HTTP request headers. If multiple headers share the same key, they must be
1891
+ # merged according to the HTTP spec. All header keys must be lowercased, because
1892
+ # HTTP header keys are case-insensitive.
1893
+ # Corresponds to the JSON property `headers`
1894
+ # @return [Hash<String,String>]
1895
+ attr_accessor :headers
1896
+
1897
+ # The HTTP request `Host` header value.
1898
+ # Corresponds to the JSON property `host`
1899
+ # @return [String]
1900
+ attr_accessor :host
1901
+
1902
+ # The unique ID for a request, which can be propagated to downstream systems.
1903
+ # The ID should have low probability of collision within a single day for a
1904
+ # specific service.
1905
+ # Corresponds to the JSON property `id`
1906
+ # @return [String]
1907
+ attr_accessor :id
1908
+
1909
+ # The HTTP request method, such as `GET`, `POST`.
1910
+ # Corresponds to the JSON property `method`
1911
+ # @return [String]
1912
+ attr_accessor :method_prop
1913
+
1914
+ # The HTTP URL path.
1915
+ # Corresponds to the JSON property `path`
1916
+ # @return [String]
1917
+ attr_accessor :path
1918
+
1919
+ # The network protocol used with the request, such as "http/1.1", "spdy/3", "h2",
1920
+ # "h2c", "webrtc", "tcp", "udp", "quic". See https://www.iana.org/assignments/
1921
+ # tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for
1922
+ # details.
1923
+ # Corresponds to the JSON property `protocol`
1924
+ # @return [String]
1925
+ attr_accessor :protocol
1926
+
1927
+ # The HTTP URL query in the format of `name1=value1&name2=value2`, as it appears
1928
+ # in the first line of the HTTP request. No decoding is performed.
1929
+ # Corresponds to the JSON property `query`
1930
+ # @return [String]
1931
+ attr_accessor :query
1932
+
1933
+ # A special parameter for request reason. It is used by security systems to
1934
+ # associate auditing information with a request.
1935
+ # Corresponds to the JSON property `reason`
1936
+ # @return [String]
1937
+ attr_accessor :reason
1938
+
1939
+ # The HTTP URL scheme, such as `http` and `https`.
1940
+ # Corresponds to the JSON property `scheme`
1941
+ # @return [String]
1942
+ attr_accessor :scheme
1943
+
1944
+ # The HTTP request size in bytes. If unknown, it must be -1.
1945
+ # Corresponds to the JSON property `size`
1946
+ # @return [Fixnum]
1947
+ attr_accessor :size
1948
+
1949
+ # The timestamp when the `destination` service receives the first byte of the
1950
+ # request.
1951
+ # Corresponds to the JSON property `time`
1952
+ # @return [String]
1953
+ attr_accessor :time
1954
+
1955
+ def initialize(**args)
1956
+ update!(**args)
1957
+ end
1958
+
1959
+ # Update properties of this object
1960
+ def update!(**args)
1961
+ @auth = args[:auth] if args.key?(:auth)
1962
+ @headers = args[:headers] if args.key?(:headers)
1963
+ @host = args[:host] if args.key?(:host)
1964
+ @id = args[:id] if args.key?(:id)
1965
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
1966
+ @path = args[:path] if args.key?(:path)
1967
+ @protocol = args[:protocol] if args.key?(:protocol)
1968
+ @query = args[:query] if args.key?(:query)
1969
+ @reason = args[:reason] if args.key?(:reason)
1970
+ @scheme = args[:scheme] if args.key?(:scheme)
1971
+ @size = args[:size] if args.key?(:size)
1972
+ @time = args[:time] if args.key?(:time)
1973
+ end
1974
+ end
1975
+
1976
+ # Metadata about the request.
1977
+ class RequestMetadata
1978
+ include Google::Apis::Core::Hashable
1979
+
1980
+ # The IP address of the caller. For caller from internet, this will be public
1981
+ # IPv4 or IPv6 address. For caller from a Compute Engine VM with external IP
1982
+ # address, this will be the VM's external IP address. For caller from a Compute
1983
+ # Engine VM without external IP address, if the VM is in the same organization (
1984
+ # or project) as the accessed resource, `caller_ip` will be the VM's internal
1985
+ # IPv4 address, otherwise the `caller_ip` will be redacted to "gce-internal-ip".
1986
+ # See https://cloud.google.com/compute/docs/vpc/ for more information.
1987
+ # Corresponds to the JSON property `callerIp`
1988
+ # @return [String]
1989
+ attr_accessor :caller_ip
1990
+
1991
+ # The network of the caller. Set only if the network host project is part of the
1992
+ # same GCP organization (or project) as the accessed resource. See https://cloud.
1993
+ # google.com/compute/docs/vpc/ for more information. This is a scheme-less URI
1994
+ # full resource name. For example: "//compute.googleapis.com/projects/PROJECT_ID/
1995
+ # global/networks/NETWORK_ID"
1996
+ # Corresponds to the JSON property `callerNetwork`
1997
+ # @return [String]
1998
+ attr_accessor :caller_network
1999
+
2000
+ # The user agent of the caller. This information is not authenticated and should
2001
+ # be treated accordingly. For example: + `google-api-python-client/1.4.0`: The
2002
+ # request was made by the Google API client for Python. + `Cloud SDK Command
2003
+ # Line Tool apitools-client/1.0 gcloud/0.9.62`: The request was made by the
2004
+ # Google Cloud SDK CLI (gcloud). + `AppEngine-Google; (+http://code.google.com/
2005
+ # appengine; appid: s~my-project`: The request was made from the `my-project`
2006
+ # App Engine app. NOLINT
2007
+ # Corresponds to the JSON property `callerSuppliedUserAgent`
2008
+ # @return [String]
2009
+ attr_accessor :caller_supplied_user_agent
2010
+
2011
+ # This message defines attributes for a node that handles a network request. The
2012
+ # node can be either a service or an application that sends, forwards, or
2013
+ # receives the request. Service peers should fill in `principal` and `labels` as
2014
+ # appropriate.
2015
+ # Corresponds to the JSON property `destinationAttributes`
2016
+ # @return [Google::Apis::ServicecontrolV1::Peer]
2017
+ attr_accessor :destination_attributes
2018
+
2019
+ # This message defines attributes for an HTTP request. If the actual request is
2020
+ # not an HTTP request, the runtime system should try to map the actual request
2021
+ # to an equivalent HTTP request.
2022
+ # Corresponds to the JSON property `requestAttributes`
2023
+ # @return [Google::Apis::ServicecontrolV1::Request]
2024
+ attr_accessor :request_attributes
2025
+
2026
+ def initialize(**args)
2027
+ update!(**args)
2028
+ end
2029
+
2030
+ # Update properties of this object
2031
+ def update!(**args)
2032
+ @caller_ip = args[:caller_ip] if args.key?(:caller_ip)
2033
+ @caller_network = args[:caller_network] if args.key?(:caller_network)
2034
+ @caller_supplied_user_agent = args[:caller_supplied_user_agent] if args.key?(:caller_supplied_user_agent)
2035
+ @destination_attributes = args[:destination_attributes] if args.key?(:destination_attributes)
2036
+ @request_attributes = args[:request_attributes] if args.key?(:request_attributes)
2037
+ end
2038
+ end
2039
+
2040
+ # This message defines core attributes for a resource. A resource is an
2041
+ # addressable (named) entity provided by the destination service. For example, a
2042
+ # file stored on a network storage service.
2043
+ class Resource
2044
+ include Google::Apis::Core::Hashable
2045
+
2046
+ # Annotations is an unstructured key-value map stored with a resource that may
2047
+ # be set by external tools to store and retrieve arbitrary metadata. They are
2048
+ # not queryable and should be preserved when modifying objects. More info: http:/
2049
+ # /kubernetes.io/docs/user-guide/annotations
2050
+ # Corresponds to the JSON property `annotations`
2051
+ # @return [Hash<String,String>]
2052
+ attr_accessor :annotations
2053
+
2054
+ # Output only. The timestamp when the resource was created. This may be either
2055
+ # the time creation was initiated or when it was completed.
2056
+ # Corresponds to the JSON property `createTime`
2057
+ # @return [String]
2058
+ attr_accessor :create_time
2059
+
2060
+ # Output only. The timestamp when the resource was deleted. If the resource is
2061
+ # not deleted, this must be empty.
2062
+ # Corresponds to the JSON property `deleteTime`
2063
+ # @return [String]
2064
+ attr_accessor :delete_time
2065
+
2066
+ # Mutable. The display name set by clients. Must be <= 63 characters.
2067
+ # Corresponds to the JSON property `displayName`
2068
+ # @return [String]
2069
+ attr_accessor :display_name
2070
+
2071
+ # Output only. An opaque value that uniquely identifies a version or generation
2072
+ # of a resource. It can be used to confirm that the client and server agree on
2073
+ # the ordering of a resource being written.
2074
+ # Corresponds to the JSON property `etag`
2075
+ # @return [String]
2076
+ attr_accessor :etag
2077
+
2078
+ # The labels or tags on the resource, such as AWS resource tags and Kubernetes
2079
+ # resource labels.
2080
+ # Corresponds to the JSON property `labels`
2081
+ # @return [Hash<String,String>]
2082
+ attr_accessor :labels
2083
+
2084
+ # The stable identifier (name) of a resource on the `service`. A resource can be
2085
+ # logically identified as "//`resource.service`/`resource.name`". The
2086
+ # differences between a resource name and a URI are: * Resource name is a
2087
+ # logical identifier, independent of network protocol and API version. For
2088
+ # example, `//pubsub.googleapis.com/projects/123/topics/news-feed`. * URI often
2089
+ # includes protocol and version information, so it can be used directly by
2090
+ # applications. For example, `https://pubsub.googleapis.com/v1/projects/123/
2091
+ # topics/news-feed`. See https://cloud.google.com/apis/design/resource_names for
2092
+ # details.
2093
+ # Corresponds to the JSON property `name`
2094
+ # @return [String]
2095
+ attr_accessor :name
2096
+
2097
+ # The name of the service that this resource belongs to, such as `pubsub.
2098
+ # googleapis.com`. The service may be different from the DNS hostname that
2099
+ # actually serves the request.
2100
+ # Corresponds to the JSON property `service`
2101
+ # @return [String]
2102
+ attr_accessor :service
2103
+
2104
+ # The type of the resource. The syntax is platform-specific because different
2105
+ # platforms define their resources differently. For Google APIs, the type format
2106
+ # must be "`service`/`kind`".
2107
+ # Corresponds to the JSON property `type`
2108
+ # @return [String]
2109
+ attr_accessor :type
2110
+
2111
+ # The unique identifier of the resource. UID is unique in the time and space for
2112
+ # this resource within the scope of the service. It is typically generated by
2113
+ # the server on successful creation of a resource and must not be changed. UID
2114
+ # is used to uniquely identify resources with resource name reuses. This should
2115
+ # be a UUID4.
2116
+ # Corresponds to the JSON property `uid`
2117
+ # @return [String]
2118
+ attr_accessor :uid
2119
+
2120
+ # Output only. The timestamp when the resource was last updated. Any change to
2121
+ # the resource made by users must refresh this value. Changes to a resource made
2122
+ # by the service should refresh this value.
2123
+ # Corresponds to the JSON property `updateTime`
2124
+ # @return [String]
2125
+ attr_accessor :update_time
2126
+
2127
+ def initialize(**args)
2128
+ update!(**args)
2129
+ end
2130
+
2131
+ # Update properties of this object
2132
+ def update!(**args)
2133
+ @annotations = args[:annotations] if args.key?(:annotations)
2134
+ @create_time = args[:create_time] if args.key?(:create_time)
2135
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
2136
+ @display_name = args[:display_name] if args.key?(:display_name)
2137
+ @etag = args[:etag] if args.key?(:etag)
2138
+ @labels = args[:labels] if args.key?(:labels)
2139
+ @name = args[:name] if args.key?(:name)
2140
+ @service = args[:service] if args.key?(:service)
2141
+ @type = args[:type] if args.key?(:type)
2142
+ @uid = args[:uid] if args.key?(:uid)
2143
+ @update_time = args[:update_time] if args.key?(:update_time)
2144
+ end
2145
+ end
2146
+
2147
+ # Describes a resource associated with this operation.
2148
+ class ResourceInfo
2149
+ include Google::Apis::Core::Hashable
2150
+
2151
+ # The identifier of the parent of this resource instance. Must be in one of the
2152
+ # following formats: - `projects/` - `folders/` - `organizations/`
2153
+ # Corresponds to the JSON property `resourceContainer`
2154
+ # @return [String]
2155
+ attr_accessor :resource_container
2156
+
2157
+ # The location of the resource. If not empty, the resource will be checked
2158
+ # against location policy. The value must be a valid zone, region or multiregion.
2159
+ # For example: "europe-west4" or "northamerica-northeast1-a"
2160
+ # Corresponds to the JSON property `resourceLocation`
2161
+ # @return [String]
2162
+ attr_accessor :resource_location
2163
+
2164
+ # Name of the resource. This is used for auditing purposes.
2165
+ # Corresponds to the JSON property `resourceName`
2166
+ # @return [String]
2167
+ attr_accessor :resource_name
2168
+
2169
+ def initialize(**args)
2170
+ update!(**args)
2171
+ end
2172
+
2173
+ # Update properties of this object
2174
+ def update!(**args)
2175
+ @resource_container = args[:resource_container] if args.key?(:resource_container)
2176
+ @resource_location = args[:resource_location] if args.key?(:resource_location)
2177
+ @resource_name = args[:resource_name] if args.key?(:resource_name)
2178
+ end
2179
+ end
2180
+
2181
+ # Location information about a resource.
2182
+ class ResourceLocation
2183
+ include Google::Apis::Core::Hashable
2184
+
2185
+ # The locations of a resource after the execution of the operation. Requests to
2186
+ # create or delete a location based resource must populate the '
2187
+ # current_locations' field and not the 'original_locations' field. For example: "
2188
+ # europe-west1-a" "us-east1" "nam3"
2189
+ # Corresponds to the JSON property `currentLocations`
2190
+ # @return [Array<String>]
2191
+ attr_accessor :current_locations
2192
+
2193
+ # The locations of a resource prior to the execution of the operation. Requests
2194
+ # that mutate the resource's location must populate both the 'original_locations'
2195
+ # as well as the 'current_locations' fields. For example: "europe-west1-a" "us-
2196
+ # east1" "nam3"
2197
+ # Corresponds to the JSON property `originalLocations`
2198
+ # @return [Array<String>]
2199
+ attr_accessor :original_locations
2200
+
2201
+ def initialize(**args)
2202
+ update!(**args)
2203
+ end
2204
+
2205
+ # Update properties of this object
2206
+ def update!(**args)
2207
+ @current_locations = args[:current_locations] if args.key?(:current_locations)
2208
+ @original_locations = args[:original_locations] if args.key?(:original_locations)
2209
+ end
2210
+ end
2211
+
2212
+ # Identity delegation history of an authenticated service account.
2213
+ class ServiceAccountDelegationInfo
2214
+ include Google::Apis::Core::Hashable
2215
+
2216
+ # First party identity principal.
2217
+ # Corresponds to the JSON property `firstPartyPrincipal`
2218
+ # @return [Google::Apis::ServicecontrolV1::FirstPartyPrincipal]
2219
+ attr_accessor :first_party_principal
2220
+
2221
+ # A string representing the principal_subject associated with the identity. See
2222
+ # go/3pical for more info on how principal_subject is formatted.
2223
+ # Corresponds to the JSON property `principalSubject`
2224
+ # @return [String]
2225
+ attr_accessor :principal_subject
2226
+
2227
+ # Third party identity principal.
2228
+ # Corresponds to the JSON property `thirdPartyPrincipal`
2229
+ # @return [Google::Apis::ServicecontrolV1::ThirdPartyPrincipal]
2230
+ attr_accessor :third_party_principal
2231
+
2232
+ def initialize(**args)
2233
+ update!(**args)
2234
+ end
2235
+
2236
+ # Update properties of this object
2237
+ def update!(**args)
2238
+ @first_party_principal = args[:first_party_principal] if args.key?(:first_party_principal)
2239
+ @principal_subject = args[:principal_subject] if args.key?(:principal_subject)
2240
+ @third_party_principal = args[:third_party_principal] if args.key?(:third_party_principal)
2241
+ end
2242
+ end
2243
+
2244
+ # The context of a span, attached to Exemplars in Distribution values during
2245
+ # aggregation. It contains the name of a span with format: projects/[
2246
+ # PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]
2247
+ class SpanContext
2248
+ include Google::Apis::Core::Hashable
2249
+
2250
+ # The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/
2251
+ # traces/[TRACE_ID]/spans/[SPAN_ID] `[TRACE_ID]` is a unique identifier for a
2252
+ # trace within a project; it is a 32-character hexadecimal encoding of a 16-byte
2253
+ # array. `[SPAN_ID]` is a unique identifier for a span within a trace; it is a
2254
+ # 16-character hexadecimal encoding of an 8-byte array.
2255
+ # Corresponds to the JSON property `spanName`
2256
+ # @return [String]
2257
+ attr_accessor :span_name
2258
+
2259
+ def initialize(**args)
2260
+ update!(**args)
2261
+ end
2262
+
2263
+ # Update properties of this object
2264
+ def update!(**args)
2265
+ @span_name = args[:span_name] if args.key?(:span_name)
2266
+ end
2267
+ end
2268
+
2269
+ # The `Status` type defines a logical error model that is suitable for different
2270
+ # programming environments, including REST APIs and RPC APIs. It is used by [
2271
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
2272
+ # data: error code, error message, and error details. You can find out more
2273
+ # about this error model and how to work with it in the [API Design Guide](https:
2274
+ # //cloud.google.com/apis/design/errors).
2275
+ class Status
2276
+ include Google::Apis::Core::Hashable
2277
+
2278
+ # The status code, which should be an enum value of google.rpc.Code.
2279
+ # Corresponds to the JSON property `code`
2280
+ # @return [Fixnum]
2281
+ attr_accessor :code
2282
+
2283
+ # A list of messages that carry the error details. There is a common set of
2284
+ # message types for APIs to use.
2285
+ # Corresponds to the JSON property `details`
2286
+ # @return [Array<Hash<String,Object>>]
2287
+ attr_accessor :details
2288
+
2289
+ # A developer-facing error message, which should be in English. Any user-facing
2290
+ # error message should be localized and sent in the google.rpc.Status.details
2291
+ # field, or localized by the client.
2292
+ # Corresponds to the JSON property `message`
2293
+ # @return [String]
2294
+ attr_accessor :message
2295
+
2296
+ def initialize(**args)
2297
+ update!(**args)
2298
+ end
2299
+
2300
+ # Update properties of this object
2301
+ def update!(**args)
2302
+ @code = args[:code] if args.key?(:code)
2303
+ @details = args[:details] if args.key?(:details)
2304
+ @message = args[:message] if args.key?(:message)
2305
+ end
2306
+ end
2307
+
2308
+ # Third party identity principal.
2309
+ class ThirdPartyPrincipal
2310
+ include Google::Apis::Core::Hashable
2311
+
2312
+ # Metadata about third party identity.
2313
+ # Corresponds to the JSON property `thirdPartyClaims`
2314
+ # @return [Hash<String,Object>]
2315
+ attr_accessor :third_party_claims
2316
+
2317
+ def initialize(**args)
2318
+ update!(**args)
2319
+ end
2320
+
2321
+ # Update properties of this object
2322
+ def update!(**args)
2323
+ @third_party_claims = args[:third_party_claims] if args.key?(:third_party_claims)
2324
+ end
2325
+ end
2326
+
2327
+ # A span represents a single operation within a trace. Spans can be nested to
2328
+ # form a trace tree. Often, a trace contains a root span that describes the end-
2329
+ # to-end latency, and one or more subspans for its sub-operations. A trace can
2330
+ # also contain multiple root spans, or none at all. Spans do not need to be
2331
+ # contiguous—there may be gaps or overlaps between spans in a trace.
2332
+ class TraceSpan
2333
+ include Google::Apis::Core::Hashable
2334
+
2335
+ # A set of attributes, each in the format `[KEY]:[VALUE]`.
2336
+ # Corresponds to the JSON property `attributes`
2337
+ # @return [Google::Apis::ServicecontrolV1::Attributes]
2338
+ attr_accessor :attributes
2339
+
2340
+ # An optional number of child spans that were generated while this span was
2341
+ # active. If set, allows implementation to detect missing child spans.
2342
+ # Corresponds to the JSON property `childSpanCount`
2343
+ # @return [Fixnum]
2344
+ attr_accessor :child_span_count
2345
+
2346
+ # Represents a string that might be shortened to a specified length.
2347
+ # Corresponds to the JSON property `displayName`
2348
+ # @return [Google::Apis::ServicecontrolV1::TruncatableString]
2349
+ attr_accessor :display_name
2350
+
2351
+ # The end time of the span. On the client side, this is the time kept by the
2352
+ # local machine where the span execution ends. On the server side, this is the
2353
+ # time when the server application handler stops running.
2354
+ # Corresponds to the JSON property `endTime`
2355
+ # @return [String]
2356
+ attr_accessor :end_time
2357
+
2358
+ # The resource name of the span in the following format: projects/[PROJECT_ID]/
2359
+ # traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a
2360
+ # project; it is a 32-character hexadecimal encoding of a 16-byte array. [
2361
+ # SPAN_ID] is a unique identifier for a span within a trace; it is a 16-
2362
+ # character hexadecimal encoding of an 8-byte array.
2363
+ # Corresponds to the JSON property `name`
2364
+ # @return [String]
2365
+ attr_accessor :name
2366
+
2367
+ # The [SPAN_ID] of this span's parent span. If this is a root span, then this
2368
+ # field must be empty.
2369
+ # Corresponds to the JSON property `parentSpanId`
2370
+ # @return [String]
2371
+ attr_accessor :parent_span_id
2372
+
2373
+ # (Optional) Set this parameter to indicate whether this span is in the same
2374
+ # process as its parent. If you do not set this parameter, Stackdriver Trace is
2375
+ # unable to take advantage of this helpful information.
2376
+ # Corresponds to the JSON property `sameProcessAsParentSpan`
2377
+ # @return [Boolean]
2378
+ attr_accessor :same_process_as_parent_span
2379
+ alias_method :same_process_as_parent_span?, :same_process_as_parent_span
2380
+
2381
+ # The [SPAN_ID] portion of the span's resource name.
2382
+ # Corresponds to the JSON property `spanId`
2383
+ # @return [String]
2384
+ attr_accessor :span_id
2385
+
2386
+ # Distinguishes between spans generated in a particular context. For example,
2387
+ # two spans with the same name may be distinguished using `CLIENT` (caller) and `
2388
+ # SERVER` (callee) to identify an RPC call.
2389
+ # Corresponds to the JSON property `spanKind`
2390
+ # @return [String]
2391
+ attr_accessor :span_kind
2392
+
2393
+ # The start time of the span. On the client side, this is the time kept by the
2394
+ # local machine where the span execution starts. On the server side, this is the
2395
+ # time when the server's application handler starts running.
2396
+ # Corresponds to the JSON property `startTime`
2397
+ # @return [String]
2398
+ attr_accessor :start_time
2399
+
2400
+ # The `Status` type defines a logical error model that is suitable for different
2401
+ # programming environments, including REST APIs and RPC APIs. It is used by [
2402
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
2403
+ # data: error code, error message, and error details. You can find out more
2404
+ # about this error model and how to work with it in the [API Design Guide](https:
2405
+ # //cloud.google.com/apis/design/errors).
2406
+ # Corresponds to the JSON property `status`
2407
+ # @return [Google::Apis::ServicecontrolV1::Status]
2408
+ attr_accessor :status
2409
+
2410
+ def initialize(**args)
2411
+ update!(**args)
2412
+ end
2413
+
2414
+ # Update properties of this object
2415
+ def update!(**args)
2416
+ @attributes = args[:attributes] if args.key?(:attributes)
2417
+ @child_span_count = args[:child_span_count] if args.key?(:child_span_count)
2418
+ @display_name = args[:display_name] if args.key?(:display_name)
2419
+ @end_time = args[:end_time] if args.key?(:end_time)
2420
+ @name = args[:name] if args.key?(:name)
2421
+ @parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id)
2422
+ @same_process_as_parent_span = args[:same_process_as_parent_span] if args.key?(:same_process_as_parent_span)
2423
+ @span_id = args[:span_id] if args.key?(:span_id)
2424
+ @span_kind = args[:span_kind] if args.key?(:span_kind)
2425
+ @start_time = args[:start_time] if args.key?(:start_time)
2426
+ @status = args[:status] if args.key?(:status)
2427
+ end
2428
+ end
2429
+
2430
+ # Represents a string that might be shortened to a specified length.
2431
+ class TruncatableString
2432
+ include Google::Apis::Core::Hashable
2433
+
2434
+ # The number of bytes removed from the original string. If this value is 0, then
2435
+ # the string was not shortened.
2436
+ # Corresponds to the JSON property `truncatedByteCount`
2437
+ # @return [Fixnum]
2438
+ attr_accessor :truncated_byte_count
2439
+
2440
+ # The shortened string. For example, if the original string is 500 bytes long
2441
+ # and the limit of the string is 128 bytes, then `value` contains the first 128
2442
+ # bytes of the 500-byte string. Truncation always happens on a UTF8 character
2443
+ # boundary. If there are multi-byte characters in the string, then the length of
2444
+ # the shortened string might be less than the size limit.
2445
+ # Corresponds to the JSON property `value`
2446
+ # @return [String]
2447
+ attr_accessor :value
2448
+
2449
+ def initialize(**args)
2450
+ update!(**args)
2451
+ end
2452
+
2453
+ # Update properties of this object
2454
+ def update!(**args)
2455
+ @truncated_byte_count = args[:truncated_byte_count] if args.key?(:truncated_byte_count)
2456
+ @value = args[:value] if args.key?(:value)
2457
+ end
2458
+ end
2459
+ end
2460
+ end
2461
+ end