google-api-client 0.9.22 → 0.9.23

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,27 +22,219 @@ module Google
22
22
  module Apis
23
23
  module LoggingV2beta1
24
24
 
25
- # The parameters to ListLogEntries.
26
- class ListLogEntriesRequest
25
+ # Result returned from ListLogMetrics.
26
+ class ListLogMetricsResponse
27
27
  include Google::Apis::Core::Hashable
28
28
 
29
- # Optional. How the results should be sorted. Presently, the only permitted
30
- # values are "timestamp asc" (default) and "timestamp desc". The first option
31
- # returns entries in order of increasing values of LogEntry.timestamp (oldest
32
- # first), and the second option returns entries in order of decreasing
33
- # timestamps (newest first). Entries with equal timestamps are returned in order
34
- # of LogEntry.insertId.
35
- # Corresponds to the JSON property `orderBy`
29
+ # A list of logs-based metrics.
30
+ # Corresponds to the JSON property `metrics`
31
+ # @return [Array<Google::Apis::LoggingV2beta1::LogMetric>]
32
+ attr_accessor :metrics
33
+
34
+ # If there might be more results than appear in this response, then
35
+ # nextPageToken is included. To get the next set of results, call this method
36
+ # again using the value of nextPageToken as pageToken.
37
+ # Corresponds to the JSON property `nextPageToken`
36
38
  # @return [String]
37
- attr_accessor :order_by
39
+ attr_accessor :next_page_token
38
40
 
