google-apis-logging_v2 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: 2b160fb161318fca71d05364c79e8bd0ea151dbeb18873e0d0131900f24f15f5
4
+ data.tar.gz: 66a0c92f4b36b7fa39df4e285618c737cce365de10b6d08c851a6c7b2d08661c
5
+ SHA512:
6
+ metadata.gz: 7e5df2f4ce6853106b14eefb15d2867613475f85e4972eaab0f412acf69bce4d0860a1f7ff4420364ee6c1ce8025e796e2fcba04f815faac317c47224e2291a3
7
+ data.tar.gz: 5b74f6ba11fb37b8d24ec32d81996ab1d7ea6a70ccf836bc07a3d7880ec5163dd310bcd2877c13d742baf48f1f95005fa1420f73322578604d514b04df8643b5
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-logging_v2
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/logging_v2/*.rb
9
+ lib/google/apis/logging_v2.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-logging_v2
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201114
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 V2 of the Cloud Logging API
2
+
3
+ This is a simple client library for version V2 of the Cloud Logging 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/logging.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-logging_v2', '~> 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-logging_v2
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/logging_v2"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::LoggingV2::LoggingService.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 Logging service in particular.)
67
+
68
+ For reference information on specific calls in the Cloud Logging API, see the {Google::Apis::LoggingV2::LoggingService 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-logging_v2`, 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/logging/docs/) 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/logging_v2"
@@ -0,0 +1,51 @@
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/logging_v2/service.rb'
16
+ require 'google/apis/logging_v2/classes.rb'
17
+ require 'google/apis/logging_v2/representations.rb'
18
+ require 'google/apis/logging_v2/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Cloud Logging API
23
+ #
24
+ # Writes log entries and manages your Cloud Logging configuration. The table
25
+ # entries below are presented in alphabetical order, not in order of common use.
26
+ # For explanations of the concepts found in the table entries, read the
27
+ # documentation at https://cloud.google.com/logging/docs.
28
+ #
29
+ # @see https://cloud.google.com/logging/docs/
30
+ module LoggingV2
31
+ # Version of the Cloud Logging API this client connects to.
32
+ # This is NOT the gem version.
33
+ VERSION = 'V2'
34
+
35
+ # View and manage your data across Google Cloud Platform services
36
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
37
+
38
+ # View your data across Google Cloud Platform services
39
+ AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
40
+
41
+ # Administrate log data for your projects
42
+ AUTH_LOGGING_ADMIN = 'https://www.googleapis.com/auth/logging.admin'
43
+
44
+ # View log data for your projects
45
+ AUTH_LOGGING_READ = 'https://www.googleapis.com/auth/logging.read'
46
+
47
+ # Submit log data for your projects
48
+ AUTH_LOGGING_WRITE = 'https://www.googleapis.com/auth/logging.write'
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,2367 @@
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 LoggingV2
24
+
25
+ # Options that change functionality of a sink exporting data to BigQuery.
26
+ class BigQueryOptions
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Optional. Whether to use BigQuery's partition tables (https://cloud.google.com/
30
+ # bigquery/docs/partitioned-tables). By default, Logging creates dated tables
31
+ # based on the log entries' timestamps, e.g. syslog_20170523. With partitioned
32
+ # tables the date suffix is no longer present and special query syntax (https://
33
+ # cloud.google.com/bigquery/docs/querying-partitioned-tables) has to be used
34
+ # instead. In both cases, tables are sharded based on UTC timezone.
35
+ # Corresponds to the JSON property `usePartitionedTables`
36
+ # @return [Boolean]
37
+ attr_accessor :use_partitioned_tables
38
+ alias_method :use_partitioned_tables?, :use_partitioned_tables
39
+
40
+ # Output only. True if new timestamp column based partitioning is in use, false
41
+ # if legacy ingestion-time partitioning is in use. All new sinks will have this
42
+ # field set true and will use timestamp column based partitioning. If
43
+ # use_partitioned_tables is false, this value has no meaning and will be false.
44
+ # Legacy sinks using partitioned tables will have this field set to false.
45
+ # Corresponds to the JSON property `usesTimestampColumnPartitioning`
46
+ # @return [Boolean]
47
+ attr_accessor :uses_timestamp_column_partitioning
48
+ alias_method :uses_timestamp_column_partitioning?, :uses_timestamp_column_partitioning
49
+
50
+ def initialize(**args)
51
+ update!(**args)
52
+ end
53
+
54
+ # Update properties of this object
55
+ def update!(**args)
56
+ @use_partitioned_tables = args[:use_partitioned_tables] if args.key?(:use_partitioned_tables)
57
+ @uses_timestamp_column_partitioning = args[:uses_timestamp_column_partitioning] if args.key?(:uses_timestamp_column_partitioning)
58
+ end
59
+ end
60
+
61
+ # BucketOptions describes the bucket boundaries used to create a histogram for
62
+ # the distribution. The buckets can be in a linear sequence, an exponential
63
+ # sequence, or each bucket can be specified explicitly. BucketOptions does not
64
+ # include the number of values in each bucket.A bucket has an inclusive lower
65
+ # bound and exclusive upper bound for the values that are counted for that
66
+ # bucket. The upper bound of a bucket must be strictly greater than the lower
67
+ # bound. The sequence of N buckets for a distribution consists of an underflow
68
+ # bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an
69
+ # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of
70
+ # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets
71
+ # span the whole range of finite values: lower bound of the underflow bucket is -
72
+ # infinity and the upper bound of the overflow bucket is +infinity. The finite
73
+ # buckets are so-called because both bounds are finite.
74
+ class BucketOptions
75
+ include Google::Apis::Core::Hashable
76
+
77
+ # Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (=
78
+ # N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1):
79
+ # boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at
80
+ # least one element. If bounds has only one element, then there are no finite
81
+ # buckets, and that single element is the common boundary of the overflow and
82
+ # underflow buckets.
83
+ # Corresponds to the JSON property `explicitBuckets`
84
+ # @return [Google::Apis::LoggingV2::Explicit]
85
+ attr_accessor :explicit_buckets
86
+
87
+ # Specifies an exponential sequence of buckets that have a width that is
88
+ # proportional to the value of the lower bound. Each bucket represents a
89
+ # constant relative uncertainty on a specific value in the bucket.There are
90
+ # num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:
91
+ # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i <
92
+ # N): scale * (growth_factor ^ (i - 1)).
93
+ # Corresponds to the JSON property `exponentialBuckets`
94
+ # @return [Google::Apis::LoggingV2::Exponential]
95
+ attr_accessor :exponential_buckets
96
+
97
+ # Specifies a linear sequence of buckets that all have the same width (except
98
+ # overflow and underflow). Each bucket represents a constant absolute
99
+ # uncertainty on the specific value in the bucket.There are num_finite_buckets +
100
+ # 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-
101
+ # 1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)).
102
+ # Corresponds to the JSON property `linearBuckets`
103
+ # @return [Google::Apis::LoggingV2::Linear]
104
+ attr_accessor :linear_buckets
105
+
106
+ def initialize(**args)
107
+ update!(**args)
108
+ end
109
+
110
+ # Update properties of this object
111
+ def update!(**args)
112
+ @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets)
113
+ @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets)
114
+ @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets)
115
+ end
116
+ end
117
+
118
+ # Describes the customer-managed encryption key (CMEK) settings associated with
119
+ # a project, folder, organization, billing account, or flexible resource.Note:
120
+ # CMEK for the Logs Router can currently only be configured for GCP
121
+ # organizations. Once configured, it applies to all projects and folders in the
122
+ # GCP organization.See Enabling CMEK for Logs Router (https://cloud.google.com/
123
+ # logging/docs/routing/managed-encryption) for more information.
124
+ class CmekSettings
125
+ include Google::Apis::Core::Hashable
126
+
127
+ # The resource name for the configured Cloud KMS key.KMS key name format: "
128
+ # projects/PROJECT_ID/locations/LOCATION/keyRings/KEYRING/cryptoKeys/KEY"For
129
+ # example: "projects/my-project-id/locations/my-region/keyRings/key-ring-name/
130
+ # cryptoKeys/key-name"To enable CMEK for the Logs Router, set this field to a
131
+ # valid kms_key_name for which the associated service account has the required
132
+ # roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key.The Cloud
133
+ # KMS key used by the Log Router can be updated by changing the kms_key_name to
134
+ # a new valid key name. Encryption operations that are in progress will be
135
+ # completed with the key that was in use when they started. Decryption
136
+ # operations will be completed using the key that was used at the time of
137
+ # encryption unless access to that key has been revoked.To disable CMEK for the
138
+ # Logs Router, set this field to an empty string.See Enabling CMEK for Logs
139
+ # Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for
140
+ # more information.
141
+ # Corresponds to the JSON property `kmsKeyName`
142
+ # @return [String]
143
+ attr_accessor :kms_key_name
144
+
145
+ # Output only. The resource name of the CMEK settings.
146
+ # Corresponds to the JSON property `name`
147
+ # @return [String]
148
+ attr_accessor :name
149
+
150
+ # Output only. The service account that will be used by the Logs Router to
151
+ # access your Cloud KMS key.Before enabling CMEK for Logs Router, you must first
152
+ # assign the role roles/cloudkms.cryptoKeyEncrypterDecrypter to the service
153
+ # account that the Logs Router will use to access your Cloud KMS key. Use
154
+ # GetCmekSettings to obtain the service account ID.See Enabling CMEK for Logs
155
+ # Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for
156
+ # more information.
157
+ # Corresponds to the JSON property `serviceAccountId`
158
+ # @return [String]
159
+ attr_accessor :service_account_id
160
+
161
+ def initialize(**args)
162
+ update!(**args)
163
+ end
164
+
165
+ # Update properties of this object
166
+ def update!(**args)
167
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
168
+ @name = args[:name] if args.key?(:name)
169
+ @service_account_id = args[:service_account_id] if args.key?(:service_account_id)
170
+ end
171
+ end
172
+
173
+ # A generic empty message that you can re-use to avoid defining duplicated empty
174
+ # messages in your APIs. A typical example is to use it as the request or the
175
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
176
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
177
+ # Empty is empty JSON object ``.
178
+ class Empty
179
+ include Google::Apis::Core::Hashable
180
+
181
+ def initialize(**args)
182
+ update!(**args)
183
+ end
184
+
185
+ # Update properties of this object
186
+ def update!(**args)
187
+ end
188
+ end
189
+
190
+ # Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (=
191
+ # N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1):
192
+ # boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at
193
+ # least one element. If bounds has only one element, then there are no finite
194
+ # buckets, and that single element is the common boundary of the overflow and
195
+ # underflow buckets.
196
+ class Explicit
197
+ include Google::Apis::Core::Hashable
198
+
199
+ # The values must be monotonically increasing.
200
+ # Corresponds to the JSON property `bounds`
201
+ # @return [Array<Float>]
202
+ attr_accessor :bounds
203
+
204
+ def initialize(**args)
205
+ update!(**args)
206
+ end
207
+
208
+ # Update properties of this object
209
+ def update!(**args)
210
+ @bounds = args[:bounds] if args.key?(:bounds)
211
+ end
212
+ end
213
+
214
+ # Specifies an exponential sequence of buckets that have a width that is
215
+ # proportional to the value of the lower bound. Each bucket represents a
216
+ # constant relative uncertainty on a specific value in the bucket.There are
217
+ # num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:
218
+ # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i <
219
+ # N): scale * (growth_factor ^ (i - 1)).
220
+ class Exponential
221
+ include Google::Apis::Core::Hashable
222
+
223
+ # Must be greater than 1.
224
+ # Corresponds to the JSON property `growthFactor`
225
+ # @return [Float]
226
+ attr_accessor :growth_factor
227
+
228
+ # Must be greater than 0.
229
+ # Corresponds to the JSON property `numFiniteBuckets`
230
+ # @return [Fixnum]
231
+ attr_accessor :num_finite_buckets
232
+
233
+ # Must be greater than 0.
234
+ # Corresponds to the JSON property `scale`
235
+ # @return [Float]
236
+ attr_accessor :scale
237
+
238
+ def initialize(**args)
239
+ update!(**args)
240
+ end
241
+
242
+ # Update properties of this object
243
+ def update!(**args)
244
+ @growth_factor = args[:growth_factor] if args.key?(:growth_factor)
245
+ @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
246
+ @scale = args[:scale] if args.key?(:scale)
247
+ end
248
+ end
249
+
250
+ # A common proto for logging HTTP requests. Only contains semantics defined by
251
+ # the HTTP specification. Product-specific logging information MUST be defined
252
+ # in a separate message.
253
+ class HttpRequest
254
+ include Google::Apis::Core::Hashable
255
+
256
+ # The number of HTTP response bytes inserted into cache. Set only when a cache
257
+ # fill was attempted.
258
+ # Corresponds to the JSON property `cacheFillBytes`
259
+ # @return [Fixnum]
260
+ attr_accessor :cache_fill_bytes
261
+
262
+ # Whether or not an entity was served from cache (with or without validation).
263
+ # Corresponds to the JSON property `cacheHit`
264
+ # @return [Boolean]
265
+ attr_accessor :cache_hit
266
+ alias_method :cache_hit?, :cache_hit
267
+
268
+ # Whether or not a cache lookup was attempted.
269
+ # Corresponds to the JSON property `cacheLookup`
270
+ # @return [Boolean]
271
+ attr_accessor :cache_lookup
272
+ alias_method :cache_lookup?, :cache_lookup
273
+
274
+ # Whether or not the response was validated with the origin server before being
275
+ # served from cache. This field is only meaningful if cache_hit is True.
276
+ # Corresponds to the JSON property `cacheValidatedWithOriginServer`
277
+ # @return [Boolean]
278
+ attr_accessor :cache_validated_with_origin_server
279
+ alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server
280
+
281
+ # The request processing latency on the server, from the time the request was
282
+ # received until the response was sent.
283
+ # Corresponds to the JSON property `latency`
284
+ # @return [String]
285
+ attr_accessor :latency
286
+
287
+ # Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
288
+ # Corresponds to the JSON property `protocol`
289
+ # @return [String]
290
+ attr_accessor :protocol
291
+
292
+ # The referer URL of the request, as defined in HTTP/1.1 Header Field
293
+ # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
294
+ # Corresponds to the JSON property `referer`
295
+ # @return [String]
296
+ attr_accessor :referer
297
+
298
+ # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. This
299
+ # field can include port information. Examples: "192.168.1.1", "10.0.0.1:80", "
300
+ # FE80::0202:B3FF:FE1E:8329".
301
+ # Corresponds to the JSON property `remoteIp`
302
+ # @return [String]
303
+ attr_accessor :remote_ip
304
+
305
+ # The request method. Examples: "GET", "HEAD", "PUT", "POST".
306
+ # Corresponds to the JSON property `requestMethod`
307
+ # @return [String]
308
+ attr_accessor :request_method
309
+
310
+ # The size of the HTTP request message in bytes, including the request headers
311
+ # and the request body.
312
+ # Corresponds to the JSON property `requestSize`
313
+ # @return [Fixnum]
314
+ attr_accessor :request_size
315
+
316
+ # The scheme (http, https), the host name, the path and the query portion of the
317
+ # URL that was requested. Example: "http://example.com/some/info?color=red".
318
+ # Corresponds to the JSON property `requestUrl`
319
+ # @return [String]
320
+ attr_accessor :request_url
321
+
322
+ # The size of the HTTP response message sent back to the client, in bytes,
323
+ # including the response headers and the response body.
324
+ # Corresponds to the JSON property `responseSize`
325
+ # @return [Fixnum]
326
+ attr_accessor :response_size
327
+
328
+ # The IP address (IPv4 or IPv6) of the origin server that the request was sent
329
+ # to. This field can include port information. Examples: "192.168.1.1", "10.0.0.
330
+ # 1:80", "FE80::0202:B3FF:FE1E:8329".
331
+ # Corresponds to the JSON property `serverIp`
332
+ # @return [String]
333
+ attr_accessor :server_ip
334
+
335
+ # The response code indicating the status of response. Examples: 200, 404.
336
+ # Corresponds to the JSON property `status`
337
+ # @return [Fixnum]
338
+ attr_accessor :status
339
+
340
+ # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0;
341
+ # Windows 98; Q312461; .NET CLR 1.0.3705)".
342
+ # Corresponds to the JSON property `userAgent`
343
+ # @return [String]
344
+ attr_accessor :user_agent
345
+
346
+ def initialize(**args)
347
+ update!(**args)
348
+ end
349
+
350
+ # Update properties of this object
351
+ def update!(**args)
352
+ @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes)
353
+ @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
354
+ @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup)
355
+ @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server)
356
+ @latency = args[:latency] if args.key?(:latency)
357
+ @protocol = args[:protocol] if args.key?(:protocol)
358
+ @referer = args[:referer] if args.key?(:referer)
359
+ @remote_ip = args[:remote_ip] if args.key?(:remote_ip)
360
+ @request_method = args[:request_method] if args.key?(:request_method)
361
+ @request_size = args[:request_size] if args.key?(:request_size)
362
+ @request_url = args[:request_url] if args.key?(:request_url)
363
+ @response_size = args[:response_size] if args.key?(:response_size)
364
+ @server_ip = args[:server_ip] if args.key?(:server_ip)
365
+ @status = args[:status] if args.key?(:status)
366
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
367
+ end
368
+ end
369
+
370
+ # A description of a label.
371
+ class LabelDescriptor
372
+ include Google::Apis::Core::Hashable
373
+
374
+ # A human-readable description for the label.
375
+ # Corresponds to the JSON property `description`
376
+ # @return [String]
377
+ attr_accessor :description
378
+
379
+ # The label key.
380
+ # Corresponds to the JSON property `key`
381
+ # @return [String]
382
+ attr_accessor :key
383
+
384
+ # The type of data that can be assigned to the label.
385
+ # Corresponds to the JSON property `valueType`
386
+ # @return [String]
387
+ attr_accessor :value_type
388
+
389
+ def initialize(**args)
390
+ update!(**args)
391
+ end
392
+
393
+ # Update properties of this object
394
+ def update!(**args)
395
+ @description = args[:description] if args.key?(:description)
396
+ @key = args[:key] if args.key?(:key)
397
+ @value_type = args[:value_type] if args.key?(:value_type)
398
+ end
399
+ end
400
+
401
+ # Specifies a linear sequence of buckets that all have the same width (except
402
+ # overflow and underflow). Each bucket represents a constant absolute
403
+ # uncertainty on the specific value in the bucket.There are num_finite_buckets +
404
+ # 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-
405
+ # 1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)).
406
+ class Linear
407
+ include Google::Apis::Core::Hashable
408
+
409
+ # Must be greater than 0.
410
+ # Corresponds to the JSON property `numFiniteBuckets`
411
+ # @return [Fixnum]
412
+ attr_accessor :num_finite_buckets
413
+
414
+ # Lower bound of the first bucket.
415
+ # Corresponds to the JSON property `offset`
416
+ # @return [Float]
417
+ attr_accessor :offset
418
+
419
+ # Must be greater than 0.
420
+ # Corresponds to the JSON property `width`
421
+ # @return [Float]
422
+ attr_accessor :width
423
+
424
+ def initialize(**args)
425
+ update!(**args)
426
+ end
427
+
428
+ # Update properties of this object
429
+ def update!(**args)
430
+ @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
431
+ @offset = args[:offset] if args.key?(:offset)
432
+ @width = args[:width] if args.key?(:width)
433
+ end
434
+ end
435
+
436
+ # The response from ListBuckets.
437
+ class ListBucketsResponse
438
+ include Google::Apis::Core::Hashable
439
+
440
+ # A list of buckets.
441
+ # Corresponds to the JSON property `buckets`
442
+ # @return [Array<Google::Apis::LoggingV2::LogBucket>]
443
+ attr_accessor :buckets
444
+
445
+ # If there might be more results than appear in this response, then
446
+ # nextPageToken is included. To get the next set of results, call the same
447
+ # method again using the value of nextPageToken as pageToken.
448
+ # Corresponds to the JSON property `nextPageToken`
449
+ # @return [String]
450
+ attr_accessor :next_page_token
451
+
452
+ def initialize(**args)
453
+ update!(**args)
454
+ end
455
+
456
+ # Update properties of this object
457
+ def update!(**args)
458
+ @buckets = args[:buckets] if args.key?(:buckets)
459
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
460
+ end
461
+ end
462
+
463
+ # Result returned from ListExclusions.
464
+ class ListExclusionsResponse
465
+ include Google::Apis::Core::Hashable
466
+
467
+ # A list of exclusions.
468
+ # Corresponds to the JSON property `exclusions`
469
+ # @return [Array<Google::Apis::LoggingV2::LogExclusion>]
470
+ attr_accessor :exclusions
471
+
472
+ # If there might be more results than appear in this response, then
473
+ # nextPageToken is included. To get the next set of results, call the same
474
+ # method again using the value of nextPageToken as pageToken.
475
+ # Corresponds to the JSON property `nextPageToken`
476
+ # @return [String]
477
+ attr_accessor :next_page_token
478
+
479
+ def initialize(**args)
480
+ update!(**args)
481
+ end
482
+
483
+ # Update properties of this object
484
+ def update!(**args)
485
+ @exclusions = args[:exclusions] if args.key?(:exclusions)
486
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
487
+ end
488
+ end
489
+
490
+ # The response message for Locations.ListLocations.
491
+ class ListLocationsResponse
492
+ include Google::Apis::Core::Hashable
493
+
494
+ # A list of locations that matches the specified filter in the request.
495
+ # Corresponds to the JSON property `locations`
496
+ # @return [Array<Google::Apis::LoggingV2::Location>]
497
+ attr_accessor :locations
498
+
499
+ # The standard List next-page token.
500
+ # Corresponds to the JSON property `nextPageToken`
501
+ # @return [String]
502
+ attr_accessor :next_page_token
503
+
504
+ def initialize(**args)
505
+ update!(**args)
506
+ end
507
+
508
+ # Update properties of this object
509
+ def update!(**args)
510
+ @locations = args[:locations] if args.key?(:locations)
511
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
512
+ end
513
+ end
514
+
515
+ # The parameters to ListLogEntries.
516
+ class ListLogEntriesRequest
517
+ include Google::Apis::Core::Hashable
518
+
519
+ # Optional. A filter that chooses which log entries to return. See Advanced Logs
520
+ # Queries (https://cloud.google.com/logging/docs/view/advanced-queries). Only
521
+ # log entries that match the filter are returned. An empty filter matches all
522
+ # log entries in the resources listed in resource_names. Referencing a parent
523
+ # resource that is not listed in resource_names will cause the filter to return
524
+ # no results. The maximum length of the filter is 20000 characters.
525
+ # Corresponds to the JSON property `filter`
526
+ # @return [String]
527
+ attr_accessor :filter
528
+
529
+ # Optional. How the results should be sorted. Presently, the only permitted
530
+ # values are "timestamp asc" (default) and "timestamp desc". The first option
531
+ # returns entries in order of increasing values of LogEntry.timestamp (oldest
532
+ # first), and the second option returns entries in order of decreasing
533
+ # timestamps (newest first). Entries with equal timestamps are returned in order
534
+ # of their insert_id values.
535
+ # Corresponds to the JSON property `orderBy`
536
+ # @return [String]
537
+ attr_accessor :order_by
538
+
539
+ # Optional. The maximum number of results to return from this request. Default
540
+ # is 50. If the value is negative or exceeds 1000, the request is rejected. The
541
+ # presence of next_page_token in the response indicates that more results might
542
+ # be available.
543
+ # Corresponds to the JSON property `pageSize`
544
+ # @return [Fixnum]
545
+ attr_accessor :page_size
546
+
547
+ # Optional. If present, then retrieve the next batch of results from the
548
+ # preceding call to this method. page_token must be the value of next_page_token
549
+ # from the previous response. The values of other method parameters should be
550
+ # identical to those in the previous call.
551
+ # Corresponds to the JSON property `pageToken`
552
+ # @return [String]
553
+ attr_accessor :page_token
554
+
555
+ # Optional. Deprecated. Use resource_names instead. One or more project
556
+ # identifiers or project numbers from which to retrieve log entries. Example: "
557
+ # my-project-1A".
558
+ # Corresponds to the JSON property `projectIds`
559
+ # @return [Array<String>]
560
+ attr_accessor :project_ids
561
+
562
+ # Required. Names of one or more parent resources from which to retrieve log
563
+ # entries: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "
564
+ # billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" May alternatively
565
+ # be one or more views projects/PROJECT_ID/locations/LOCATION_ID/buckets/
566
+ # BUCKET_ID/views/VIEW_ID organization/ORGANIZATION_ID/locations/LOCATION_ID/
567
+ # buckets/BUCKET_ID/views/VIEW_ID billingAccounts/BILLING_ACCOUNT_ID/locations/
568
+ # LOCATION_ID/buckets/BUCKET_ID/views/VIEW_ID folders/FOLDER_ID/locations/
569
+ # LOCATION_ID/buckets/BUCKET_ID/views/VIEW_IDProjects listed in the project_ids
570
+ # field are added to this list.
571
+ # Corresponds to the JSON property `resourceNames`
572
+ # @return [Array<String>]
573
+ attr_accessor :resource_names
574
+
575
+ def initialize(**args)
576
+ update!(**args)
577
+ end
578
+
579
+ # Update properties of this object
580
+ def update!(**args)
581
+ @filter = args[:filter] if args.key?(:filter)
582
+ @order_by = args[:order_by] if args.key?(:order_by)
583
+ @page_size = args[:page_size] if args.key?(:page_size)
584
+ @page_token = args[:page_token] if args.key?(:page_token)
585
+ @project_ids = args[:project_ids] if args.key?(:project_ids)
586
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
587
+ end
588
+ end
589
+
590
+ # Result returned from ListLogEntries.
591
+ class ListLogEntriesResponse
592
+ include Google::Apis::Core::Hashable
593
+
594
+ # A list of log entries. If entries is empty, nextPageToken may still be
595
+ # returned, indicating that more entries may exist. See nextPageToken for more
596
+ # information.
597
+ # Corresponds to the JSON property `entries`
598
+ # @return [Array<Google::Apis::LoggingV2::LogEntry>]
599
+ attr_accessor :entries
600
+
601
+ # If there might be more results than those appearing in this response, then
602
+ # nextPageToken is included. To get the next set of results, call this method
603
+ # again using the value of nextPageToken as pageToken.If a value for
604
+ # next_page_token appears and the entries field is empty, it means that the
605
+ # search found no log entries so far but it did not have time to search all the
606
+ # possible log entries. Retry the method with this value for page_token to
607
+ # continue the search. Alternatively, consider speeding up the search by
608
+ # changing your filter to specify a single log name or resource type, or to
609
+ # narrow the time range of the search.
610
+ # Corresponds to the JSON property `nextPageToken`
611
+ # @return [String]
612
+ attr_accessor :next_page_token
613
+
614
+ def initialize(**args)
615
+ update!(**args)
616
+ end
617
+
618
+ # Update properties of this object
619
+ def update!(**args)
620
+ @entries = args[:entries] if args.key?(:entries)
621
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
622
+ end
623
+ end
624
+
625
+ # Result returned from ListLogMetrics.
626
+ class ListLogMetricsResponse
627
+ include Google::Apis::Core::Hashable
628
+
629
+ # A list of logs-based metrics.
630
+ # Corresponds to the JSON property `metrics`
631
+ # @return [Array<Google::Apis::LoggingV2::LogMetric>]
632
+ attr_accessor :metrics
633
+
634
+ # If there might be more results than appear in this response, then
635
+ # nextPageToken is included. To get the next set of results, call this method
636
+ # again using the value of nextPageToken as pageToken.
637
+ # Corresponds to the JSON property `nextPageToken`
638
+ # @return [String]
639
+ attr_accessor :next_page_token
640
+
641
+ def initialize(**args)
642
+ update!(**args)
643
+ end
644
+
645
+ # Update properties of this object
646
+ def update!(**args)
647
+ @metrics = args[:metrics] if args.key?(:metrics)
648
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
649
+ end
650
+ end
651
+
652
+ # Result returned from ListLogs.
653
+ class ListLogsResponse
654
+ include Google::Apis::Core::Hashable
655
+
656
+ # A list of log names. For example, "projects/my-project/logs/syslog" or "
657
+ # organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity".
658
+ # Corresponds to the JSON property `logNames`
659
+ # @return [Array<String>]
660
+ attr_accessor :log_names
661
+
662
+ # If there might be more results than those appearing in this response, then
663
+ # nextPageToken is included. To get the next set of results, call this method
664
+ # again using the value of nextPageToken as pageToken.
665
+ # Corresponds to the JSON property `nextPageToken`
666
+ # @return [String]
667
+ attr_accessor :next_page_token
668
+
669
+ def initialize(**args)
670
+ update!(**args)
671
+ end
672
+
673
+ # Update properties of this object
674
+ def update!(**args)
675
+ @log_names = args[:log_names] if args.key?(:log_names)
676
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
677
+ end
678
+ end
679
+
680
+ # Result returned from ListMonitoredResourceDescriptors.
681
+ class ListMonitoredResourceDescriptorsResponse
682
+ include Google::Apis::Core::Hashable
683
+
684
+ # If there might be more results than those appearing in this response, then
685
+ # nextPageToken is included. To get the next set of results, call this method
686
+ # again using the value of nextPageToken as pageToken.
687
+ # Corresponds to the JSON property `nextPageToken`
688
+ # @return [String]
689
+ attr_accessor :next_page_token
690
+
691
+ # A list of resource descriptors.
692
+ # Corresponds to the JSON property `resourceDescriptors`
693
+ # @return [Array<Google::Apis::LoggingV2::MonitoredResourceDescriptor>]
694
+ attr_accessor :resource_descriptors
695
+
696
+ def initialize(**args)
697
+ update!(**args)
698
+ end
699
+
700
+ # Update properties of this object
701
+ def update!(**args)
702
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
703
+ @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)
704
+ end
705
+ end
706
+
707
+ # Result returned from ListSinks.
708
+ class ListSinksResponse
709
+ include Google::Apis::Core::Hashable
710
+
711
+ # If there might be more results than appear in this response, then
712
+ # nextPageToken is included. To get the next set of results, call the same
713
+ # method again using the value of nextPageToken as pageToken.
714
+ # Corresponds to the JSON property `nextPageToken`
715
+ # @return [String]
716
+ attr_accessor :next_page_token
717
+
718
+ # A list of sinks.
719
+ # Corresponds to the JSON property `sinks`
720
+ # @return [Array<Google::Apis::LoggingV2::LogSink>]
721
+ attr_accessor :sinks
722
+
723
+ def initialize(**args)
724
+ update!(**args)
725
+ end
726
+
727
+ # Update properties of this object
728
+ def update!(**args)
729
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
730
+ @sinks = args[:sinks] if args.key?(:sinks)
731
+ end
732
+ end
733
+
734
+ # The response from ListViews.
735
+ class ListViewsResponse
736
+ include Google::Apis::Core::Hashable
737
+
738
+ # If there might be more results than appear in this response, then
739
+ # nextPageToken is included. To get the next set of results, call the same
740
+ # method again using the value of nextPageToken as pageToken.
741
+ # Corresponds to the JSON property `nextPageToken`
742
+ # @return [String]
743
+ attr_accessor :next_page_token
744
+
745
+ # A list of views.
746
+ # Corresponds to the JSON property `views`
747
+ # @return [Array<Google::Apis::LoggingV2::LogView>]
748
+ attr_accessor :views
749
+
750
+ def initialize(**args)
751
+ update!(**args)
752
+ end
753
+
754
+ # Update properties of this object
755
+ def update!(**args)
756
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
757
+ @views = args[:views] if args.key?(:views)
758
+ end
759
+ end
760
+
761
+ # A resource that represents Google Cloud Platform location.
762
+ class Location
763
+ include Google::Apis::Core::Hashable
764
+
765
+ # The friendly name for this location, typically a nearby city name. For example,
766
+ # "Tokyo".
767
+ # Corresponds to the JSON property `displayName`
768
+ # @return [String]
769
+ attr_accessor :display_name
770
+
771
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
772
+ # region": "us-east1"`
773
+ # Corresponds to the JSON property `labels`
774
+ # @return [Hash<String,String>]
775
+ attr_accessor :labels
776
+
777
+ # The canonical id for this location. For example: "us-east1".
778
+ # Corresponds to the JSON property `locationId`
779
+ # @return [String]
780
+ attr_accessor :location_id
781
+
782
+ # Service-specific metadata. For example the available capacity at the given
783
+ # location.
784
+ # Corresponds to the JSON property `metadata`
785
+ # @return [Hash<String,Object>]
786
+ attr_accessor :metadata
787
+
788
+ # Resource name for the location, which may vary between implementations. For
789
+ # example: "projects/example-project/locations/us-east1"
790
+ # Corresponds to the JSON property `name`
791
+ # @return [String]
792
+ attr_accessor :name
793
+
794
+ def initialize(**args)
795
+ update!(**args)
796
+ end
797
+
798
+ # Update properties of this object
799
+ def update!(**args)
800
+ @display_name = args[:display_name] if args.key?(:display_name)
801
+ @labels = args[:labels] if args.key?(:labels)
802
+ @location_id = args[:location_id] if args.key?(:location_id)
803
+ @metadata = args[:metadata] if args.key?(:metadata)
804
+ @name = args[:name] if args.key?(:name)
805
+ end
806
+ end
807
+
808
+ # Describes a repository of logs.
809
+ class LogBucket
810
+ include Google::Apis::Core::Hashable
811
+
812
+ # Output only. The creation timestamp of the bucket. This is not set for any of
813
+ # the default buckets.
814
+ # Corresponds to the JSON property `createTime`
815
+ # @return [String]
816
+ attr_accessor :create_time
817
+
818
+ # Describes this bucket.
819
+ # Corresponds to the JSON property `description`
820
+ # @return [String]
821
+ attr_accessor :description
822
+
823
+ # Output only. The bucket lifecycle state.
824
+ # Corresponds to the JSON property `lifecycleState`
825
+ # @return [String]
826
+ attr_accessor :lifecycle_state
827
+
828
+ # Whether the bucket has been locked. The retention period on a locked bucket
829
+ # may not be changed. Locked buckets may only be deleted if they are empty.
830
+ # Corresponds to the JSON property `locked`
831
+ # @return [Boolean]
832
+ attr_accessor :locked
833
+ alias_method :locked?, :locked
834
+
835
+ # Output only. The resource name of the bucket. For example: "projects/my-
836
+ # project-id/locations/my-location/buckets/my-bucket-id The supported locations
837
+ # are: "global"For the location of global it is unspecified where logs are
838
+ # actually stored. Once a bucket has been created, the location can not be
839
+ # changed.
840
+ # Corresponds to the JSON property `name`
841
+ # @return [String]
842
+ attr_accessor :name
843
+
844
+ # Logs will be retained by default for this amount of time, after which they
845
+ # will automatically be deleted. The minimum retention period is 1 day. If this
846
+ # value is set to zero at bucket creation time, the default time of 30 days will
847
+ # be used.
848
+ # Corresponds to the JSON property `retentionDays`
849
+ # @return [Fixnum]
850
+ attr_accessor :retention_days
851
+
852
+ # Output only. The last update timestamp of the bucket.
853
+ # Corresponds to the JSON property `updateTime`
854
+ # @return [String]
855
+ attr_accessor :update_time
856
+
857
+ def initialize(**args)
858
+ update!(**args)
859
+ end
860
+
861
+ # Update properties of this object
862
+ def update!(**args)
863
+ @create_time = args[:create_time] if args.key?(:create_time)
864
+ @description = args[:description] if args.key?(:description)
865
+ @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state)
866
+ @locked = args[:locked] if args.key?(:locked)
867
+ @name = args[:name] if args.key?(:name)
868
+ @retention_days = args[:retention_days] if args.key?(:retention_days)
869
+ @update_time = args[:update_time] if args.key?(:update_time)
870
+ end
871
+ end
872
+
873
+ # An individual entry in a log.
874
+ class LogEntry
875
+ include Google::Apis::Core::Hashable
876
+
877
+ # A common proto for logging HTTP requests. Only contains semantics defined by
878
+ # the HTTP specification. Product-specific logging information MUST be defined
879
+ # in a separate message.
880
+ # Corresponds to the JSON property `httpRequest`
881
+ # @return [Google::Apis::LoggingV2::HttpRequest]
882
+ attr_accessor :http_request
883
+
884
+ # Optional. A unique identifier for the log entry. If you provide a value, then
885
+ # Logging considers other log entries in the same project, with the same
886
+ # timestamp, and with the same insert_id to be duplicates which are removed in a
887
+ # single query result. However, there are no guarantees of de-duplication in the
888
+ # export of logs.If the insert_id is omitted when writing a log entry, the
889
+ # Logging API assigns its own unique identifier in this field.In queries, the
890
+ # insert_id is also used to order log entries that have the same log_name and
891
+ # timestamp values.
892
+ # Corresponds to the JSON property `insertId`
893
+ # @return [String]
894
+ attr_accessor :insert_id
895
+
896
+ # The log entry payload, represented as a structure that is expressed as a JSON
897
+ # object.
898
+ # Corresponds to the JSON property `jsonPayload`
899
+ # @return [Hash<String,Object>]
900
+ attr_accessor :json_payload
901
+
902
+ # Optional. A set of user-defined (key, value) data that provides additional
903
+ # information about the log entry.
904
+ # Corresponds to the JSON property `labels`
905
+ # @return [Hash<String,String>]
906
+ attr_accessor :labels
907
+
908
+ # Required. The resource name of the log to which this log entry belongs: "
909
+ # projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[
910
+ # LOG_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[
911
+ # FOLDER_ID]/logs/[LOG_ID]" A project number may be used in place of PROJECT_ID.
912
+ # The project number is translated to its corresponding PROJECT_ID internally
913
+ # and the log_name field will contain PROJECT_ID in queries and exports.[LOG_ID]
914
+ # must be URL-encoded within log_name. Example: "organizations/1234567890/logs/
915
+ # cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must be less than
916
+ # 512 characters long and can only include the following characters: upper and
917
+ # lower case alphanumeric characters, forward-slash, underscore, hyphen, and
918
+ # period.For backward compatibility, if log_name begins with a forward-slash,
919
+ # such as /projects/..., then the log entry is ingested as usual but the forward-
920
+ # slash is removed. Listing the log entry will not show the leading slash and
921
+ # filtering for a log name with a leading slash will never return any results.
922
+ # Corresponds to the JSON property `logName`
923
+ # @return [String]
924
+ attr_accessor :log_name
925
+
926
+ # Auxiliary metadata for a MonitoredResource object. MonitoredResource objects
927
+ # contain the minimum set of information to uniquely identify a monitored
928
+ # resource instance. There is some other useful auxiliary metadata. Monitoring
929
+ # and Logging use an ingestion pipeline to extract metadata for cloud resources
930
+ # of all types, and store the metadata in this message.
931
+ # Corresponds to the JSON property `metadata`
932
+ # @return [Google::Apis::LoggingV2::MonitoredResourceMetadata]
933
+ attr_accessor :metadata
934
+
935
+ # Additional information about a potentially long-running operation with which a
936
+ # log entry is associated.
937
+ # Corresponds to the JSON property `operation`
938
+ # @return [Google::Apis::LoggingV2::LogEntryOperation]
939
+ attr_accessor :operation
940
+
941
+ # The log entry payload, represented as a protocol buffer. Some Google Cloud
942
+ # Platform services use this field for their log entry payloads.The following
943
+ # protocol buffer types are supported; user-defined types are not supported:"
944
+ # type.googleapis.com/google.cloud.audit.AuditLog" "type.googleapis.com/google.
945
+ # appengine.logging.v1.RequestLog"
946
+ # Corresponds to the JSON property `protoPayload`
947
+ # @return [Hash<String,Object>]
948
+ attr_accessor :proto_payload
949
+
950
+ # Output only. The time the log entry was received by Logging.
951
+ # Corresponds to the JSON property `receiveTimestamp`
952
+ # @return [String]
953
+ attr_accessor :receive_timestamp
954
+
955
+ # An object representing a resource that can be used for monitoring, logging,
956
+ # billing, or other purposes. Examples include virtual machine instances,
957
+ # databases, and storage devices such as disks. The type field identifies a
958
+ # MonitoredResourceDescriptor object that describes the resource's schema.
959
+ # Information in the labels field identifies the actual resource and its
960
+ # attributes according to the schema. For example, a particular Compute Engine
961
+ # VM instance could be represented by the following object, because the
962
+ # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
963
+ # zone": ` "type": "gce_instance", "labels": ` "instance_id": "12345678901234", "
964
+ # zone": "us-central1-a" ``
965
+ # Corresponds to the JSON property `resource`
966
+ # @return [Google::Apis::LoggingV2::MonitoredResource]
967
+ attr_accessor :resource
968
+
969
+ # Optional. The severity of the log entry. The default value is LogSeverity.
970
+ # DEFAULT.
971
+ # Corresponds to the JSON property `severity`
972
+ # @return [String]
973
+ attr_accessor :severity
974
+
975
+ # Additional information about the source code location that produced the log
976
+ # entry.
977
+ # Corresponds to the JSON property `sourceLocation`
978
+ # @return [Google::Apis::LoggingV2::LogEntrySourceLocation]
979
+ attr_accessor :source_location
980
+
981
+ # Optional. The span ID within the trace associated with the log entry.For Trace
982
+ # spans, this is the same format that the Trace API v2 uses: a 16-character
983
+ # hexadecimal encoding of an 8-byte array, such as 000000000000004a.
984
+ # Corresponds to the JSON property `spanId`
985
+ # @return [String]
986
+ attr_accessor :span_id
987
+
988
+ # The log entry payload, represented as a Unicode string (UTF-8).
989
+ # Corresponds to the JSON property `textPayload`
990
+ # @return [String]
991
+ attr_accessor :text_payload
992
+
993
+ # Optional. The time the event described by the log entry occurred. This time is
994
+ # used to compute the log entry's age and to enforce the logs retention period.
995
+ # If this field is omitted in a new log entry, then Logging assigns it the
996
+ # current time. Timestamps have nanosecond accuracy, but trailing zeros in the
997
+ # fractional seconds might be omitted when the timestamp is displayed.Incoming
998
+ # log entries must have timestamps that don't exceed the logs retention period (
999
+ # https://cloud.google.com/logging/quotas#logs_retention_periods) in the past,
1000
+ # and that don't exceed 24 hours in the future. Log entries outside those time
1001
+ # boundaries aren't ingested by Logging.
1002
+ # Corresponds to the JSON property `timestamp`
1003
+ # @return [String]
1004
+ attr_accessor :timestamp
1005
+
1006
+ # Optional. Resource name of the trace associated with the log entry, if any. If
1007
+ # it contains a relative resource name, the name is assumed to be relative to //
1008
+ # tracing.googleapis.com. Example: projects/my-projectid/traces/
1009
+ # 06796866738c859f2f19b7cfb3214824
1010
+ # Corresponds to the JSON property `trace`
1011
+ # @return [String]
1012
+ attr_accessor :trace
1013
+
1014
+ # Optional. The sampling decision of the trace associated with the log entry.
1015
+ # True means that the trace resource name in the trace field was sampled for
1016
+ # storage in a trace backend. False means that the trace was not sampled for
1017
+ # storage when this log entry was written, or the sampling decision was unknown
1018
+ # at the time. A non-sampled trace value is still useful as a request
1019
+ # correlation identifier. The default is False.
1020
+ # Corresponds to the JSON property `traceSampled`
1021
+ # @return [Boolean]
1022
+ attr_accessor :trace_sampled
1023
+ alias_method :trace_sampled?, :trace_sampled
1024
+
1025
+ def initialize(**args)
1026
+ update!(**args)
1027
+ end
1028
+
1029
+ # Update properties of this object
1030
+ def update!(**args)
1031
+ @http_request = args[:http_request] if args.key?(:http_request)
1032
+ @insert_id = args[:insert_id] if args.key?(:insert_id)
1033
+ @json_payload = args[:json_payload] if args.key?(:json_payload)
1034
+ @labels = args[:labels] if args.key?(:labels)
1035
+ @log_name = args[:log_name] if args.key?(:log_name)
1036
+ @metadata = args[:metadata] if args.key?(:metadata)
1037
+ @operation = args[:operation] if args.key?(:operation)
1038
+ @proto_payload = args[:proto_payload] if args.key?(:proto_payload)
1039
+ @receive_timestamp = args[:receive_timestamp] if args.key?(:receive_timestamp)
1040
+ @resource = args[:resource] if args.key?(:resource)
1041
+ @severity = args[:severity] if args.key?(:severity)
1042
+ @source_location = args[:source_location] if args.key?(:source_location)
1043
+ @span_id = args[:span_id] if args.key?(:span_id)
1044
+ @text_payload = args[:text_payload] if args.key?(:text_payload)
1045
+ @timestamp = args[:timestamp] if args.key?(:timestamp)
1046
+ @trace = args[:trace] if args.key?(:trace)
1047
+ @trace_sampled = args[:trace_sampled] if args.key?(:trace_sampled)
1048
+ end
1049
+ end
1050
+
1051
+ # Additional information about a potentially long-running operation with which a
1052
+ # log entry is associated.
1053
+ class LogEntryOperation
1054
+ include Google::Apis::Core::Hashable
1055
+
1056
+ # Optional. Set this to True if this is the first log entry in the operation.
1057
+ # Corresponds to the JSON property `first`
1058
+ # @return [Boolean]
1059
+ attr_accessor :first
1060
+ alias_method :first?, :first
1061
+
1062
+ # Optional. An arbitrary operation identifier. Log entries with the same
1063
+ # identifier are assumed to be part of the same operation.
1064
+ # Corresponds to the JSON property `id`
1065
+ # @return [String]
1066
+ attr_accessor :id
1067
+
1068
+ # Optional. Set this to True if this is the last log entry in the operation.
1069
+ # Corresponds to the JSON property `last`
1070
+ # @return [Boolean]
1071
+ attr_accessor :last
1072
+ alias_method :last?, :last
1073
+
1074
+ # Optional. An arbitrary producer identifier. The combination of id and producer
1075
+ # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com",
1076
+ # "github.com/MyProject/MyApplication".
1077
+ # Corresponds to the JSON property `producer`
1078
+ # @return [String]
1079
+ attr_accessor :producer
1080
+
1081
+ def initialize(**args)
1082
+ update!(**args)
1083
+ end
1084
+
1085
+ # Update properties of this object
1086
+ def update!(**args)
1087
+ @first = args[:first] if args.key?(:first)
1088
+ @id = args[:id] if args.key?(:id)
1089
+ @last = args[:last] if args.key?(:last)
1090
+ @producer = args[:producer] if args.key?(:producer)
1091
+ end
1092
+ end
1093
+
1094
+ # Additional information about the source code location that produced the log
1095
+ # entry.
1096
+ class LogEntrySourceLocation
1097
+ include Google::Apis::Core::Hashable
1098
+
1099
+ # Optional. Source file name. Depending on the runtime environment, this might
1100
+ # be a simple name or a fully-qualified name.
1101
+ # Corresponds to the JSON property `file`
1102
+ # @return [String]
1103
+ attr_accessor :file
1104
+
1105
+ # Optional. Human-readable name of the function or method being invoked, with
1106
+ # optional context such as the class or package name. This information may be
1107
+ # used in contexts such as the logs viewer, where a file and line number are
1108
+ # less meaningful. The format can vary by language. For example: qual.if.ied.
1109
+ # Class.method (Java), dir/package.func (Go), function (Python).
1110
+ # Corresponds to the JSON property `function`
1111
+ # @return [String]
1112
+ attr_accessor :function
1113
+
1114
+ # Optional. Line within the source file. 1-based; 0 indicates no line number
1115
+ # available.
1116
+ # Corresponds to the JSON property `line`
1117
+ # @return [Fixnum]
1118
+ attr_accessor :line
1119
+
1120
+ def initialize(**args)
1121
+ update!(**args)
1122
+ end
1123
+
1124
+ # Update properties of this object
1125
+ def update!(**args)
1126
+ @file = args[:file] if args.key?(:file)
1127
+ @function = args[:function] if args.key?(:function)
1128
+ @line = args[:line] if args.key?(:line)
1129
+ end
1130
+ end
1131
+
1132
+ # Specifies a set of log entries that are not to be stored in Logging. If your
1133
+ # GCP resource receives a large volume of logs, you can use exclusions to reduce
1134
+ # your chargeable logs. Exclusions are processed after log sinks, so you can
1135
+ # export log entries before they are excluded. Note that organization-level and
1136
+ # folder-level exclusions don't apply to child resources, and that you can't
1137
+ # exclude audit log entries.
1138
+ class LogExclusion
1139
+ include Google::Apis::Core::Hashable
1140
+
1141
+ # Output only. The creation timestamp of the exclusion.This field may not be
1142
+ # present for older exclusions.
1143
+ # Corresponds to the JSON property `createTime`
1144
+ # @return [String]
1145
+ attr_accessor :create_time
1146
+
1147
+ # Optional. A description of this exclusion.
1148
+ # Corresponds to the JSON property `description`
1149
+ # @return [String]
1150
+ attr_accessor :description
1151
+
1152
+ # Optional. If set to True, then this exclusion is disabled and it does not
1153
+ # exclude any log entries. You can update an exclusion to change the value of
1154
+ # this field.
1155
+ # Corresponds to the JSON property `disabled`
1156
+ # @return [Boolean]
1157
+ attr_accessor :disabled
1158
+ alias_method :disabled?, :disabled
1159
+
1160
+ # Required. An advanced logs filter (https://cloud.google.com/logging/docs/view/
1161
+ # advanced-queries) that matches the log entries to be excluded. By using the
1162
+ # sample function (https://cloud.google.com/logging/docs/view/advanced-queries#
1163
+ # sample), you can exclude less than 100% of the matching log entries. For
1164
+ # example, the following query matches 99% of low-severity log entries from
1165
+ # Google Cloud Storage buckets:"resource.type=gcs_bucket severity<ERROR sample(
1166
+ # insertId, 0.99)"
1167
+ # Corresponds to the JSON property `filter`
1168
+ # @return [String]
1169
+ attr_accessor :filter
1170
+
1171
+ # Required. A client-assigned identifier, such as "load-balancer-exclusion".
1172
+ # Identifiers are limited to 100 characters and can include only letters, digits,
1173
+ # underscores, hyphens, and periods. First character has to be alphanumeric.
1174
+ # Corresponds to the JSON property `name`
1175
+ # @return [String]
1176
+ attr_accessor :name
1177
+
1178
+ # Output only. The last update timestamp of the exclusion.This field may not be
1179
+ # present for older exclusions.
1180
+ # Corresponds to the JSON property `updateTime`
1181
+ # @return [String]
1182
+ attr_accessor :update_time
1183
+
1184
+ def initialize(**args)
1185
+ update!(**args)
1186
+ end
1187
+
1188
+ # Update properties of this object
1189
+ def update!(**args)
1190
+ @create_time = args[:create_time] if args.key?(:create_time)
1191
+ @description = args[:description] if args.key?(:description)
1192
+ @disabled = args[:disabled] if args.key?(:disabled)
1193
+ @filter = args[:filter] if args.key?(:filter)
1194
+ @name = args[:name] if args.key?(:name)
1195
+ @update_time = args[:update_time] if args.key?(:update_time)
1196
+ end
1197
+ end
1198
+
1199
+ # Application log line emitted while processing a request.
1200
+ class LogLine
1201
+ include Google::Apis::Core::Hashable
1202
+
1203
+ # App-provided log message.
1204
+ # Corresponds to the JSON property `logMessage`
1205
+ # @return [String]
1206
+ attr_accessor :log_message
1207
+
1208
+ # Severity of this log entry.
1209
+ # Corresponds to the JSON property `severity`
1210
+ # @return [String]
1211
+ attr_accessor :severity
1212
+
1213
+ # Specifies a location in a source code file.
1214
+ # Corresponds to the JSON property `sourceLocation`
1215
+ # @return [Google::Apis::LoggingV2::SourceLocation]
1216
+ attr_accessor :source_location
1217
+
1218
+ # Approximate time when this log entry was made.
1219
+ # Corresponds to the JSON property `time`
1220
+ # @return [String]
1221
+ attr_accessor :time
1222
+
1223
+ def initialize(**args)
1224
+ update!(**args)
1225
+ end
1226
+
1227
+ # Update properties of this object
1228
+ def update!(**args)
1229
+ @log_message = args[:log_message] if args.key?(:log_message)
1230
+ @severity = args[:severity] if args.key?(:severity)
1231
+ @source_location = args[:source_location] if args.key?(:source_location)
1232
+ @time = args[:time] if args.key?(:time)
1233
+ end
1234
+ end
1235
+
1236
+ # Describes a logs-based metric. The value of the metric is the number of log
1237
+ # entries that match a logs filter in a given time interval.Logs-based metrics
1238
+ # can also be used to extract values from logs and create a distribution of the
1239
+ # values. The distribution records the statistics of the extracted values along
1240
+ # with an optional histogram of the values as specified by the bucket options.
1241
+ class LogMetric
1242
+ include Google::Apis::Core::Hashable
1243
+
1244
+ # BucketOptions describes the bucket boundaries used to create a histogram for
1245
+ # the distribution. The buckets can be in a linear sequence, an exponential
1246
+ # sequence, or each bucket can be specified explicitly. BucketOptions does not
1247
+ # include the number of values in each bucket.A bucket has an inclusive lower
1248
+ # bound and exclusive upper bound for the values that are counted for that
1249
+ # bucket. The upper bound of a bucket must be strictly greater than the lower
1250
+ # bound. The sequence of N buckets for a distribution consists of an underflow
1251
+ # bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an
1252
+ # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of
1253
+ # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets
1254
+ # span the whole range of finite values: lower bound of the underflow bucket is -
1255
+ # infinity and the upper bound of the overflow bucket is +infinity. The finite
1256
+ # buckets are so-called because both bounds are finite.
1257
+ # Corresponds to the JSON property `bucketOptions`
1258
+ # @return [Google::Apis::LoggingV2::BucketOptions]
1259
+ attr_accessor :bucket_options
1260
+
1261
+ # Output only. The creation timestamp of the metric.This field may not be
1262
+ # present for older metrics.
1263
+ # Corresponds to the JSON property `createTime`
1264
+ # @return [String]
1265
+ attr_accessor :create_time
1266
+
1267
+ # Optional. A description of this metric, which is used in documentation. The
1268
+ # maximum length of the description is 8000 characters.
1269
+ # Corresponds to the JSON property `description`
1270
+ # @return [String]
1271
+ attr_accessor :description
1272
+
1273
+ # Required. An advanced logs filter (https://cloud.google.com/logging/docs/view/
1274
+ # advanced_filters) which is used to match log entries. Example: "resource.type=
1275
+ # gae_app AND severity>=ERROR" The maximum length of the filter is 20000
1276
+ # characters.
1277
+ # Corresponds to the JSON property `filter`
1278
+ # @return [String]
1279
+ attr_accessor :filter
1280
+
1281
+ # Optional. A map from a label key string to an extractor expression which is
1282
+ # used to extract data from a log entry field and assign as the label value.
1283
+ # Each label key specified in the LabelDescriptor must have an associated
1284
+ # extractor expression in this map. The syntax of the extractor expression is
1285
+ # the same as for the value_extractor field.The extracted value is converted to
1286
+ # the type defined in the label descriptor. If the either the extraction or the
1287
+ # type conversion fails, the label will have a default value. The default value
1288
+ # for a string label is an empty string, for an integer label its 0, and for a
1289
+ # boolean label its false.Note that there are upper bounds on the maximum number
1290
+ # of labels and the number of active time series that are allowed in a project.
1291
+ # Corresponds to the JSON property `labelExtractors`
1292
+ # @return [Hash<String,String>]
1293
+ attr_accessor :label_extractors
1294
+
1295
+ # Defines a metric type and its schema. Once a metric descriptor is created,
1296
+ # deleting or altering it stops data collection and makes the metric type's
1297
+ # existing data unusable.
1298
+ # Corresponds to the JSON property `metricDescriptor`
1299
+ # @return [Google::Apis::LoggingV2::MetricDescriptor]
1300
+ attr_accessor :metric_descriptor
1301
+
1302
+ # Required. The client-assigned metric identifier. Examples: "error_count", "
1303
+ # nginx/requests".Metric identifiers are limited to 100 characters and can
1304
+ # include only the following characters: A-Z, a-z, 0-9, and the special
1305
+ # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy
1306
+ # of name pieces, and it cannot be the first character of the name.The metric
1307
+ # identifier in this field must not be URL-encoded (https://en.wikipedia.org/
1308
+ # wiki/Percent-encoding). However, when the metric identifier appears as the [
1309
+ # METRIC_ID] part of a metric_name API parameter, then the metric identifier
1310
+ # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
1311
+ # Corresponds to the JSON property `name`
1312
+ # @return [String]
1313
+ attr_accessor :name
1314
+
1315
+ # Output only. The last update timestamp of the metric.This field may not be
1316
+ # present for older metrics.
1317
+ # Corresponds to the JSON property `updateTime`
1318
+ # @return [String]
1319
+ attr_accessor :update_time
1320
+
1321
+ # Optional. A value_extractor is required when using a distribution logs-based
1322
+ # metric to extract the values to record from a log entry. Two functions are
1323
+ # supported for value extraction: EXTRACT(field) or REGEXP_EXTRACT(field, regex).
1324
+ # The argument are: 1. field: The name of the log entry field from which the
1325
+ # value is to be extracted. 2. regex: A regular expression using the Google RE2
1326
+ # syntax (https://github.com/google/re2/wiki/Syntax) with a single capture group
1327
+ # to extract data from the specified log entry field. The value of the field is
1328
+ # converted to a string before applying the regex. It is an error to specify a
1329
+ # regex that does not include exactly one capture group.The result of the
1330
+ # extraction must be convertible to a double type, as the distribution always
1331
+ # records double values. If either the extraction or the conversion to double
1332
+ # fails, then those values are not recorded in the distribution.Example:
1333
+ # REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")
1334
+ # Corresponds to the JSON property `valueExtractor`
1335
+ # @return [String]
1336
+ attr_accessor :value_extractor
1337
+
1338
+ # Deprecated. The API version that created or updated this metric. The v2 format
1339
+ # is used by default and cannot be changed.
1340
+ # Corresponds to the JSON property `version`
1341
+ # @return [String]
1342
+ attr_accessor :version
1343
+
1344
+ def initialize(**args)
1345
+ update!(**args)
1346
+ end
1347
+
1348
+ # Update properties of this object
1349
+ def update!(**args)
1350
+ @bucket_options = args[:bucket_options] if args.key?(:bucket_options)
1351
+ @create_time = args[:create_time] if args.key?(:create_time)
1352
+ @description = args[:description] if args.key?(:description)
1353
+ @filter = args[:filter] if args.key?(:filter)
1354
+ @label_extractors = args[:label_extractors] if args.key?(:label_extractors)
1355
+ @metric_descriptor = args[:metric_descriptor] if args.key?(:metric_descriptor)
1356
+ @name = args[:name] if args.key?(:name)
1357
+ @update_time = args[:update_time] if args.key?(:update_time)
1358
+ @value_extractor = args[:value_extractor] if args.key?(:value_extractor)
1359
+ @version = args[:version] if args.key?(:version)
1360
+ end
1361
+ end
1362
+
1363
+ # Describes a sink used to export log entries to one of the following
1364
+ # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
1365
+ # Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
1366
+ # The sink must be created within a project, organization, billing account, or
1367
+ # folder.
1368
+ class LogSink
1369
+ include Google::Apis::Core::Hashable
1370
+
1371
+ # Options that change functionality of a sink exporting data to BigQuery.
1372
+ # Corresponds to the JSON property `bigqueryOptions`
1373
+ # @return [Google::Apis::LoggingV2::BigQueryOptions]
1374
+ attr_accessor :bigquery_options
1375
+
1376
+ # Output only. The creation timestamp of the sink.This field may not be present
1377
+ # for older sinks.
1378
+ # Corresponds to the JSON property `createTime`
1379
+ # @return [String]
1380
+ attr_accessor :create_time
1381
+
1382
+ # Optional. A description of this sink. The maximum length of the description is
1383
+ # 8000 characters.
1384
+ # Corresponds to the JSON property `description`
1385
+ # @return [String]
1386
+ attr_accessor :description
1387
+
1388
+ # Required. The export destination: "storage.googleapis.com/[GCS_BUCKET]" "
1389
+ # bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" "pubsub.
1390
+ # googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" The sink's
1391
+ # writer_identity, set when the sink is created, must have permission to write
1392
+ # to the destination or else the log entries are not exported. For more
1393
+ # information, see Exporting Logs with Sinks (https://cloud.google.com/logging/
1394
+ # docs/api/tasks/exporting-logs).
1395
+ # Corresponds to the JSON property `destination`
1396
+ # @return [String]
1397
+ attr_accessor :destination
1398
+
1399
+ # Optional. If set to True, then this sink is disabled and it does not export
1400
+ # any log entries.
1401
+ # Corresponds to the JSON property `disabled`
1402
+ # @return [Boolean]
1403
+ attr_accessor :disabled
1404
+ alias_method :disabled?, :disabled
1405
+
1406
+ # Optional. Log entries that match any of the exclusion filters will not be
1407
+ # exported. If a log entry is matched by both filter and one of
1408
+ # exclusion_filters it will not be exported.
1409
+ # Corresponds to the JSON property `exclusions`
1410
+ # @return [Array<Google::Apis::LoggingV2::LogExclusion>]
1411
+ attr_accessor :exclusions
1412
+
1413
+ # Optional. An advanced logs filter (https://cloud.google.com/logging/docs/view/
1414
+ # advanced-queries). The only exported log entries are those that are in the
1415
+ # resource owning the sink and that match the filter. For example: logName="
1416
+ # projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
1417
+ # Corresponds to the JSON property `filter`
1418
+ # @return [String]
1419
+ attr_accessor :filter
1420
+
1421
+ # Optional. This field applies only to sinks owned by organizations and folders.
1422
+ # If the field is false, the default, only the logs owned by the sink's parent
1423
+ # resource are available for export. If the field is true, then logs from all
1424
+ # the projects, folders, and billing accounts contained in the sink's parent
1425
+ # resource are also available for export. Whether a particular log entry from
1426
+ # the children is exported depends on the sink's filter expression. For example,
1427
+ # if this field is true, then the filter resource.type=gce_instance would export
1428
+ # all Compute Engine VM instance log entries from all projects in the sink's
1429
+ # parent. To only export entries from certain child projects, filter on the
1430
+ # project part of the log name: logName:("projects/test-project1/" OR "projects/
1431
+ # test-project2/") AND resource.type=gce_instance
1432
+ # Corresponds to the JSON property `includeChildren`
1433
+ # @return [Boolean]
1434
+ attr_accessor :include_children
1435
+ alias_method :include_children?, :include_children
1436
+
1437
+ # Required. The client-assigned sink identifier, unique within the project.
1438
+ # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100
1439
+ # characters and can include only the following characters: upper and lower-case
1440
+ # alphanumeric characters, underscores, hyphens, and periods. First character
1441
+ # has to be alphanumeric.
1442
+ # Corresponds to the JSON property `name`
1443
+ # @return [String]
1444
+ attr_accessor :name
1445
+
1446
+ # Deprecated. This field is unused.
1447
+ # Corresponds to the JSON property `outputVersionFormat`
1448
+ # @return [String]
1449
+ attr_accessor :output_version_format
1450
+
1451
+ # Output only. The last update timestamp of the sink.This field may not be
1452
+ # present for older sinks.
1453
+ # Corresponds to the JSON property `updateTime`
1454
+ # @return [String]
1455
+ attr_accessor :update_time
1456
+
1457
+ # Output only. An IAM identity—a service account or group—under which Logging
1458
+ # writes the exported log entries to the sink's destination. This field is set
1459
+ # by sinks.create and sinks.update based on the value of unique_writer_identity
1460
+ # in those methods.Until you grant this identity write-access to the destination,
1461
+ # log entry exports from this sink will fail. For more information, see
1462
+ # Granting Access for a Resource (https://cloud.google.com/iam/docs/granting-
1463
+ # roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource).
1464
+ # Consult the destination service's documentation to determine the appropriate
1465
+ # IAM roles to assign to the identity.
1466
+ # Corresponds to the JSON property `writerIdentity`
1467
+ # @return [String]
1468
+ attr_accessor :writer_identity
1469
+
1470
+ def initialize(**args)
1471
+ update!(**args)
1472
+ end
1473
+
1474
+ # Update properties of this object
1475
+ def update!(**args)
1476
+ @bigquery_options = args[:bigquery_options] if args.key?(:bigquery_options)
1477
+ @create_time = args[:create_time] if args.key?(:create_time)
1478
+ @description = args[:description] if args.key?(:description)
1479
+ @destination = args[:destination] if args.key?(:destination)
1480
+ @disabled = args[:disabled] if args.key?(:disabled)
1481
+ @exclusions = args[:exclusions] if args.key?(:exclusions)
1482
+ @filter = args[:filter] if args.key?(:filter)
1483
+ @include_children = args[:include_children] if args.key?(:include_children)
1484
+ @name = args[:name] if args.key?(:name)
1485
+ @output_version_format = args[:output_version_format] if args.key?(:output_version_format)
1486
+ @update_time = args[:update_time] if args.key?(:update_time)
1487
+ @writer_identity = args[:writer_identity] if args.key?(:writer_identity)
1488
+ end
1489
+ end
1490
+
1491
+ # Describes a view over logs in a bucket.
1492
+ class LogView
1493
+ include Google::Apis::Core::Hashable
1494
+
1495
+ # Output only. The creation timestamp of the view.
1496
+ # Corresponds to the JSON property `createTime`
1497
+ # @return [String]
1498
+ attr_accessor :create_time
1499
+
1500
+ # Describes this view.
1501
+ # Corresponds to the JSON property `description`
1502
+ # @return [String]
1503
+ attr_accessor :description
1504
+
1505
+ # Filter that restricts which log entries in a bucket are visible in this view.
1506
+ # Filters are restricted to be a logical AND of ==/!= of any of the following:
1507
+ # originating project/folder/organization/billing account. resource type log id
1508
+ # Example: SOURCE("projects/myproject") AND resource.type = "gce_instance" AND
1509
+ # LOG_ID("stdout")
1510
+ # Corresponds to the JSON property `filter`
1511
+ # @return [String]
1512
+ attr_accessor :filter
1513
+
1514
+ # The resource name of the view. For example "projects/my-project-id/locations/
1515
+ # my-location/buckets/my-bucket-id/views/my-view
1516
+ # Corresponds to the JSON property `name`
1517
+ # @return [String]
1518
+ attr_accessor :name
1519
+
1520
+ # Output only. The last update timestamp of the view.
1521
+ # Corresponds to the JSON property `updateTime`
1522
+ # @return [String]
1523
+ attr_accessor :update_time
1524
+
1525
+ def initialize(**args)
1526
+ update!(**args)
1527
+ end
1528
+
1529
+ # Update properties of this object
1530
+ def update!(**args)
1531
+ @create_time = args[:create_time] if args.key?(:create_time)
1532
+ @description = args[:description] if args.key?(:description)
1533
+ @filter = args[:filter] if args.key?(:filter)
1534
+ @name = args[:name] if args.key?(:name)
1535
+ @update_time = args[:update_time] if args.key?(:update_time)
1536
+ end
1537
+ end
1538
+
1539
+ # Defines a metric type and its schema. Once a metric descriptor is created,
1540
+ # deleting or altering it stops data collection and makes the metric type's
1541
+ # existing data unusable.
1542
+ class MetricDescriptor
1543
+ include Google::Apis::Core::Hashable
1544
+
1545
+ # A detailed description of the metric, which can be used in documentation.
1546
+ # Corresponds to the JSON property `description`
1547
+ # @return [String]
1548
+ attr_accessor :description
1549
+
1550
+ # A concise name for the metric, which can be displayed in user interfaces. Use
1551
+ # sentence case without an ending period, for example "Request count". This
1552
+ # field is optional but it is recommended to be set for any metrics associated
1553
+ # with user-visible concepts, such as Quota.
1554
+ # Corresponds to the JSON property `displayName`
1555
+ # @return [String]
1556
+ attr_accessor :display_name
1557
+
1558
+ # The set of labels that can be used to describe a specific instance of this
1559
+ # metric type. For example, the appengine.googleapis.com/http/server/
1560
+ # response_latencies metric type has a label for the HTTP response code,
1561
+ # response_code, so you can look at latencies for successful responses or just
1562
+ # for responses that failed.
1563
+ # Corresponds to the JSON property `labels`
1564
+ # @return [Array<Google::Apis::LoggingV2::LabelDescriptor>]
1565
+ attr_accessor :labels
1566
+
1567
+ # Optional. The launch stage of the metric definition.
1568
+ # Corresponds to the JSON property `launchStage`
1569
+ # @return [String]
1570
+ attr_accessor :launch_stage
1571
+
1572
+ # Additional annotations that can be used to guide the usage of a metric.
1573
+ # Corresponds to the JSON property `metadata`
1574
+ # @return [Google::Apis::LoggingV2::MetricDescriptorMetadata]
1575
+ attr_accessor :metadata
1576
+
1577
+ # Whether the metric records instantaneous values, changes to a value, etc. Some
1578
+ # combinations of metric_kind and value_type might not be supported.
1579
+ # Corresponds to the JSON property `metricKind`
1580
+ # @return [String]
1581
+ attr_accessor :metric_kind
1582
+
1583
+ # Read-only. If present, then a time series, which is identified partially by a
1584
+ # metric type and a MonitoredResourceDescriptor, that is associated with this
1585
+ # metric type can only be associated with one of the monitored resource types
1586
+ # listed here.
1587
+ # Corresponds to the JSON property `monitoredResourceTypes`
1588
+ # @return [Array<String>]
1589
+ attr_accessor :monitored_resource_types
1590
+
1591
+ # The resource name of the metric descriptor.
1592
+ # Corresponds to the JSON property `name`
1593
+ # @return [String]
1594
+ attr_accessor :name
1595
+
1596
+ # The metric type, including its DNS name prefix. The type is not URL-encoded.
1597
+ # All user-defined metric types have the DNS name custom.googleapis.com or
1598
+ # external.googleapis.com. Metric types should use a natural hierarchical
1599
+ # grouping. For example: "custom.googleapis.com/invoice/paid/amount" "external.
1600
+ # googleapis.com/prometheus/up" "appengine.googleapis.com/http/server/
1601
+ # response_latencies"
1602
+ # Corresponds to the JSON property `type`
1603
+ # @return [String]
1604
+ attr_accessor :type
1605
+
1606
+ # The units in which the metric value is reported. It is only applicable if the
1607
+ # value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the
1608
+ # representation of the stored metric values.Different systems may scale the
1609
+ # values to be more easily displayed (so a value of 0.02KBy might be displayed
1610
+ # as 20By, and a value of 3523KBy might be displayed as 3.5MBy). However, if the
1611
+ # unit is KBy, then the value of the metric is always in thousands of bytes, no
1612
+ # matter how it may be displayed..If you want a custom metric to record the
1613
+ # exact number of CPU-seconds used by a job, you can create an INT64 CUMULATIVE
1614
+ # metric whose unit is s`CPU` (or equivalently 1s`CPU` or just s). If the job
1615
+ # uses 12,005 CPU-seconds, then the value is written as 12005.Alternatively, if
1616
+ # you want a custom metric to record data in a more granular way, you can create
1617
+ # a DOUBLE CUMULATIVE metric whose unit is ks`CPU`, and then write the value 12.
1618
+ # 005 (which is 12005/1000), or use Kis`CPU` and write 11.723 (which is 12005/
1619
+ # 1024).The supported units are a subset of The Unified Code for Units of
1620
+ # Measure (http://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT) bit
1621
+ # bit By byte s second min minute h hour d day 1 dimensionlessPrefixes (PREFIX)
1622
+ # k kilo (10^3) M mega (10^6) G giga (10^9) T tera (10^12) P peta (10^15) E exa (
1623
+ # 10^18) Z zetta (10^21) Y yotta (10^24) m milli (10^-3) u micro (10^-6) n nano (
1624
+ # 10^-9) p pico (10^-12) f femto (10^-15) a atto (10^-18) z zepto (10^-21) y
1625
+ # yocto (10^-24) Ki kibi (2^10) Mi mebi (2^20) Gi gibi (2^30) Ti tebi (2^40) Pi
1626
+ # pebi (2^50)GrammarThe grammar also includes these connectors: / division or
1627
+ # ratio (as an infix operator). For examples, kBy/`email` or MiBy/10ms (although
1628
+ # you should almost never have /s in a metric unit; rates should always be
1629
+ # computed at query time from the underlying cumulative or delta value). .
1630
+ # multiplication or composition (as an infix operator). For examples, GBy.d or k`
1631
+ # watt`.h.The grammar for a unit is as follows: Expression = Component ` "."
1632
+ # Component ` ` "/" Component ` ; Component = ( [ PREFIX ] UNIT | "%" ) [
1633
+ # Annotation ] | Annotation | "1" ; Annotation = "`" NAME "`" ; Notes:
1634
+ # Annotation is just a comment if it follows a UNIT. If the annotation is used
1635
+ # alone, then the unit is equivalent to 1. For examples, `request`/s == 1/s, By`
1636
+ # transmitted`/s == By/s. NAME is a sequence of non-blank printable ASCII
1637
+ # characters not containing ` or `. 1 represents a unitary dimensionless unit (
1638
+ # https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in 1/s. It
1639
+ # is typically used when none of the basic units are appropriate. For example, "
1640
+ # new users per day" can be represented as 1/d or `new-users`/d (and a metric
1641
+ # value 5 would mean "5 new users). Alternatively, "thousands of page views per
1642
+ # day" would be represented as 1000/d or k1/d or k`page_views`/d (and a metric
1643
+ # value of 5.3 would mean "5300 page views per day"). % represents dimensionless
1644
+ # value of 1/100, and annotates values giving a percentage (so the metric values
1645
+ # are typically in the range of 0..100, and a metric value 3 means "3 percent").
1646
+ # 10^2.% indicates a metric contains a ratio, typically in the range 0..1, that
1647
+ # will be multiplied by 100 and displayed as a percentage (so a metric value 0.
1648
+ # 03 means "3 percent").
1649
+ # Corresponds to the JSON property `unit`
1650
+ # @return [String]
1651
+ attr_accessor :unit
1652
+
1653
+ # Whether the measurement is an integer, a floating-point number, etc. Some
1654
+ # combinations of metric_kind and value_type might not be supported.
1655
+ # Corresponds to the JSON property `valueType`
1656
+ # @return [String]
1657
+ attr_accessor :value_type
1658
+
1659
+ def initialize(**args)
1660
+ update!(**args)
1661
+ end
1662
+
1663
+ # Update properties of this object
1664
+ def update!(**args)
1665
+ @description = args[:description] if args.key?(:description)
1666
+ @display_name = args[:display_name] if args.key?(:display_name)
1667
+ @labels = args[:labels] if args.key?(:labels)
1668
+ @launch_stage = args[:launch_stage] if args.key?(:launch_stage)
1669
+ @metadata = args[:metadata] if args.key?(:metadata)
1670
+ @metric_kind = args[:metric_kind] if args.key?(:metric_kind)
1671
+ @monitored_resource_types = args[:monitored_resource_types] if args.key?(:monitored_resource_types)
1672
+ @name = args[:name] if args.key?(:name)
1673
+ @type = args[:type] if args.key?(:type)
1674
+ @unit = args[:unit] if args.key?(:unit)
1675
+ @value_type = args[:value_type] if args.key?(:value_type)
1676
+ end
1677
+ end
1678
+
1679
+ # Additional annotations that can be used to guide the usage of a metric.
1680
+ class MetricDescriptorMetadata
1681
+ include Google::Apis::Core::Hashable
1682
+
1683
+ # The delay of data points caused by ingestion. Data points older than this age
1684
+ # are guaranteed to be ingested and available to be read, excluding data loss
1685
+ # due to errors.
1686
+ # Corresponds to the JSON property `ingestDelay`
1687
+ # @return [String]
1688
+ attr_accessor :ingest_delay
1689
+
1690
+ # Deprecated. Must use the MetricDescriptor.launch_stage instead.
1691
+ # Corresponds to the JSON property `launchStage`
1692
+ # @return [String]
1693
+ attr_accessor :launch_stage
1694
+
1695
+ # The sampling period of metric data points. For metrics which are written
1696
+ # periodically, consecutive data points are stored at this time interval,
1697
+ # excluding data loss due to errors. Metrics with a higher granularity have a
1698
+ # smaller sampling period.
1699
+ # Corresponds to the JSON property `samplePeriod`
1700
+ # @return [String]
1701
+ attr_accessor :sample_period
1702
+
1703
+ def initialize(**args)
1704
+ update!(**args)
1705
+ end
1706
+
1707
+ # Update properties of this object
1708
+ def update!(**args)
1709
+ @ingest_delay = args[:ingest_delay] if args.key?(:ingest_delay)
1710
+ @launch_stage = args[:launch_stage] if args.key?(:launch_stage)
1711
+ @sample_period = args[:sample_period] if args.key?(:sample_period)
1712
+ end
1713
+ end
1714
+
1715
+ # An object representing a resource that can be used for monitoring, logging,
1716
+ # billing, or other purposes. Examples include virtual machine instances,
1717
+ # databases, and storage devices such as disks. The type field identifies a
1718
+ # MonitoredResourceDescriptor object that describes the resource's schema.
1719
+ # Information in the labels field identifies the actual resource and its
1720
+ # attributes according to the schema. For example, a particular Compute Engine
1721
+ # VM instance could be represented by the following object, because the
1722
+ # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
1723
+ # zone": ` "type": "gce_instance", "labels": ` "instance_id": "12345678901234", "
1724
+ # zone": "us-central1-a" ``
1725
+ class MonitoredResource
1726
+ include Google::Apis::Core::Hashable
1727
+
1728
+ # Required. Values for all of the labels listed in the associated monitored
1729
+ # resource descriptor. For example, Compute Engine VM instances use the labels "
1730
+ # project_id", "instance_id", and "zone".
1731
+ # Corresponds to the JSON property `labels`
1732
+ # @return [Hash<String,String>]
1733
+ attr_accessor :labels
1734
+
1735
+ # Required. The monitored resource type. This field must match the type field of
1736
+ # a MonitoredResourceDescriptor object. For example, the type of a Compute
1737
+ # Engine VM instance is gce_instance.
1738
+ # Corresponds to the JSON property `type`
1739
+ # @return [String]
1740
+ attr_accessor :type
1741
+
1742
+ def initialize(**args)
1743
+ update!(**args)
1744
+ end
1745
+
1746
+ # Update properties of this object
1747
+ def update!(**args)
1748
+ @labels = args[:labels] if args.key?(:labels)
1749
+ @type = args[:type] if args.key?(:type)
1750
+ end
1751
+ end
1752
+
1753
+ # An object that describes the schema of a MonitoredResource object using a type
1754
+ # name and a set of labels. For example, the monitored resource descriptor for
1755
+ # Google Compute Engine VM instances has a type of "gce_instance" and specifies
1756
+ # the use of the labels "instance_id" and "zone" to identify particular VM
1757
+ # instances.Different APIs can support different monitored resource types. APIs
1758
+ # generally provide a list method that returns the monitored resource
1759
+ # descriptors used by the API.
1760
+ class MonitoredResourceDescriptor
1761
+ include Google::Apis::Core::Hashable
1762
+
1763
+ # Optional. A detailed description of the monitored resource type that might be
1764
+ # used in documentation.
1765
+ # Corresponds to the JSON property `description`
1766
+ # @return [String]
1767
+ attr_accessor :description
1768
+
1769
+ # Optional. A concise name for the monitored resource type that might be
1770
+ # displayed in user interfaces. It should be a Title Cased Noun Phrase, without
1771
+ # any article or other determiners. For example, "Google Cloud SQL Database".
1772
+ # Corresponds to the JSON property `displayName`
1773
+ # @return [String]
1774
+ attr_accessor :display_name
1775
+
1776
+ # Required. A set of labels used to describe instances of this monitored
1777
+ # resource type. For example, an individual Google Cloud SQL database is
1778
+ # identified by values for the labels "database_id" and "zone".
1779
+ # Corresponds to the JSON property `labels`
1780
+ # @return [Array<Google::Apis::LoggingV2::LabelDescriptor>]
1781
+ attr_accessor :labels
1782
+
1783
+ # Optional. The launch stage of the monitored resource definition.
1784
+ # Corresponds to the JSON property `launchStage`
1785
+ # @return [String]
1786
+ attr_accessor :launch_stage
1787
+
1788
+ # Optional. The resource name of the monitored resource descriptor: "projects/`
1789
+ # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of
1790
+ # the type field in this object and `project_id` is a project ID that provides
1791
+ # API-specific context for accessing the type. APIs that do not use project
1792
+ # information can use the resource name format "monitoredResourceDescriptors/`
1793
+ # type`".
1794
+ # Corresponds to the JSON property `name`
1795
+ # @return [String]
1796
+ attr_accessor :name
1797
+
1798
+ # Required. The monitored resource type. For example, the type "
1799
+ # cloudsql_database" represents databases in Google Cloud SQL.
1800
+ # Corresponds to the JSON property `type`
1801
+ # @return [String]
1802
+ attr_accessor :type
1803
+
1804
+ def initialize(**args)
1805
+ update!(**args)
1806
+ end
1807
+
1808
+ # Update properties of this object
1809
+ def update!(**args)
1810
+ @description = args[:description] if args.key?(:description)
1811
+ @display_name = args[:display_name] if args.key?(:display_name)
1812
+ @labels = args[:labels] if args.key?(:labels)
1813
+ @launch_stage = args[:launch_stage] if args.key?(:launch_stage)
1814
+ @name = args[:name] if args.key?(:name)
1815
+ @type = args[:type] if args.key?(:type)
1816
+ end
1817
+ end
1818
+
1819
+ # Auxiliary metadata for a MonitoredResource object. MonitoredResource objects
1820
+ # contain the minimum set of information to uniquely identify a monitored
1821
+ # resource instance. There is some other useful auxiliary metadata. Monitoring
1822
+ # and Logging use an ingestion pipeline to extract metadata for cloud resources
1823
+ # of all types, and store the metadata in this message.
1824
+ class MonitoredResourceMetadata
1825
+ include Google::Apis::Core::Hashable
1826
+
1827
+ # Output only. Values for predefined system metadata labels. System labels are a
1828
+ # kind of metadata extracted by Google, including "machine_image", "vpc", "
1829
+ # subnet_id", "security_group", "name", etc. System label values can be only
1830
+ # strings, Boolean values, or a list of strings. For example: ` "name": "my-test-
1831
+ # instance", "security_group": ["a", "b", "c"], "spot_instance": false `
1832
+ # Corresponds to the JSON property `systemLabels`
1833
+ # @return [Hash<String,Object>]
1834
+ attr_accessor :system_labels
1835
+
1836
+ # Output only. A map of user-defined metadata labels.
1837
+ # Corresponds to the JSON property `userLabels`
1838
+ # @return [Hash<String,String>]
1839
+ attr_accessor :user_labels
1840
+
1841
+ def initialize(**args)
1842
+ update!(**args)
1843
+ end
1844
+
1845
+ # Update properties of this object
1846
+ def update!(**args)
1847
+ @system_labels = args[:system_labels] if args.key?(:system_labels)
1848
+ @user_labels = args[:user_labels] if args.key?(:user_labels)
1849
+ end
1850
+ end
1851
+
1852
+ # Complete log information about a single HTTP request to an App Engine
1853
+ # application.
1854
+ class RequestLog
1855
+ include Google::Apis::Core::Hashable
1856
+
1857
+ # App Engine release version.
1858
+ # Corresponds to the JSON property `appEngineRelease`
1859
+ # @return [String]
1860
+ attr_accessor :app_engine_release
1861
+
1862
+ # Application that handled this request.
1863
+ # Corresponds to the JSON property `appId`
1864
+ # @return [String]
1865
+ attr_accessor :app_id
1866
+
1867
+ # An indication of the relative cost of serving this request.
1868
+ # Corresponds to the JSON property `cost`
1869
+ # @return [Float]
1870
+ attr_accessor :cost
1871
+
1872
+ # Time when the request finished.
1873
+ # Corresponds to the JSON property `endTime`
1874
+ # @return [String]
1875
+ attr_accessor :end_time
1876
+
1877
+ # Whether this request is finished or active.
1878
+ # Corresponds to the JSON property `finished`
1879
+ # @return [Boolean]
1880
+ attr_accessor :finished
1881
+ alias_method :finished?, :finished
1882
+
1883
+ # Whether this is the first RequestLog entry for this request. If an active
1884
+ # request has several RequestLog entries written to Stackdriver Logging, then
1885
+ # this field will be set for one of them.
1886
+ # Corresponds to the JSON property `first`
1887
+ # @return [Boolean]
1888
+ attr_accessor :first
1889
+ alias_method :first?, :first
1890
+
1891
+ # Internet host and port number of the resource being requested.
1892
+ # Corresponds to the JSON property `host`
1893
+ # @return [String]
1894
+ attr_accessor :host
1895
+
1896
+ # HTTP version of request. Example: "HTTP/1.1".
1897
+ # Corresponds to the JSON property `httpVersion`
1898
+ # @return [String]
1899
+ attr_accessor :http_version
1900
+
1901
+ # An identifier for the instance that handled the request.
1902
+ # Corresponds to the JSON property `instanceId`
1903
+ # @return [String]
1904
+ attr_accessor :instance_id
1905
+
1906
+ # If the instance processing this request belongs to a manually scaled module,
1907
+ # then this is the 0-based index of the instance. Otherwise, this value is -1.
1908
+ # Corresponds to the JSON property `instanceIndex`
1909
+ # @return [Fixnum]
1910
+ attr_accessor :instance_index
1911
+
1912
+ # Origin IP address.
1913
+ # Corresponds to the JSON property `ip`
1914
+ # @return [String]
1915
+ attr_accessor :ip
1916
+
1917
+ # Latency of the request.
1918
+ # Corresponds to the JSON property `latency`
1919
+ # @return [String]
1920
+ attr_accessor :latency
1921
+
1922
+ # A list of log lines emitted by the application while serving this request.
1923
+ # Corresponds to the JSON property `line`
1924
+ # @return [Array<Google::Apis::LoggingV2::LogLine>]
1925
+ attr_accessor :line
1926
+
1927
+ # Number of CPU megacycles used to process request.
1928
+ # Corresponds to the JSON property `megaCycles`
1929
+ # @return [Fixnum]
1930
+ attr_accessor :mega_cycles
1931
+
1932
+ # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE".
1933
+ # Corresponds to the JSON property `method`
1934
+ # @return [String]
1935
+ attr_accessor :method_prop
1936
+
1937
+ # Module of the application that handled this request.
1938
+ # Corresponds to the JSON property `moduleId`
1939
+ # @return [String]
1940
+ attr_accessor :module_id
1941
+
1942
+ # The logged-in user who made the request.Most likely, this is the part of the
1943
+ # user's email before the @ sign. The field value is the same for different
1944
+ # requests from the same user, but different users can have similar names. This
1945
+ # information is also available to the application via the App Engine Users API.
1946
+ # This field will be populated starting with App Engine 1.9.21.
1947
+ # Corresponds to the JSON property `nickname`
1948
+ # @return [String]
1949
+ attr_accessor :nickname
1950
+
1951
+ # Time this request spent in the pending request queue.
1952
+ # Corresponds to the JSON property `pendingTime`
1953
+ # @return [String]
1954
+ attr_accessor :pending_time
1955
+
1956
+ # Referrer URL of request.
1957
+ # Corresponds to the JSON property `referrer`
1958
+ # @return [String]
1959
+ attr_accessor :referrer
1960
+
1961
+ # Globally unique identifier for a request, which is based on the request start
1962
+ # time. Request IDs for requests which started later will compare greater as
1963
+ # strings than those for requests which started earlier.
1964
+ # Corresponds to the JSON property `requestId`
1965
+ # @return [String]
1966
+ attr_accessor :request_id
1967
+
1968
+ # Contains the path and query portion of the URL that was requested. For example,
1969
+ # if the URL was "http://example.com/app?name=val", the resource would be "/app?
1970
+ # name=val". The fragment identifier, which is identified by the # character, is
1971
+ # not included.
1972
+ # Corresponds to the JSON property `resource`
1973
+ # @return [String]
1974
+ attr_accessor :resource
1975
+
1976
+ # Size in bytes sent back to client by request.
1977
+ # Corresponds to the JSON property `responseSize`
1978
+ # @return [Fixnum]
1979
+ attr_accessor :response_size
1980
+
1981
+ # Source code for the application that handled this request. There can be more
1982
+ # than one source reference per deployed application if source code is
1983
+ # distributed among multiple repositories.
1984
+ # Corresponds to the JSON property `sourceReference`
1985
+ # @return [Array<Google::Apis::LoggingV2::SourceReference>]
1986
+ attr_accessor :source_reference
1987
+
1988
+ # Time when the request started.
1989
+ # Corresponds to the JSON property `startTime`
1990
+ # @return [String]
1991
+ attr_accessor :start_time
1992
+
1993
+ # HTTP response status code. Example: 200, 404.
1994
+ # Corresponds to the JSON property `status`
1995
+ # @return [Fixnum]
1996
+ attr_accessor :status
1997
+
1998
+ # Task name of the request, in the case of an offline request.
1999
+ # Corresponds to the JSON property `taskName`
2000
+ # @return [String]
2001
+ attr_accessor :task_name
2002
+
2003
+ # Queue name of the request, in the case of an offline request.
2004
+ # Corresponds to the JSON property `taskQueueName`
2005
+ # @return [String]
2006
+ attr_accessor :task_queue_name
2007
+
2008
+ # Stackdriver Trace identifier for this request.
2009
+ # Corresponds to the JSON property `traceId`
2010
+ # @return [String]
2011
+ attr_accessor :trace_id
2012
+
2013
+ # If true, the value in the 'trace_id' field was sampled for storage in a trace
2014
+ # backend.
2015
+ # Corresponds to the JSON property `traceSampled`
2016
+ # @return [Boolean]
2017
+ attr_accessor :trace_sampled
2018
+ alias_method :trace_sampled?, :trace_sampled
2019
+
2020
+ # File or class that handled the request.
2021
+ # Corresponds to the JSON property `urlMapEntry`
2022
+ # @return [String]
2023
+ attr_accessor :url_map_entry
2024
+
2025
+ # User agent that made the request.
2026
+ # Corresponds to the JSON property `userAgent`
2027
+ # @return [String]
2028
+ attr_accessor :user_agent
2029
+
2030
+ # Version of the application that handled this request.
2031
+ # Corresponds to the JSON property `versionId`
2032
+ # @return [String]
2033
+ attr_accessor :version_id
2034
+
2035
+ # Whether this was a loading request for the instance.
2036
+ # Corresponds to the JSON property `wasLoadingRequest`
2037
+ # @return [Boolean]
2038
+ attr_accessor :was_loading_request
2039
+ alias_method :was_loading_request?, :was_loading_request
2040
+
2041
+ def initialize(**args)
2042
+ update!(**args)
2043
+ end
2044
+
2045
+ # Update properties of this object
2046
+ def update!(**args)
2047
+ @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release)
2048
+ @app_id = args[:app_id] if args.key?(:app_id)
2049
+ @cost = args[:cost] if args.key?(:cost)
2050
+ @end_time = args[:end_time] if args.key?(:end_time)
2051
+ @finished = args[:finished] if args.key?(:finished)
2052
+ @first = args[:first] if args.key?(:first)
2053
+ @host = args[:host] if args.key?(:host)
2054
+ @http_version = args[:http_version] if args.key?(:http_version)
2055
+ @instance_id = args[:instance_id] if args.key?(:instance_id)
2056
+ @instance_index = args[:instance_index] if args.key?(:instance_index)
2057
+ @ip = args[:ip] if args.key?(:ip)
2058
+ @latency = args[:latency] if args.key?(:latency)
2059
+ @line = args[:line] if args.key?(:line)
2060
+ @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles)
2061
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
2062
+ @module_id = args[:module_id] if args.key?(:module_id)
2063
+ @nickname = args[:nickname] if args.key?(:nickname)
2064
+ @pending_time = args[:pending_time] if args.key?(:pending_time)
2065
+ @referrer = args[:referrer] if args.key?(:referrer)
2066
+ @request_id = args[:request_id] if args.key?(:request_id)
2067
+ @resource = args[:resource] if args.key?(:resource)
2068
+ @response_size = args[:response_size] if args.key?(:response_size)
2069
+ @source_reference = args[:source_reference] if args.key?(:source_reference)
2070
+ @start_time = args[:start_time] if args.key?(:start_time)
2071
+ @status = args[:status] if args.key?(:status)
2072
+ @task_name = args[:task_name] if args.key?(:task_name)
2073
+ @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name)
2074
+ @trace_id = args[:trace_id] if args.key?(:trace_id)
2075
+ @trace_sampled = args[:trace_sampled] if args.key?(:trace_sampled)
2076
+ @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry)
2077
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
2078
+ @version_id = args[:version_id] if args.key?(:version_id)
2079
+ @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request)
2080
+ end
2081
+ end
2082
+
2083
+ # Specifies a location in a source code file.
2084
+ class SourceLocation
2085
+ include Google::Apis::Core::Hashable
2086
+
2087
+ # Source file name. Depending on the runtime environment, this might be a simple
2088
+ # name or a fully-qualified name.
2089
+ # Corresponds to the JSON property `file`
2090
+ # @return [String]
2091
+ attr_accessor :file
2092
+
2093
+ # Human-readable name of the function or method being invoked, with optional
2094
+ # context such as the class or package name. This information is used in
2095
+ # contexts such as the logs viewer, where a file and line number are less
2096
+ # meaningful. The format can vary by language. For example: qual.if.ied.Class.
2097
+ # method (Java), dir/package.func (Go), function (Python).
2098
+ # Corresponds to the JSON property `functionName`
2099
+ # @return [String]
2100
+ attr_accessor :function_name
2101
+
2102
+ # Line within the source file.
2103
+ # Corresponds to the JSON property `line`
2104
+ # @return [Fixnum]
2105
+ attr_accessor :line
2106
+
2107
+ def initialize(**args)
2108
+ update!(**args)
2109
+ end
2110
+
2111
+ # Update properties of this object
2112
+ def update!(**args)
2113
+ @file = args[:file] if args.key?(:file)
2114
+ @function_name = args[:function_name] if args.key?(:function_name)
2115
+ @line = args[:line] if args.key?(:line)
2116
+ end
2117
+ end
2118
+
2119
+ # A reference to a particular snapshot of the source tree used to build and
2120
+ # deploy an application.
2121
+ class SourceReference
2122
+ include Google::Apis::Core::Hashable
2123
+
2124
+ # Optional. A URI string identifying the repository. Example: "https://github.
2125
+ # com/GoogleCloudPlatform/kubernetes.git"
2126
+ # Corresponds to the JSON property `repository`
2127
+ # @return [String]
2128
+ attr_accessor :repository
2129
+
2130
+ # The canonical and persistent identifier of the deployed revision. Example (git)
2131
+ # : "0035781c50ec7aa23385dc841529ce8a4b70db1b"
2132
+ # Corresponds to the JSON property `revisionId`
2133
+ # @return [String]
2134
+ attr_accessor :revision_id
2135
+
2136
+ def initialize(**args)
2137
+ update!(**args)
2138
+ end
2139
+
2140
+ # Update properties of this object
2141
+ def update!(**args)
2142
+ @repository = args[:repository] if args.key?(:repository)
2143
+ @revision_id = args[:revision_id] if args.key?(:revision_id)
2144
+ end
2145
+ end
2146
+
2147
+ # Information about entries that were omitted from the session.
2148
+ class SuppressionInfo
2149
+ include Google::Apis::Core::Hashable
2150
+
2151
+ # The reason that entries were omitted from the session.
2152
+ # Corresponds to the JSON property `reason`
2153
+ # @return [String]
2154
+ attr_accessor :reason
2155
+
2156
+ # A lower bound on the count of entries omitted due to reason.
2157
+ # Corresponds to the JSON property `suppressedCount`
2158
+ # @return [Fixnum]
2159
+ attr_accessor :suppressed_count
2160
+
2161
+ def initialize(**args)
2162
+ update!(**args)
2163
+ end
2164
+
2165
+ # Update properties of this object
2166
+ def update!(**args)
2167
+ @reason = args[:reason] if args.key?(:reason)
2168
+ @suppressed_count = args[:suppressed_count] if args.key?(:suppressed_count)
2169
+ end
2170
+ end
2171
+
2172
+ # The parameters to TailLogEntries.
2173
+ class TailLogEntriesRequest
2174
+ include Google::Apis::Core::Hashable
2175
+
2176
+ # Optional. The amount of time to buffer log entries at the server before being
2177
+ # returned to prevent out of order results due to late arriving log entries.
2178
+ # Valid values are between 0-60000 milliseconds. Defaults to 2000 milliseconds.
2179
+ # Corresponds to the JSON property `bufferWindow`
2180
+ # @return [String]
2181
+ attr_accessor :buffer_window
2182
+
2183
+ # Optional. A filter that chooses which log entries to return. See Advanced Logs
2184
+ # Filters (https://cloud.google.com/logging/docs/view/advanced_filters). Only
2185
+ # log entries that match the filter are returned. An empty filter matches all
2186
+ # log entries in the resources listed in resource_names. Referencing a parent
2187
+ # resource that is not in resource_names will cause the filter to return no
2188
+ # results. The maximum length of the filter is 20000 characters.
2189
+ # Corresponds to the JSON property `filter`
2190
+ # @return [String]
2191
+ attr_accessor :filter
2192
+
2193
+ # Required. Name of a parent resource from which to retrieve log entries: "
2194
+ # projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[
2195
+ # BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" May alternatively be one or more
2196
+ # views: "projects/PROJECT_ID/locations/LOCATION_ID/buckets/BUCKET_ID/views/
2197
+ # VIEW_ID" "organization/ORGANIZATION_ID/locations/LOCATION_ID/buckets/BUCKET_ID/
2198
+ # views/VIEW_ID" "billingAccounts/BILLING_ACCOUNT_ID/locations/LOCATION_ID/
2199
+ # buckets/BUCKET_ID/views/VIEW_ID" "folders/FOLDER_ID/locations/LOCATION_ID/
2200
+ # buckets/BUCKET_ID/views/VIEW_ID"
2201
+ # Corresponds to the JSON property `resourceNames`
2202
+ # @return [Array<String>]
2203
+ attr_accessor :resource_names
2204
+
2205
+ def initialize(**args)
2206
+ update!(**args)
2207
+ end
2208
+
2209
+ # Update properties of this object
2210
+ def update!(**args)
2211
+ @buffer_window = args[:buffer_window] if args.key?(:buffer_window)
2212
+ @filter = args[:filter] if args.key?(:filter)
2213
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
2214
+ end
2215
+ end
2216
+
2217
+ # Result returned from TailLogEntries.
2218
+ class TailLogEntriesResponse
2219
+ include Google::Apis::Core::Hashable
2220
+
2221
+ # A list of log entries. Each response in the stream will order entries with
2222
+ # increasing values of LogEntry.timestamp. Ordering is not guaranteed between
2223
+ # separate responses.
2224
+ # Corresponds to the JSON property `entries`
2225
+ # @return [Array<Google::Apis::LoggingV2::LogEntry>]
2226
+ attr_accessor :entries
2227
+
2228
+ # If entries that otherwise would have been included in the session were not
2229
+ # sent back to the client, counts of relevant entries omitted from the session
2230
+ # with the reason that they were not included. There will be at most one of each
2231
+ # reason per response. The counts represent the number of suppressed entries
2232
+ # since the last streamed response.
2233
+ # Corresponds to the JSON property `suppressionInfo`
2234
+ # @return [Array<Google::Apis::LoggingV2::SuppressionInfo>]
2235
+ attr_accessor :suppression_info
2236
+
2237
+ def initialize(**args)
2238
+ update!(**args)
2239
+ end
2240
+
2241
+ # Update properties of this object
2242
+ def update!(**args)
2243
+ @entries = args[:entries] if args.key?(:entries)
2244
+ @suppression_info = args[:suppression_info] if args.key?(:suppression_info)
2245
+ end
2246
+ end
2247
+
2248
+ # The parameters to UndeleteBucket.
2249
+ class UndeleteBucketRequest
2250
+ include Google::Apis::Core::Hashable
2251
+
2252
+ def initialize(**args)
2253
+ update!(**args)
2254
+ end
2255
+
2256
+ # Update properties of this object
2257
+ def update!(**args)
2258
+ end
2259
+ end
2260
+
2261
+ # The parameters to WriteLogEntries.
2262
+ class WriteLogEntriesRequest
2263
+ include Google::Apis::Core::Hashable
2264
+
2265
+ # Optional. If true, the request should expect normal response, but the entries
2266
+ # won't be persisted nor exported. Useful for checking whether the logging API
2267
+ # endpoints are working properly before sending valuable data.
2268
+ # Corresponds to the JSON property `dryRun`
2269
+ # @return [Boolean]
2270
+ attr_accessor :dry_run
2271
+ alias_method :dry_run?, :dry_run
2272
+
2273
+ # Required. The log entries to send to Logging. The order of log entries in this
2274
+ # list does not matter. Values supplied in this method's log_name, resource, and
2275
+ # labels fields are copied into those log entries in this list that do not
2276
+ # include values for their corresponding fields. For more information, see the
2277
+ # LogEntry type.If the timestamp or insert_id fields are missing in log entries,
2278
+ # then this method supplies the current time or a unique identifier,
2279
+ # respectively. The supplied values are chosen so that, among the log entries
2280
+ # that did not supply their own values, the entries earlier in the list will
2281
+ # sort before the entries later in the list. See the entries.list method.Log
2282
+ # entries with timestamps that are more than the logs retention period (https://
2283
+ # cloud.google.com/logging/quota-policy) in the past or more than 24 hours in
2284
+ # the future will not be available when calling entries.list. However, those log
2285
+ # entries can still be exported with LogSinks (https://cloud.google.com/logging/
2286
+ # docs/api/tasks/exporting-logs).To improve throughput and to avoid exceeding
2287
+ # the quota limit (https://cloud.google.com/logging/quota-policy) for calls to
2288
+ # entries.write, you should try to include several log entries in this list,
2289
+ # rather than calling this method for each individual log entry.
2290
+ # Corresponds to the JSON property `entries`
2291
+ # @return [Array<Google::Apis::LoggingV2::LogEntry>]
2292
+ attr_accessor :entries
2293
+
2294
+ # Optional. Default labels that are added to the labels field of all log entries
2295
+ # in entries. If a log entry already has a label with the same key as a label in
2296
+ # this parameter, then the log entry's label is not changed. See LogEntry.
2297
+ # Corresponds to the JSON property `labels`
2298
+ # @return [Hash<String,String>]
2299
+ attr_accessor :labels
2300
+
2301
+ # Optional. A default log resource name that is assigned to all log entries in
2302
+ # entries that do not specify a value for log_name: "projects/[PROJECT_ID]/logs/[
2303
+ # LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" "billingAccounts/[
2304
+ # BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]" [LOG_ID]
2305
+ # must be URL-encoded. For example: "projects/my-project-id/logs/syslog" "
2306
+ # organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"
2307
+ # The permission logging.logEntries.create is needed on each project,
2308
+ # organization, billing account, or folder that is receiving new log entries,
2309
+ # whether the resource is specified in logName or in an individual log entry.
2310
+ # Corresponds to the JSON property `logName`
2311
+ # @return [String]
2312
+ attr_accessor :log_name
2313
+
2314
+ # Optional. Whether valid entries should be written even if some other entries
2315
+ # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not
2316
+ # written, then the response status is the error associated with one of the
2317
+ # failed entries and the response includes error details keyed by the entries'
2318
+ # zero-based index in the entries.write method.
2319
+ # Corresponds to the JSON property `partialSuccess`
2320
+ # @return [Boolean]
2321
+ attr_accessor :partial_success
2322
+ alias_method :partial_success?, :partial_success
2323
+
2324
+ # An object representing a resource that can be used for monitoring, logging,
2325
+ # billing, or other purposes. Examples include virtual machine instances,
2326
+ # databases, and storage devices such as disks. The type field identifies a
2327
+ # MonitoredResourceDescriptor object that describes the resource's schema.
2328
+ # Information in the labels field identifies the actual resource and its
2329
+ # attributes according to the schema. For example, a particular Compute Engine
2330
+ # VM instance could be represented by the following object, because the
2331
+ # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
2332
+ # zone": ` "type": "gce_instance", "labels": ` "instance_id": "12345678901234", "
2333
+ # zone": "us-central1-a" ``
2334
+ # Corresponds to the JSON property `resource`
2335
+ # @return [Google::Apis::LoggingV2::MonitoredResource]
2336
+ attr_accessor :resource
2337
+
2338
+ def initialize(**args)
2339
+ update!(**args)
2340
+ end
2341
+
2342
+ # Update properties of this object
2343
+ def update!(**args)
2344
+ @dry_run = args[:dry_run] if args.key?(:dry_run)
2345
+ @entries = args[:entries] if args.key?(:entries)
2346
+ @labels = args[:labels] if args.key?(:labels)
2347
+ @log_name = args[:log_name] if args.key?(:log_name)
2348
+ @partial_success = args[:partial_success] if args.key?(:partial_success)
2349
+ @resource = args[:resource] if args.key?(:resource)
2350
+ end
2351
+ end
2352
+
2353
+ # Result returned from WriteLogEntries.
2354
+ class WriteLogEntriesResponse
2355
+ include Google::Apis::Core::Hashable
2356
+
2357
+ def initialize(**args)
2358
+ update!(**args)
2359
+ end
2360
+
2361
+ # Update properties of this object
2362
+ def update!(**args)
2363
+ end
2364
+ end
2365
+ end
2366
+ end
2367
+ end