39
- # Required. Names of one or more resources from which to retrieve log entries:
40
- # "projects/[PROJECT_ID]"
41
- # "organizations/[ORGANIZATION_ID]"
42
- # Projects listed in the project_ids field are added to this list.
43
- # Corresponds to the JSON property `resourceNames`
44
- # @return [Array<String>]
45
- attr_accessor :resource_names
41
+ def initialize(**args)
42
+ update!(**args)
43
+ end
44
+
45
+ # Update properties of this object
46
+ def update!(**args)
47
+ @metrics = args[:metrics] if args.key?(:metrics)
48
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
49
+ end
50
+ end
51
+
52
+ # A generic empty message that you can re-use to avoid defining duplicated empty
53
+ # messages in your APIs. A typical example is to use it as the request or the
54
+ # response type of an API method. For instance:
55
+ # service Foo `
56
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
57
+ # `
58
+ # The JSON representation for Empty is empty JSON object ``.
59
+ class Empty
60
+ include Google::Apis::Core::Hashable
61
+
62
+ def initialize(**args)
63
+ update!(**args)
64
+ end
65
+
66
+ # Update properties of this object
67
+ def update!(**args)
68
+ end
69
+ end
70
+
71
+ # An individual entry in a log.
72
+ class LogEntry
73
+ include Google::Apis::Core::Hashable
74
+
75
+ # Optional. The time the event described by the log entry occurred. If omitted,
76
+ # Stackdriver Logging will use the time the log entry is received.
77
+ # Corresponds to the JSON property `timestamp`
78
+ # @return [String]
79
+ attr_accessor :timestamp
80
+
81
+ # Required. The resource name of the log to which this log entry belongs:
82
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
83
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
84
+ # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/
85
+ # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must
86
+ # be less than 512 characters long and can only include the following characters:
87
+ # upper and lower case alphanumeric characters, forward-slash, underscore,
88
+ # hyphen, and period.For backward compatibility, if log_name begins with a
89
+ # forward-slash, such as /projects/..., then the log entry is ingested as usual
90
+ # but the forward-slash is removed. Listing the log entry will not show the
91
+ # leading slash and filtering for a log name with a leading slash will never
92
+ # return any results.
93
+ # Corresponds to the JSON property `logName`
94
+ # @return [String]
95
+ attr_accessor :log_name
96
+
97
+ # A common proto for logging HTTP requests. Only contains semantics defined by
98
+ # the HTTP specification. Product-specific logging information MUST be defined
99
+ # in a separate message.
100
+ # Corresponds to the JSON property `httpRequest`
101
+ # @return [Google::Apis::LoggingV2beta1::HttpRequest]
102
+ attr_accessor :http_request
103
+
104
+ # An object representing a resource that can be used for monitoring, logging,
105
+ # billing, or other purposes. Examples include virtual machine instances,
106
+ # databases, and storage devices such as disks. The type field identifies a
107
+ # MonitoredResourceDescriptor object that describes the resource's schema.
108
+ # Information in the labels field identifies the actual resource and its
109
+ # attributes according to the schema. For example, a particular Compute Engine
110
+ # VM instance could be represented by the following object, because the
111
+ # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
112
+ # zone":
113
+ # ` "type": "gce_instance",
114
+ # "labels": ` "instance_id": "12345678901234",
115
+ # "zone": "us-central1-a" ``
116
+ # Corresponds to the JSON property `resource`
117
+ # @return [Google::Apis::LoggingV2beta1::MonitoredResource]
118
+ attr_accessor :resource
119
+
120
+ # The log entry payload, represented as a structure that is expressed as a JSON
121
+ # object.
122
+ # Corresponds to the JSON property `jsonPayload`
123
+ # @return [Hash<String,Object>]
124
+ attr_accessor :json_payload
125
+
126
+ # Optional. A unique ID for the log entry. If you provide this field, the
127
+ # logging service considers other log entries in the same project with the same
128
+ # ID as duplicates which can be removed. If omitted, Stackdriver Logging will
129
+ # generate a unique ID for this log entry.
130
+ # Corresponds to the JSON property `insertId`
131
+ # @return [String]
132
+ attr_accessor :insert_id
133
+
134
+ # Additional information about a potentially long-running operation with which a
135
+ # log entry is associated.
136
+ # Corresponds to the JSON property `operation`
137
+ # @return [Google::Apis::LoggingV2beta1::LogEntryOperation]
138
+ attr_accessor :operation
139
+
140
+ # The log entry payload, represented as a Unicode string (UTF-8).
141
+ # Corresponds to the JSON property `textPayload`
142
+ # @return [String]
143
+ attr_accessor :text_payload
144
+
145
+ # The log entry payload, represented as a protocol buffer. Some Google Cloud
146
+ # Platform services use this field for their log entry payloads.
147
+ # Corresponds to the JSON property `protoPayload`
148
+ # @return [Hash<String,Object>]
149
+ attr_accessor :proto_payload
150
+
151
+ # Optional. Resource name of the trace associated with the log entry, if any. If
152
+ # it contains a relative resource name, the name is assumed to be relative to //
153
+ # tracing.googleapis.com. Example: projects/my-projectid/traces/
154
+ # 06796866738c859f2f19b7cfb3214824
155
+ # Corresponds to the JSON property `trace`
156
+ # @return [String]
157
+ attr_accessor :trace
158
+
159
+ # Optional. A set of user-defined (key, value) data that provides additional
160
+ # information about the log entry.
161
+ # Corresponds to the JSON property `labels`
162
+ # @return [Hash<String,String>]
163
+ attr_accessor :labels
164
+
165
+ # Optional. The severity of the log entry. The default value is LogSeverity.
166
+ # DEFAULT.
167
+ # Corresponds to the JSON property `severity`
168
+ # @return [String]
169
+ attr_accessor :severity
170
+
171
+ # Additional information about the source code location that produced the log
172
+ # entry.
173
+ # Corresponds to the JSON property `sourceLocation`
174
+ # @return [Google::Apis::LoggingV2beta1::LogEntrySourceLocation]
175
+ attr_accessor :source_location
176
+
177
+ def initialize(**args)
178
+ update!(**args)
179
+ end
180
+
181
+ # Update properties of this object
182
+ def update!(**args)
183
+ @timestamp = args[:timestamp] if args.key?(:timestamp)
184
+ @log_name = args[:log_name] if args.key?(:log_name)
185
+ @http_request = args[:http_request] if args.key?(:http_request)
186
+ @resource = args[:resource] if args.key?(:resource)
187
+ @json_payload = args[:json_payload] if args.key?(:json_payload)
188
+ @insert_id = args[:insert_id] if args.key?(:insert_id)
189
+ @operation = args[:operation] if args.key?(:operation)
190
+ @text_payload = args[:text_payload] if args.key?(:text_payload)
191
+ @proto_payload = args[:proto_payload] if args.key?(:proto_payload)
192
+ @trace = args[:trace] if args.key?(:trace)
193
+ @labels = args[:labels] if args.key?(:labels)
194
+ @severity = args[:severity] if args.key?(:severity)
195
+ @source_location = args[:source_location] if args.key?(:source_location)
196
+ end
197
+ end
198
+
199
+ # Specifies a location in a source code file.
200
+ class SourceLocation
201
+ include Google::Apis::Core::Hashable
202
+
203
+ # Line within the source file.
204
+ # Corresponds to the JSON property `line`
205
+ # @return [String]
206
+ attr_accessor :line
207
+
208
+ # Source file name. Depending on the runtime environment, this might be a simple
209
+ # name or a fully-qualified name.
210
+ # Corresponds to the JSON property `file`
211
+ # @return [String]
212
+ attr_accessor :file
213
+
214
+ # Human-readable name of the function or method being invoked, with optional
215
+ # context such as the class or package name. This information is used in
216
+ # contexts such as the logs viewer, where a file and line number are less
217
+ # meaningful. The format can vary by language. For example: qual.if.ied.Class.
218
+ # method (Java), dir/package.func (Go), function (Python).
219
+ # Corresponds to the JSON property `functionName`
220
+ # @return [String]
221
+ attr_accessor :function_name
222
+
223
+ def initialize(**args)
224
+ update!(**args)
225
+ end
226
+
227
+ # Update properties of this object
228
+ def update!(**args)
229
+ @line = args[:line] if args.key?(:line)
230
+ @file = args[:file] if args.key?(:file)
231
+ @function_name = args[:function_name] if args.key?(:function_name)
232
+ end
233
+ end
234
+
235
+ # The parameters to ListLogEntries.
236
+ class ListLogEntriesRequest
237
+ include Google::Apis::Core::Hashable
46
238
 
47
239
  # Deprecated. Use resource_names instead. One or more project identifiers or
48
240
  # project numbers from which to retrieve log entries. Example: "my-project-1A".
@@ -76,18 +268,36 @@ module Google
76
268
  # @return [Fixnum]
77
269
  attr_accessor :page_size
78
270
 
271
+ # Optional. How the results should be sorted. Presently, the only permitted
272
+ # values are "timestamp asc" (default) and "timestamp desc". The first option
273
+ # returns entries in order of increasing values of LogEntry.timestamp (oldest
274
+ # first), and the second option returns entries in order of decreasing
275
+ # timestamps (newest first). Entries with equal timestamps are returned in order
276
+ # of LogEntry.insertId.
277
+ # Corresponds to the JSON property `orderBy`
278
+ # @return [String]
279
+ attr_accessor :order_by
280
+
281
+ # Required. Names of one or more resources from which to retrieve log entries:
282
+ # "projects/[PROJECT_ID]"
283
+ # "organizations/[ORGANIZATION_ID]"
284
+ # Projects listed in the project_ids field are added to this list.
285
+ # Corresponds to the JSON property `resourceNames`
286
+ # @return [Array<String>]
287
+ attr_accessor :resource_names
288
+
79
289
  def initialize(**args)
80
290
  update!(**args)
81
291
  end
82
292
 
83
293
  # Update properties of this object
84
294
  def update!(**args)
85
- @order_by = args[:order_by] if args.key?(:order_by)
86
- @resource_names = args[:resource_names] if args.key?(:resource_names)
87
295
  @project_ids = args[:project_ids] if args.key?(:project_ids)
88
296
  @filter = args[:filter] if args.key?(:filter)
89
297
  @page_token = args[:page_token] if args.key?(:page_token)
90
298
  @page_size = args[:page_size] if args.key?(:page_size)
299
+ @order_by = args[:order_by] if args.key?(:order_by)
300
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
91
301
  end
92
302
  end
93
303
 
@@ -96,6 +306,38 @@ module Google
96
306
  class RequestLog
97
307
  include Google::Apis::Core::Hashable
98
308
 
309
+ # The logged-in user who made the request.Most likely, this is the part of the
310
+ # user's email before the @ sign. The field value is the same for different
311
+ # requests from the same user, but different users can have similar names. This
312
+ # information is also available to the application via the App Engine Users API.
313
+ # This field will be populated starting with App Engine 1.9.21.
314
+ # Corresponds to the JSON property `nickname`
315
+ # @return [String]
316
+ attr_accessor :nickname
317
+
318
+ # HTTP response status code. Example: 200, 404.
319
+ # Corresponds to the JSON property `status`
320
+ # @return [Fixnum]
321
+ attr_accessor :status
322
+
323
+ # Contains the path and query portion of the URL that was requested. For example,
324
+ # if the URL was "http://example.com/app?name=val", the resource would be "/app?
325
+ # name=val". The fragment identifier, which is identified by the # character, is
326
+ # not included.
327
+ # Corresponds to the JSON property `resource`
328
+ # @return [String]
329
+ attr_accessor :resource
330
+
331
+ # Time this request spent in the pending request queue.
332
+ # Corresponds to the JSON property `pendingTime`
333
+ # @return [String]
334
+ attr_accessor :pending_time
335
+
336
+ # Task name of the request, in the case of an offline request.
337
+ # Corresponds to the JSON property `taskName`
338
+ # @return [String]
339
+ attr_accessor :task_name
340
+
99
341
  # File or class that handled the request.
100
342
  # Corresponds to the JSON property `urlMapEntry`
101
343
  # @return [String]
@@ -241,44 +483,17 @@ module Google
241
483
  # @return [String]
242
484
  attr_accessor :request_id
243
485
 
244
- # The logged-in user who made the request.Most likely, this is the part of the
245
- # user's email before the @ sign. The field value is the same for different
246
- # requests from the same user, but different users can have similar names. This
247
- # information is also available to the application via the App Engine Users API.
248
- # This field will be populated starting with App Engine 1.9.21.
249
- # Corresponds to the JSON property `nickname`
250
- # @return [String]
251
- attr_accessor :nickname
252
-
253
- # HTTP response status code. Example: 200, 404.
254
- # Corresponds to the JSON property `status`
255
- # @return [Fixnum]
256
- attr_accessor :status
257
-
258
- # Contains the path and query portion of the URL that was requested. For example,
259
- # if the URL was "http://example.com/app?name=val", the resource would be "/app?
260
- # name=val". The fragment identifier, which is identified by the # character, is
261
- # not included.
262
- # Corresponds to the JSON property `resource`
263
- # @return [String]
264
- attr_accessor :resource
265
-
266
- # Time this request spent in the pending request queue.
267
- # Corresponds to the JSON property `pendingTime`
268
- # @return [String]
269
- attr_accessor :pending_time
270
-
271
- # Task name of the request, in the case of an offline request.
272
- # Corresponds to the JSON property `taskName`
273
- # @return [String]
274
- attr_accessor :task_name
275
-
276
486
  def initialize(**args)
277
487
  update!(**args)
278
488
  end
279
489
 
280
490
  # Update properties of this object
281
491
  def update!(**args)
492
+ @nickname = args[:nickname] if args.key?(:nickname)
493
+ @status = args[:status] if args.key?(:status)
494
+ @resource = args[:resource] if args.key?(:resource)
495
+ @pending_time = args[:pending_time] if args.key?(:pending_time)
496
+ @task_name = args[:task_name] if args.key?(:task_name)
282
497
  @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry)
283
498
  @instance_index = args[:instance_index] if args.key?(:instance_index)
284
499
  @host = args[:host] if args.key?(:host)
@@ -306,11 +521,6 @@ module Google
306
521
  @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name)
307
522
  @referrer = args[:referrer] if args.key?(:referrer)
308
523
  @request_id = args[:request_id] if args.key?(:request_id)
309
- @nickname = args[:nickname] if args.key?(:nickname)
310
- @status = args[:status] if args.key?(:status)
311
- @resource = args[:resource] if args.key?(:resource)
312
- @pending_time = args[:pending_time] if args.key?(:pending_time)
313
- @task_name = args[:task_name] if args.key?(:task_name)
314
524
  end
315
525
  end
316
526
 
@@ -374,13 +584,6 @@ module Google
374
584
  class LogMetric
375
585
  include Google::Apis::Core::Hashable
376
586
 
377
- # Required. An advanced logs filter which is used to match log entries. Example:
378
- # "resource.type=gae_app AND severity>=ERROR"
379
- # The maximum length of the filter is 20000 characters.
380
- # Corresponds to the JSON property `filter`
381
- # @return [String]
382
- attr_accessor :filter
383
-
384
587
  # Required. The client-assigned metric identifier. Examples: "error_count", "
385
588
  # nginx/requests".Metric identifiers are limited to 100 characters and can
386
589
  # include only the following characters: A-Z, a-z, 0-9, and the special
@@ -406,29 +609,23 @@ module Google
406
609
  # @return [String]
407
610
  attr_accessor :version
408
611
 
612
+ # Required. An advanced logs filter which is used to match log entries. Example:
613
+ # "resource.type=gae_app AND severity>=ERROR"
614
+ # The maximum length of the filter is 20000 characters.
615
+ # Corresponds to the JSON property `filter`
616
+ # @return [String]
617
+ attr_accessor :filter
618
+
409
619
  def initialize(**args)
410
620
  update!(**args)
411
621
  end
412
622
 
413
623
  # Update properties of this object
414
624
  def update!(**args)
415
- @filter = args[:filter] if args.key?(:filter)
416
625
  @name = args[:name] if args.key?(:name)
417
626
  @description = args[:description] if args.key?(:description)
418
627
  @version = args[:version] if args.key?(:version)
419
- end
420
- end
421
-
422
- # Result returned from WriteLogEntries. empty
423
- class WriteLogEntriesResponse
424
- include Google::Apis::Core::Hashable
425
-
426
- def initialize(**args)
427
- update!(**args)
428
- end
429
-
430
- # Update properties of this object
431
- def update!(**args)
628
+ @filter = args[:filter] if args.key?(:filter)
432
629
  end
433
630
  end
434
631
 
@@ -475,6 +672,19 @@ module Google
475
672
  end
476
673
  end
477
674
 
675
+ # Result returned from WriteLogEntries. empty
676
+ class WriteLogEntriesResponse
677
+ include Google::Apis::Core::Hashable
678
+
679
+ def initialize(**args)
680
+ update!(**args)
681
+ end
682
+
683
+ # Update properties of this object
684
+ def update!(**args)
685
+ end
686
+ end
687
+
478
688
  # An object representing a resource that can be used for monitoring, logging,
479
689
  # billing, or other purposes. Examples include virtual machine instances,
480
690
  # databases, and storage devices such as disks. The type field identifies a
@@ -490,13 +700,6 @@ module Google
490
700
  class MonitoredResource
491
701
  include Google::Apis::Core::Hashable
492
702
 
493
- # Required. The monitored resource type. This field must match the type field of
494
- # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL
495
- # database is "cloudsql_database".
496
- # Corresponds to the JSON property `type`
497
- # @return [String]
498
- attr_accessor :type
499
-
500
703
  # Required. Values for all of the labels listed in the associated monitored
501
704
  # resource descriptor. For example, Cloud SQL databases use the labels "
502
705
  # database_id" and "zone".
@@ -504,14 +707,107 @@ module Google
504
707
  # @return [Hash<String,String>]
505
708
  attr_accessor :labels
506
709
 
710
+ # Required. The monitored resource type. This field must match the type field of
711
+ # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL
712
+ # database is "cloudsql_database".
713
+ # Corresponds to the JSON property `type`
714
+ # @return [String]
715
+ attr_accessor :type
716
+
507
717
  def initialize(**args)
508
718
  update!(**args)
509
719
  end
510
720
 
511
721
  # Update properties of this object
512
722
  def update!(**args)
513
- @type = args[:type] if args.key?(:type)
514
723
  @labels = args[:labels] if args.key?(:labels)
724
+ @type = args[:type] if args.key?(:type)
725
+ end
726
+ end
727
+
728
+ # Describes a sink used to export log entries to one of the following
729
+ # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
730
+ # Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
731
+ # The sink must be created within a project or organization.
732
+ class LogSink
733
+ include Google::Apis::Core::Hashable
734
+
735
+ # Optional. The log entry format to use for this sink's exported log entries.
736
+ # The v2 format is used by default. The v1 format is deprecated and should be
737
+ # used only as part of a migration effort to v2. See Migration to the v2 API.
738
+ # Corresponds to the JSON property `outputVersionFormat`
739
+ # @return [String]
740
+ attr_accessor :output_version_format
741
+
742
+ # Required. The client-assigned sink identifier, unique within the project.
743
+ # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100
744
+ # characters and can include only the following characters: upper and lower-case
745
+ # alphanumeric characters, underscores, hyphens, and periods.
746
+ # Corresponds to the JSON property `name`
747
+ # @return [String]
748
+ attr_accessor :name
749
+
750
+ # Required. The export destination:
751
+ # "storage.googleapis.com/[GCS_BUCKET]"
752
+ # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
753
+ # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
754
+ # The sink's writer_identity, set when the sink is created, must have permission
755
+ # to write to the destination or else the log entries are not exported. For more
756
+ # information, see Exporting Logs With Sinks.
757
+ # Corresponds to the JSON property `destination`
758
+ # @return [String]
759
+ attr_accessor :destination
760
+
761
+ # Optional. An advanced logs filter. The only exported log entries are those
762
+ # that are in the resource owning the sink and that match the filter. The filter
763
+ # must use the log entry format specified by the output_version_format parameter.
764
+ # For example, in the v2 format:
765
+ # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
766
+ # Corresponds to the JSON property `filter`
767
+ # @return [String]
768
+ attr_accessor :filter
769
+
770
+ # Optional. The time at which this sink will stop exporting log entries. Log
771
+ # entries are exported only if their timestamp is earlier than the end time. If
772
+ # this field is not supplied, there is no end time. If both a start time and an
773
+ # end time are provided, then the end time must be later than the start time.
774
+ # Corresponds to the JSON property `endTime`
775
+ # @return [String]
776
+ attr_accessor :end_time
777
+
778
+ # Optional. The time at which this sink will begin exporting log entries. Log
779
+ # entries are exported only if their timestamp is not earlier than the start
780
+ # time. The default value of this field is the time the sink is created or
781
+ # updated.
782
+ # Corresponds to the JSON property `startTime`
783
+ # @return [String]
784
+ attr_accessor :start_time
785
+
786
+ # Output only. An IAM identity&mdash;a service account or group&mdash;under
787
+ # which Stackdriver Logging writes the exported log entries to the sink's
788
+ # destination. This field is set by sinks.create and sinks.update, based on the
789
+ # setting of unique_writer_identity in those methods.Until you grant this
790
+ # identity write-access to the destination, log entry exports from this sink
791
+ # will fail. For more information, see Granting access for a resource. Consult
792
+ # the destination service's documentation to determine the appropriate IAM roles
793
+ # to assign to the identity.
794
+ # Corresponds to the JSON property `writerIdentity`
795
+ # @return [String]
796
+ attr_accessor :writer_identity
797
+
798
+ def initialize(**args)
799
+ update!(**args)
800
+ end
801
+
802
+ # Update properties of this object
803
+ def update!(**args)
804
+ @output_version_format = args[:output_version_format] if args.key?(:output_version_format)
805
+ @name = args[:name] if args.key?(:name)
806
+ @destination = args[:destination] if args.key?(:destination)
807
+ @filter = args[:filter] if args.key?(:filter)
808
+ @end_time = args[:end_time] if args.key?(:end_time)
809
+ @start_time = args[:start_time] if args.key?(:start_time)
810
+ @writer_identity = args[:writer_identity] if args.key?(:writer_identity)
515
811
  end
516
812
  end
517
813
 
@@ -587,96 +883,16 @@ module Google
587
883
  end
588
884
  end
589
885
 
590
- # Describes a sink used to export log entries to one of the following
591
- # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
592
- # Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
593
- # The sink must be created within a project or organization.
594
- class LogSink
595
- include Google::Apis::Core::Hashable
596
-
597
- # Optional. The time at which this sink will begin exporting log entries. Log
598
- # entries are exported only if their timestamp is not earlier than the start
599
- # time. The default value of this field is the time the sink is created or
600
- # updated.
601
- # Corresponds to the JSON property `startTime`
602
- # @return [String]
603
- attr_accessor :start_time
604
-
605
- # Output only. An IAM identity&mdash;a service account or group&mdash;under
606
- # which Stackdriver Logging writes the exported log entries to the sink's
607
- # destination. This field is set by sinks.create and sinks.update, based on the
608
- # setting of unique_writer_identity in those methods.Until you grant this
609
- # identity write-access to the destination, log entry exports from this sink
610
- # will fail. For more information, see Granting access for a resource. Consult
611
- # the destination service's documentation to determine the appropriate IAM roles
612
- # to assign to the identity.
613
- # Corresponds to the JSON property `writerIdentity`
614
- # @return [String]
615
- attr_accessor :writer_identity
616
-
617
- # Optional. The log entry format to use for this sink's exported log entries.
618
- # The v2 format is used by default. The v1 format is deprecated and should be
619
- # used only as part of a migration effort to v2. See Migration to the v2 API.
620
- # Corresponds to the JSON property `outputVersionFormat`
621
- # @return [String]
622
- attr_accessor :output_version_format
623
-
624
- # Required. The client-assigned sink identifier, unique within the project.
625
- # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100
626
- # characters and can include only the following characters: upper and lower-case
627
- # alphanumeric characters, underscores, hyphens, and periods.
628
- # Corresponds to the JSON property `name`
629
- # @return [String]
630
- attr_accessor :name
631
-
632
- # Required. The export destination:
633
- # "storage.googleapis.com/[GCS_BUCKET]"
634
- # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
635
- # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
636
- # The sink's writer_identity, set when the sink is created, must have permission
637
- # to write to the destination or else the log entries are not exported. For more
638
- # information, see Exporting Logs With Sinks.
639
- # Corresponds to the JSON property `destination`
640
- # @return [String]
641
- attr_accessor :destination
642
-
643
- # Optional. An advanced logs filter. The only exported log entries are those
644
- # that are in the resource owning the sink and that match the filter. The filter
645
- # must use the log entry format specified by the output_version_format parameter.
646
- # For example, in the v2 format:
647
- # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
648
- # Corresponds to the JSON property `filter`
649
- # @return [String]
650
- attr_accessor :filter
651
-
652
- # Optional. The time at which this sink will stop exporting log entries. Log
653
- # entries are exported only if their timestamp is earlier than the end time. If
654
- # this field is not supplied, there is no end time. If both a start time and an
655
- # end time are provided, then the end time must be later than the start time.
656
- # Corresponds to the JSON property `endTime`
657
- # @return [String]
658
- attr_accessor :end_time
659
-
660
- def initialize(**args)
661
- update!(**args)
662
- end
663
-
664
- # Update properties of this object
665
- def update!(**args)
666
- @start_time = args[:start_time] if args.key?(:start_time)
667
- @writer_identity = args[:writer_identity] if args.key?(:writer_identity)
668
- @output_version_format = args[:output_version_format] if args.key?(:output_version_format)
669
- @name = args[:name] if args.key?(:name)
670
- @destination = args[:destination] if args.key?(:destination)
671
- @filter = args[:filter] if args.key?(:filter)
672
- @end_time = args[:end_time] if args.key?(:end_time)
673
- end
674
- end
675
-
676
886
  # Result returned from ListLogs.
677
887
  class ListLogsResponse
678
888
  include Google::Apis::Core::Hashable
679
889
 
890
+ # A list of log names. For example, "projects/my-project/syslog" or "
891
+ # organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
892
+ # Corresponds to the JSON property `logNames`
893
+ # @return [Array<String>]
894
+ attr_accessor :log_names
895
+
680
896
  # If there might be more results than those appearing in this response, then
681
897
  # nextPageToken is included. To get the next set of results, call this method
682
898
  # again using the value of nextPageToken as pageToken.
@@ -684,20 +900,14 @@ module Google
684
900
  # @return [String]
685
901
  attr_accessor :next_page_token
686
902
 
687
- # A list of log names. For example, "projects/my-project/syslog" or "
688
- # organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
689
- # Corresponds to the JSON property `logNames`
690
- # @return [Array<String>]
691
- attr_accessor :log_names
692
-
693
903
  def initialize(**args)
694
904
  update!(**args)
695
905
  end
696
906
 
697
907
  # Update properties of this object
698
908
  def update!(**args)
699
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
700
909
  @log_names = args[:log_names] if args.key?(:log_names)
910
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
701
911
  end
702
912
  end
703
913
 
@@ -734,29 +944,6 @@ module Google
734
944
  class HttpRequest
735
945
  include Google::Apis::Core::Hashable
736
946
 
737
- # The request processing latency on the server, from the time the request was
738
- # received until the response was sent.
739
- # Corresponds to the JSON property `latency`
740
- # @return [String]
741
- attr_accessor :latency
742
-
743
- # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0;
744
- # Windows 98; Q312461; .NET CLR 1.0.3705)".
745
- # Corresponds to the JSON property `userAgent`
746
- # @return [String]
747
- attr_accessor :user_agent
748
-
749
- # The number of HTTP response bytes inserted into cache. Set only when a cache
750
- # fill was attempted.
751
- # Corresponds to the JSON property `cacheFillBytes`
752
- # @return [String]
753
- attr_accessor :cache_fill_bytes
754
-
755
- # The request method. Examples: "GET", "HEAD", "PUT", "POST".
756
- # Corresponds to the JSON property `requestMethod`
757
- # @return [String]
758
- attr_accessor :request_method
759
-
760
947
  # The size of the HTTP request message in bytes, including the request headers
761
948
  # and the request body.
762
949
  # Corresponds to the JSON property `requestSize`
@@ -811,11 +998,34 @@ module Google
811
998
  # @return [Fixnum]
812
999
  attr_accessor :status
813
1000
 
814
- # The referer URL of the request, as defined in HTTP/1.1 Header Field
815
- # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
816
- # Corresponds to the JSON property `referer`
1001
+ # The referer URL of the request, as defined in HTTP/1.1 Header Field
1002
+ # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
1003
+ # Corresponds to the JSON property `referer`
1004
+ # @return [String]
1005
+ attr_accessor :referer
1006
+
1007
+ # The request processing latency on the server, from the time the request was
1008
+ # received until the response was sent.
1009
+ # Corresponds to the JSON property `latency`
1010
+ # @return [String]
1011
+ attr_accessor :latency
1012
+
1013
+ # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0;
1014
+ # Windows 98; Q312461; .NET CLR 1.0.3705)".
1015
+ # Corresponds to the JSON property `userAgent`
1016
+ # @return [String]
1017
+ attr_accessor :user_agent
1018
+
1019
+ # The number of HTTP response bytes inserted into cache. Set only when a cache
1020
+ # fill was attempted.
1021
+ # Corresponds to the JSON property `cacheFillBytes`
817
1022
  # @return [String]
818
- attr_accessor :referer
1023
+ attr_accessor :cache_fill_bytes
1024
+
1025
+ # The request method. Examples: "GET", "HEAD", "PUT", "POST".
1026
+ # Corresponds to the JSON property `requestMethod`
1027
+ # @return [String]
1028
+ attr_accessor :request_method
819
1029
 
820
1030
  def initialize(**args)
821
1031
  update!(**args)
@@ -823,10 +1033,6 @@ module Google
823
1033
 
824
1034
  # Update properties of this object
825
1035
  def update!(**args)
826
- @latency = args[:latency] if args.key?(:latency)
827
- @user_agent = args[:user_agent] if args.key?(:user_agent)
828
- @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes)
829
- @request_method = args[:request_method] if args.key?(:request_method)
830
1036
  @request_size = args[:request_size] if args.key?(:request_size)
831
1037
  @response_size = args[:response_size] if args.key?(:response_size)
832
1038
  @request_url = args[:request_url] if args.key?(:request_url)
@@ -837,6 +1043,10 @@ module Google
837
1043
  @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server)
838
1044
  @status = args[:status] if args.key?(:status)
839
1045
  @referer = args[:referer] if args.key?(:referer)
1046
+ @latency = args[:latency] if args.key?(:latency)
1047
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
1048
+ @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes)
1049
+ @request_method = args[:request_method] if args.key?(:request_method)
840
1050
  end
841
1051
  end
842
1052
 
@@ -844,11 +1054,6 @@ module Google
844
1054
  class LabelDescriptor
845
1055
  include Google::Apis::Core::Hashable
846
1056
 
847
- # The label key.
848
- # Corresponds to the JSON property `key`
849
- # @return [String]
850
- attr_accessor :key
851
-
852
1057
  # A human-readable description for the label.
853
1058
  # Corresponds to the JSON property `description`
854
1059
  # @return [String]
@@ -859,15 +1064,20 @@ module Google
859
1064
  # @return [String]
860
1065
  attr_accessor :value_type
861
1066
 
1067
+ # The label key.
1068
+ # Corresponds to the JSON property `key`
1069
+ # @return [String]
1070
+ attr_accessor :key
1071
+
862
1072
  def initialize(**args)
863
1073
  update!(**args)
864
1074
  end
865
1075
 
866
1076
  # Update properties of this object
867
1077
  def update!(**args)
868
- @key = args[:key] if args.key?(:key)
869
1078
  @description = args[:description] if args.key?(:description)
870
1079
  @value_type = args[:value_type] if args.key?(:value_type)
1080
+ @key = args[:key] if args.key?(:key)
871
1081
  end
872
1082
  end
873
1083
 
@@ -974,6 +1184,11 @@ module Google
974
1184
  class ListLogEntriesResponse
975
1185
  include Google::Apis::Core::Hashable
976
1186
 
1187
+ # A list of log entries.
1188
+ # Corresponds to the JSON property `entries`
1189
+ # @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
1190
+ attr_accessor :entries
1191
+
977
1192
  # If there might be more results than those appearing in this response, then
978
1193
  # nextPageToken is included. To get the next set of results, call this method
979
1194
  # again using the value of nextPageToken as pageToken.If a value for
@@ -987,19 +1202,14 @@ module Google
987
1202
  # @return [String]
988
1203
  attr_accessor :next_page_token
989
1204
 
990
- # A list of log entries.
991
- # Corresponds to the JSON property `entries`
992
- # @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
993
- attr_accessor :entries
994
-
995
1205
  def initialize(**args)
996
1206
  update!(**args)
997
1207
  end
998
1208
 
999
1209
  # Update properties of this object
1000
1210
  def update!(**args)
1001
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1002
1211
  @entries = args[:entries] if args.key?(:entries)
1212
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1003
1213
  end
1004
1214
  end
1005
1215
 
@@ -1039,216 +1249,6 @@ module Google
1039
1249
  @time = args[:time] if args.key?(:time)
1040
1250
  end
1041
1251
  end
1042
-
1043
- # Result returned from ListLogMetrics.
1044
- class ListLogMetricsResponse
1045
- include Google::Apis::Core::Hashable
1046
-
1047
- # A list of logs-based metrics.
1048
- # Corresponds to the JSON property `metrics`
1049
- # @return [Array<Google::Apis::LoggingV2beta1::LogMetric>]
1050
- attr_accessor :metrics
1051
-
1052
- # If there might be more results than appear in this response, then
1053
- # nextPageToken is included. To get the next set of results, call this method
1054
- # again using the value of nextPageToken as pageToken.
1055
- # Corresponds to the JSON property `nextPageToken`
1056
- # @return [String]
1057
- attr_accessor :next_page_token
1058
-
1059
- def initialize(**args)
1060
- update!(**args)
1061
- end
1062
-
1063
- # Update properties of this object
1064
- def update!(**args)
1065
- @metrics = args[:metrics] if args.key?(:metrics)
1066
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1067
- end
1068
- end
1069
-
1070
- # A generic empty message that you can re-use to avoid defining duplicated empty
1071
- # messages in your APIs. A typical example is to use it as the request or the
1072
- # response type of an API method. For instance:
1073
- # service Foo `
1074
- # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1075
- # `
1076
- # The JSON representation for Empty is empty JSON object ``.
1077
- class Empty
1078
- include Google::Apis::Core::Hashable
1079
-
1080
- def initialize(**args)
1081
- update!(**args)
1082
- end
1083
-
1084
- # Update properties of this object
1085
- def update!(**args)
1086
- end
1087
- end
1088
-
1089
- # An individual entry in a log.
1090
- class LogEntry
1091
- include Google::Apis::Core::Hashable
1092
-
1093
- # Optional. The time the event described by the log entry occurred. If omitted,
1094
- # Stackdriver Logging will use the time the log entry is received.
1095
- # Corresponds to the JSON property `timestamp`
1096
- # @return [String]
1097
- attr_accessor :timestamp
1098
-
1099
- # Required. The resource name of the log to which this log entry belongs:
1100
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
1101
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
1102
- # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/
1103
- # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must
1104
- # be less than 512 characters long and can only include the following characters:
1105
- # upper and lower case alphanumeric characters, forward-slash, underscore,
1106
- # hyphen, and period.For backward compatibility, if log_name begins with a
1107
- # forward-slash, such as /projects/..., then the log entry is ingested as usual
1108
- # but the forward-slash is removed. Listing the log entry will not show the
1109
- # leading slash and filtering for a log name with a leading slash will never
1110
- # return any results.
1111
- # Corresponds to the JSON property `logName`
1112
- # @return [String]
1113
- attr_accessor :log_name
1114
-
1115
- # A common proto for logging HTTP requests. Only contains semantics defined by
1116
- # the HTTP specification. Product-specific logging information MUST be defined
1117
- # in a separate message.
1118
- # Corresponds to the JSON property `httpRequest`
1119
- # @return [Google::Apis::LoggingV2beta1::HttpRequest]
1120
- attr_accessor :http_request
1121
-
1122
- # An object representing a resource that can be used for monitoring, logging,
1123
- # billing, or other purposes. Examples include virtual machine instances,
1124
- # databases, and storage devices such as disks. The type field identifies a
1125
- # MonitoredResourceDescriptor object that describes the resource's schema.
1126
- # Information in the labels field identifies the actual resource and its
1127
- # attributes according to the schema. For example, a particular Compute Engine
1128
- # VM instance could be represented by the following object, because the
1129
- # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
1130
- # zone":
1131
- # ` "type": "gce_instance",
1132
- # "labels": ` "instance_id": "12345678901234",
1133
- # "zone": "us-central1-a" ``
1134
- # Corresponds to the JSON property `resource`
1135
- # @return [Google::Apis::LoggingV2beta1::MonitoredResource]
1136
- attr_accessor :resource
1137
-
1138
- # The log entry payload, represented as a structure that is expressed as a JSON
1139
- # object.
1140
- # Corresponds to the JSON property `jsonPayload`
1141
- # @return [Hash<String,Object>]
1142
- attr_accessor :json_payload
1143
-
1144
- # Optional. A unique ID for the log entry. If you provide this field, the
1145
- # logging service considers other log entries in the same project with the same
1146
- # ID as duplicates which can be removed. If omitted, Stackdriver Logging will
1147
- # generate a unique ID for this log entry.
1148
- # Corresponds to the JSON property `insertId`
1149
- # @return [String]
1150
- attr_accessor :insert_id
1151
-
1152
- # Additional information about a potentially long-running operation with which a
1153
- # log entry is associated.
1154
- # Corresponds to the JSON property `operation`
1155
- # @return [Google::Apis::LoggingV2beta1::LogEntryOperation]
1156
- attr_accessor :operation
1157
-
1158
- # The log entry payload, represented as a Unicode string (UTF-8).
1159
- # Corresponds to the JSON property `textPayload`
1160
- # @return [String]
1161
- attr_accessor :text_payload
1162
-
1163
- # The log entry payload, represented as a protocol buffer. Some Google Cloud
1164
- # Platform services use this field for their log entry payloads.
1165
- # Corresponds to the JSON property `protoPayload`
1166
- # @return [Hash<String,Object>]
1167
- attr_accessor :proto_payload
1168
-
1169
- # Optional. Resource name of the trace associated with the log entry, if any. If
1170
- # it contains a relative resource name, the name is assumed to be relative to //
1171
- # tracing.googleapis.com. Example: projects/my-projectid/traces/
1172
- # 06796866738c859f2f19b7cfb3214824
1173
- # Corresponds to the JSON property `trace`
1174
- # @return [String]
1175
- attr_accessor :trace
1176
-
1177
- # Optional. A set of user-defined (key, value) data that provides additional
1178
- # information about the log entry.
1179
- # Corresponds to the JSON property `labels`
1180
- # @return [Hash<String,String>]
1181
- attr_accessor :labels
1182
-
1183
- # Optional. The severity of the log entry. The default value is LogSeverity.
1184
- # DEFAULT.
1185
- # Corresponds to the JSON property `severity`
1186
- # @return [String]
1187
- attr_accessor :severity
1188
-
1189
- # Additional information about the source code location that produced the log
1190
- # entry.
1191
- # Corresponds to the JSON property `sourceLocation`
1192
- # @return [Google::Apis::LoggingV2beta1::LogEntrySourceLocation]
1193
- attr_accessor :source_location
1194
-
1195
- def initialize(**args)
1196
- update!(**args)
1197
- end
1198
-
1199
- # Update properties of this object
1200
- def update!(**args)
1201
- @timestamp = args[:timestamp] if args.key?(:timestamp)
1202
- @log_name = args[:log_name] if args.key?(:log_name)
1203
- @http_request = args[:http_request] if args.key?(:http_request)
1204
- @resource = args[:resource] if args.key?(:resource)
1205
- @json_payload = args[:json_payload] if args.key?(:json_payload)
1206
- @insert_id = args[:insert_id] if args.key?(:insert_id)
1207
- @operation = args[:operation] if args.key?(:operation)
1208
- @text_payload = args[:text_payload] if args.key?(:text_payload)
1209
- @proto_payload = args[:proto_payload] if args.key?(:proto_payload)
1210
- @trace = args[:trace] if args.key?(:trace)
1211
- @labels = args[:labels] if args.key?(:labels)
1212
- @severity = args[:severity] if args.key?(:severity)
1213
- @source_location = args[:source_location] if args.key?(:source_location)
1214
- end
1215
- end
1216
-
1217
- # Specifies a location in a source code file.
1218
- class SourceLocation
1219
- include Google::Apis::Core::Hashable
1220
-
1221
- # Source file name. Depending on the runtime environment, this might be a simple
1222
- # name or a fully-qualified name.
1223
- # Corresponds to the JSON property `file`
1224
- # @return [String]
1225
- attr_accessor :file
1226
-
1227
- # Human-readable name of the function or method being invoked, with optional
1228
- # context such as the class or package name. This information is used in
1229
- # contexts such as the logs viewer, where a file and line number are less
1230
- # meaningful. The format can vary by language. For example: qual.if.ied.Class.
1231
- # method (Java), dir/package.func (Go), function (Python).
1232
- # Corresponds to the JSON property `functionName`
1233
- # @return [String]
1234
- attr_accessor :function_name
1235
-
1236
- # Line within the source file.
1237
- # Corresponds to the JSON property `line`
1238
- # @return [String]
1239
- attr_accessor :line
1240
-
1241
- def initialize(**args)
1242
- update!(**args)
1243
- end
1244
-
1245
- # Update properties of this object
1246
- def update!(**args)
1247
- @file = args[:file] if args.key?(:file)
1248
- @function_name = args[:function_name] if args.key?(:function_name)
1249
- @line = args[:line] if args.key?(:line)
1250
- end
1251
- end
1252
1252
  end
1253
1253
  end
1254
1254
  end