google-api-client 0.13.4 → 0.13.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -0
  3. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  4. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +4 -3
  5. data/generated/google/apis/admin_directory_v1.rb +1 -1
  6. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  7. data/generated/google/apis/androiddeviceprovisioning_v1.rb +1 -1
  8. data/generated/google/apis/androiddeviceprovisioning_v1/classes.rb +1 -1
  9. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  10. data/generated/google/apis/androidenterprise_v1/classes.rb +33 -0
  11. data/generated/google/apis/androidenterprise_v1/representations.rb +16 -0
  12. data/generated/google/apis/androidenterprise_v1/service.rb +1 -1
  13. data/generated/google/apis/androidpublisher_v1_1.rb +1 -1
  14. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  15. data/generated/google/apis/bigquery_v2.rb +1 -1
  16. data/generated/google/apis/bigquery_v2/classes.rb +10 -1
  17. data/generated/google/apis/bigquery_v2/representations.rb +1 -0
  18. data/generated/google/apis/cloudkms_v1.rb +1 -1
  19. data/generated/google/apis/cloudkms_v1/classes.rb +6 -253
  20. data/generated/google/apis/cloudkms_v1/representations.rb +1 -99
  21. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  22. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1 -1
  23. data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
  24. data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +1 -1
  25. data/generated/google/apis/cloudtrace_v2.rb +1 -1
  26. data/generated/google/apis/cloudtrace_v2/classes.rb +12 -6
  27. data/generated/google/apis/cloudtrace_v2/representations.rb +2 -1
  28. data/generated/google/apis/container_v1.rb +1 -1
  29. data/generated/google/apis/container_v1/classes.rb +72 -15
  30. data/generated/google/apis/container_v1/representations.rb +7 -0
  31. data/generated/google/apis/container_v1beta1.rb +1 -1
  32. data/generated/google/apis/container_v1beta1/classes.rb +58 -15
  33. data/generated/google/apis/container_v1beta1/representations.rb +5 -0
  34. data/generated/google/apis/content_v2.rb +1 -1
  35. data/generated/google/apis/content_v2/classes.rb +16 -0
  36. data/generated/google/apis/content_v2/representations.rb +3 -0
  37. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  38. data/generated/google/apis/dataflow_v1b3/classes.rb +87 -0
  39. data/generated/google/apis/dataflow_v1b3/representations.rb +46 -0
  40. data/generated/google/apis/datastore_v1beta1.rb +38 -0
  41. data/generated/google/apis/datastore_v1beta1/classes.rb +567 -0
  42. data/generated/google/apis/datastore_v1beta1/representations.rb +191 -0
  43. data/generated/google/apis/datastore_v1beta1/service.rb +137 -0
  44. data/generated/google/apis/deploymentmanager_v2beta/service.rb +1 -1
  45. data/generated/google/apis/dlp_v2beta1.rb +1 -1
  46. data/generated/google/apis/dlp_v2beta1/classes.rb +1 -1
  47. data/generated/google/apis/dlp_v2beta1/service.rb +142 -7
  48. data/generated/google/apis/dns_v2beta1.rb +1 -1
  49. data/generated/google/apis/drive_v2.rb +1 -1
  50. data/generated/google/apis/drive_v2/classes.rb +6 -0
  51. data/generated/google/apis/drive_v2/representations.rb +1 -0
  52. data/generated/google/apis/drive_v2/service.rb +6 -6
  53. data/generated/google/apis/drive_v3.rb +1 -1
  54. data/generated/google/apis/drive_v3/classes.rb +6 -0
  55. data/generated/google/apis/drive_v3/representations.rb +1 -0
  56. data/generated/google/apis/drive_v3/service.rb +6 -6
  57. data/generated/google/apis/firebaseremoteconfig_v1.rb +32 -0
  58. data/generated/google/apis/firebaseremoteconfig_v1/classes.rb +180 -0
  59. data/generated/google/apis/firebaseremoteconfig_v1/representations.rb +87 -0
  60. data/generated/google/apis/firebaseremoteconfig_v1/service.rb +153 -0
  61. data/generated/google/apis/games_management_v1management.rb +1 -1
  62. data/generated/google/apis/gmail_v1.rb +1 -1
  63. data/generated/google/apis/logging_v2.rb +1 -1
  64. data/generated/google/apis/logging_v2/classes.rb +444 -18
  65. data/generated/google/apis/logging_v2/representations.rb +119 -0
  66. data/generated/google/apis/logging_v2/service.rb +808 -1
  67. data/generated/google/apis/logging_v2beta1.rb +1 -1
  68. data/generated/google/apis/logging_v2beta1/classes.rb +367 -18
  69. data/generated/google/apis/logging_v2beta1/representations.rb +88 -0
  70. data/generated/google/apis/logging_v2beta1/service.rb +4 -1
  71. data/generated/google/apis/ml_v1.rb +1 -1
  72. data/generated/google/apis/ml_v1/classes.rb +1 -254
  73. data/generated/google/apis/ml_v1/representations.rb +0 -99
  74. data/generated/google/apis/monitoring_v3.rb +1 -1
  75. data/generated/google/apis/monitoring_v3/classes.rb +213 -0
  76. data/generated/google/apis/monitoring_v3/representations.rb +61 -0
  77. data/generated/google/apis/monitoring_v3/service.rb +4 -4
  78. data/generated/google/apis/people_v1.rb +1 -1
  79. data/generated/google/apis/people_v1/classes.rb +37 -0
  80. data/generated/google/apis/people_v1/representations.rb +18 -0
  81. data/generated/google/apis/runtimeconfig_v1.rb +1 -1
  82. data/generated/google/apis/runtimeconfig_v1/classes.rb +1 -1
  83. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  84. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +1 -1
  85. data/generated/google/apis/runtimeconfig_v1beta1/service.rb +4 -4
  86. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  87. data/generated/google/apis/servicecontrol_v1/classes.rb +13 -3
  88. data/generated/google/apis/servicecontrol_v1/representations.rb +1 -0
  89. data/generated/google/apis/slides_v1.rb +1 -1
  90. data/generated/google/apis/slides_v1/classes.rb +10 -1
  91. data/generated/google/apis/speech_v1.rb +1 -1
  92. data/generated/google/apis/speech_v1/classes.rb +1 -1
  93. data/generated/google/apis/speech_v1beta1.rb +1 -1
  94. data/generated/google/apis/speech_v1beta1/classes.rb +1 -1
  95. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  96. data/generated/google/apis/storagetransfer_v1/classes.rb +5 -3
  97. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  98. data/generated/google/apis/toolresults_v1beta3/service.rb +48 -0
  99. data/generated/google/apis/toolresults_v1beta3firstparty.rb +1 -1
  100. data/generated/google/apis/toolresults_v1beta3firstparty/service.rb +48 -0
  101. data/generated/google/apis/vault_v1.rb +1 -1
  102. data/generated/google/apis/vault_v1/classes.rb +2 -2
  103. data/generated/google/apis/vault_v1/service.rb +2 -2
  104. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  105. data/generated/google/apis/youtube_partner_v1/classes.rb +137 -0
  106. data/generated/google/apis/youtube_partner_v1/representations.rb +62 -0
  107. data/generated/google/apis/youtube_partner_v1/service.rb +80 -0
  108. data/lib/google/apis/version.rb +1 -1
  109. metadata +10 -2
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/games/services
26
26
  module GamesManagementV1management
27
27
  VERSION = 'V1management'
28
- REVISION = '20170420'
28
+ REVISION = '20170831'
29
29
 
30
30
  # Share your Google+ profile information and view and manage your game activity
31
31
  AUTH_GAMES = 'https://www.googleapis.com/auth/games'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/gmail/api/
26
26
  module GmailV1
27
27
  VERSION = 'V1'
28
- REVISION = '20170620'
28
+ REVISION = '20170829'
29
29
 
30
30
  # Read, send, delete, and manage your email
31
31
  AUTH_SCOPE = 'https://mail.google.com/'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://cloud.google.com/logging/docs/
26
26
  module LoggingV2
27
27
  VERSION = 'V2'
28
- REVISION = '20170821'
28
+ REVISION = '20170828'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -22,6 +22,64 @@ module Google
22
22
  module Apis
23
23
  module LoggingV2
24
24
 
25
+ # BucketOptions describes the bucket boundaries used to create a histogram for
26
+ # the distribution. The buckets can be in a linear sequence, an exponential
27
+ # sequence, or each bucket can be specified explicitly. BucketOptions does not
28
+ # include the number of values in each bucket.A bucket has an inclusive lower
29
+ # bound and exclusive upper bound for the values that are counted for that
30
+ # bucket. The upper bound of a bucket must be strictly greater than the lower
31
+ # bound. The sequence of N buckets for a distribution consists of an underflow
32
+ # bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an
33
+ # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of
34
+ # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets
35
+ # span the whole range of finite values: lower bound of the underflow bucket is -
36
+ # infinity and the upper bound of the overflow bucket is +infinity. The finite
37
+ # buckets are so-called because both bounds are finite.
38
+ class BucketOptions
39
+ include Google::Apis::Core::Hashable
40
+
41
+ # Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (=
42
+ # N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1):
43
+ # boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at
44
+ # least one element. If bounds has only one element, then there are no finite
45
+ # buckets, and that single element is the common boundary of the overflow and
46
+ # underflow buckets.
47
+ # Corresponds to the JSON property `explicitBuckets`
48
+ # @return [Google::Apis::LoggingV2::Explicit]
49
+ attr_accessor :explicit_buckets
50
+
51
+ # Specifies an exponential sequence of buckets that have a width that is
52
+ # proportional to the value of the lower bound. Each bucket represents a
53
+ # constant relative uncertainty on a specific value in the bucket.There are
54
+ # num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:
55
+ # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i <
56
+ # N): scale * (growth_factor ^ (i - 1)).
57
+ # Corresponds to the JSON property `exponentialBuckets`
58
+ # @return [Google::Apis::LoggingV2::Exponential]
59
+ attr_accessor :exponential_buckets
60
+
61
+ # Specifies a linear sequence of buckets that all have the same width (except
62
+ # overflow and underflow). Each bucket represents a constant absolute
63
+ # uncertainty on the specific value in the bucket.There are num_finite_buckets +
64
+ # 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-
65
+ # 1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1))
66
+ # .
67
+ # Corresponds to the JSON property `linearBuckets`
68
+ # @return [Google::Apis::LoggingV2::Linear]
69
+ attr_accessor :linear_buckets
70
+
71
+ def initialize(**args)
72
+ update!(**args)
73
+ end
74
+
75
+ # Update properties of this object
76
+ def update!(**args)
77
+ @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets)
78
+ @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets)
79
+ @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets)
80
+ end
81
+ end
82
+
25
83
  # A generic empty message that you can re-use to avoid defining duplicated empty
26
84
  # messages in your APIs. A typical example is to use it as the request or the
27
85
  # response type of an API method. For instance:
@@ -41,6 +99,66 @@ module Google
41
99
  end
42
100
  end
43
101
 
102
+ # Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (=
103
+ # N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1):
104
+ # boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at
105
+ # least one element. If bounds has only one element, then there are no finite
106
+ # buckets, and that single element is the common boundary of the overflow and
107
+ # underflow buckets.
108
+ class Explicit
109
+ include Google::Apis::Core::Hashable
110
+
111
+ # The values must be monotonically increasing.
112
+ # Corresponds to the JSON property `bounds`
113
+ # @return [Array<Float>]
114
+ attr_accessor :bounds
115
+
116
+ def initialize(**args)
117
+ update!(**args)
118
+ end
119
+
120
+ # Update properties of this object
121
+ def update!(**args)
122
+ @bounds = args[:bounds] if args.key?(:bounds)
123
+ end
124
+ end
125
+
126
+ # Specifies an exponential sequence of buckets that have a width that is
127
+ # proportional to the value of the lower bound. Each bucket represents a
128
+ # constant relative uncertainty on a specific value in the bucket.There are
129
+ # num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:
130
+ # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i <
131
+ # N): scale * (growth_factor ^ (i - 1)).
132
+ class Exponential
133
+ include Google::Apis::Core::Hashable
134
+
135
+ # Must be greater than 1.
136
+ # Corresponds to the JSON property `growthFactor`
137
+ # @return [Float]
138
+ attr_accessor :growth_factor
139
+
140
+ # Must be greater than 0.
141
+ # Corresponds to the JSON property `numFiniteBuckets`
142
+ # @return [Fixnum]
143
+ attr_accessor :num_finite_buckets
144
+
145
+ # Must be greater than 0.
146
+ # Corresponds to the JSON property `scale`
147
+ # @return [Float]
148
+ attr_accessor :scale
149
+
150
+ def initialize(**args)
151
+ update!(**args)
152
+ end
153
+
154
+ # Update properties of this object
155
+ def update!(**args)
156
+ @growth_factor = args[:growth_factor] if args.key?(:growth_factor)
157
+ @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
158
+ @scale = args[:scale] if args.key?(:scale)
159
+ end
160
+ end
161
+
44
162
  # A common proto for logging HTTP requests. Only contains semantics defined by
45
163
  # the HTTP specification. Product-specific logging information MUST be defined
46
164
  # in a separate message.
@@ -190,6 +308,69 @@ module Google
190
308
  end
191
309
  end
192
310
 
311
+ # Specifies a linear sequence of buckets that all have the same width (except
312
+ # overflow and underflow). Each bucket represents a constant absolute
313
+ # uncertainty on the specific value in the bucket.There are num_finite_buckets +
314
+ # 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-
315
+ # 1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1))
316
+ # .
317
+ class Linear
318
+ include Google::Apis::Core::Hashable
319
+
320
+ # Must be greater than 0.
321
+ # Corresponds to the JSON property `numFiniteBuckets`
322
+ # @return [Fixnum]
323
+ attr_accessor :num_finite_buckets
324
+
325
+ # Lower bound of the first bucket.
326
+ # Corresponds to the JSON property `offset`
327
+ # @return [Float]
328
+ attr_accessor :offset
329
+
330
+ # Must be greater than 0.
331
+ # Corresponds to the JSON property `width`
332
+ # @return [Float]
333
+ attr_accessor :width
334
+
335
+ def initialize(**args)
336
+ update!(**args)
337
+ end
338
+
339
+ # Update properties of this object
340
+ def update!(**args)
341
+ @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets)
342
+ @offset = args[:offset] if args.key?(:offset)
343
+ @width = args[:width] if args.key?(:width)
344
+ end
345
+ end
346
+
347
+ # Result returned from ListExclusions.
348
+ class ListExclusionsResponse
349
+ include Google::Apis::Core::Hashable
350
+
351
+ # A list of exclusions.
352
+ # Corresponds to the JSON property `exclusions`
353
+ # @return [Array<Google::Apis::LoggingV2::LogExclusion>]
354
+ attr_accessor :exclusions
355
+
356
+ # If there might be more results than appear in this response, then
357
+ # nextPageToken is included. To get the next set of results, call the same
358
+ # method again using the value of nextPageToken as pageToken.
359
+ # Corresponds to the JSON property `nextPageToken`
360
+ # @return [String]
361
+ attr_accessor :next_page_token
362
+
363
+ def initialize(**args)
364
+ update!(**args)
365
+ end
366
+
367
+ # Update properties of this object
368
+ def update!(**args)
369
+ @exclusions = args[:exclusions] if args.key?(:exclusions)
370
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
371
+ end
372
+ end
373
+
193
374
  # The parameters to ListLogEntries.
194
375
  class ListLogEntriesRequest
195
376
  include Google::Apis::Core::Hashable
@@ -420,8 +601,8 @@ module Google
420
601
  # Optional. A unique identifier for the log entry. If you provide a value, then
421
602
  # Stackdriver Logging considers other log entries in the same project, with the
422
603
  # same timestamp, and with the same insert_id to be duplicates which can be
423
- # removed. If omitted in new log entries, then Stackdriver Logging will insert
424
- # its own unique identifier. The insert_id is used to order log entries that
604
+ # removed. If omitted in new log entries, then Stackdriver Logging assigns its
605
+ # own unique identifier. The insert_id is also used to order log entries that
425
606
  # have the same timestamp value.
426
607
  # Corresponds to the JSON property `insertId`
427
608
  # @return [String]
@@ -507,11 +688,12 @@ module Google
507
688
  # @return [String]
508
689
  attr_accessor :text_payload
509
690
 
510
- # Optional. The time the event described by the log entry occurred. If omitted
511
- # in a new log entry, Stackdriver Logging will insert the time the log entry is
512
- # received. Stackdriver Logging might reject log entries whose time stamps are
513
- # more than a couple of hours in the future. Log entries with time stamps in the
514
- # past are accepted.
691
+ # Optional. The time the event described by the log entry occurred. This time is
692
+ # used to compute the log entry's age and to enforce the logs retention period.
693
+ # If this field is omitted in a new log entry, then Stackdriver Logging assigns
694
+ # it the current time.Incoming log entries should have timestamps that are no
695
+ # more than the logs retention period in the past, and no more than 24 hours in
696
+ # the future. See the entries.write API method for more information.
515
697
  # Corresponds to the JSON property `timestamp`
516
698
  # @return [String]
517
699
  attr_accessor :timestamp
@@ -628,6 +810,56 @@ module Google
628
810
  end
629
811
  end
630
812
 
813
+ # Specifies a set of log entries that are not to be stored in Stackdriver
814
+ # Logging. If your project receives a large volume of logs, you might be able to
815
+ # use exclusions to reduce your chargeable logs. Exclusions are processed after
816
+ # log sinks, so you can export log entries before they are excluded. Audit log
817
+ # entries and log entries from Amazon Web Services are never excluded.
818
+ class LogExclusion
819
+ include Google::Apis::Core::Hashable
820
+
821
+ # Optional. A description of this exclusion.
822
+ # Corresponds to the JSON property `description`
823
+ # @return [String]
824
+ attr_accessor :description
825
+
826
+ # Optional. If set to True, then this exclusion is disabled and it does not
827
+ # exclude any log entries. You can use exclusions.patch to change the value of
828
+ # this field.
829
+ # Corresponds to the JSON property `disabled`
830
+ # @return [Boolean]
831
+ attr_accessor :disabled
832
+ alias_method :disabled?, :disabled
833
+
834
+ # Required. An advanced logs filter that matches the log entries to be excluded.
835
+ # By using the sample function, you can exclude less than 100% of the matching
836
+ # log entries. For example, the following filter matches 99% of low-severity log
837
+ # entries from load balancers:
838
+ # "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"
839
+ # Corresponds to the JSON property `filter`
840
+ # @return [String]
841
+ attr_accessor :filter
842
+
843
+ # Required. A client-assigned identifier, such as "load-balancer-exclusion".
844
+ # Identifiers are limited to 100 characters and can include only letters, digits,
845
+ # underscores, hyphens, and periods.
846
+ # Corresponds to the JSON property `name`
847
+ # @return [String]
848
+ attr_accessor :name
849
+
850
+ def initialize(**args)
851
+ update!(**args)
852
+ end
853
+
854
+ # Update properties of this object
855
+ def update!(**args)
856
+ @description = args[:description] if args.key?(:description)
857
+ @disabled = args[:disabled] if args.key?(:disabled)
858
+ @filter = args[:filter] if args.key?(:filter)
859
+ @name = args[:name] if args.key?(:name)
860
+ end
861
+ end
862
+
631
863
  # Application log line emitted while processing a request.
632
864
  class LogLine
633
865
  include Google::Apis::Core::Hashable
@@ -666,10 +898,31 @@ module Google
666
898
  end
667
899
 
668
900
  # Describes a logs-based metric. The value of the metric is the number of log
669
- # entries that match a logs filter in a given time interval.
901
+ # entries that match a logs filter in a given time interval.Logs-based metric
902
+ # can also be used to extract values from logs and create a a distribution of
903
+ # the values. The distribution records the statistics of the extracted values
904
+ # along with an optional histogram of the values as specified by the bucket
905
+ # options.
670
906
  class LogMetric
671
907
  include Google::Apis::Core::Hashable
672
908
 
909
+ # BucketOptions describes the bucket boundaries used to create a histogram for
910
+ # the distribution. The buckets can be in a linear sequence, an exponential
911
+ # sequence, or each bucket can be specified explicitly. BucketOptions does not
912
+ # include the number of values in each bucket.A bucket has an inclusive lower
913
+ # bound and exclusive upper bound for the values that are counted for that
914
+ # bucket. The upper bound of a bucket must be strictly greater than the lower
915
+ # bound. The sequence of N buckets for a distribution consists of an underflow
916
+ # bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an
917
+ # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of
918
+ # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets
919
+ # span the whole range of finite values: lower bound of the underflow bucket is -
920
+ # infinity and the upper bound of the overflow bucket is +infinity. The finite
921
+ # buckets are so-called because both bounds are finite.
922
+ # Corresponds to the JSON property `bucketOptions`
923
+ # @return [Google::Apis::LoggingV2::BucketOptions]
924
+ attr_accessor :bucket_options
925
+
673
926
  # Optional. A description of this metric, which is used in documentation.
674
927
  # Corresponds to the JSON property `description`
675
928
  # @return [String]
@@ -682,6 +935,27 @@ module Google
682
935
  # @return [String]
683
936
  attr_accessor :filter
684
937
 
938
+ # Optional. A map from a label key string to an extractor expression which is
939
+ # used to extract data from a log entry field and assign as the label value.
940
+ # Each label key specified in the LabelDescriptor must have an associated
941
+ # extractor expression in this map. The syntax of the extractor expression is
942
+ # the same as for the value_extractor field.The extracted value is converted to
943
+ # the type defined in the label descriptor. If the either the extraction or the
944
+ # type conversion fails, the label will have a default value. The default value
945
+ # for a string label is an empty string, for an integer label its 0, and for a
946
+ # boolean label its false.Note that there are upper bounds on the maximum number
947
+ # of labels and the number of active time series that are allowed in a project.
948
+ # Corresponds to the JSON property `labelExtractors`
949
+ # @return [Hash<String,String>]
950
+ attr_accessor :label_extractors
951
+
952
+ # Defines a metric type and its schema. Once a metric descriptor is created,
953
+ # deleting or altering it stops data collection and makes the metric type's
954
+ # existing data unusable.
955
+ # Corresponds to the JSON property `metricDescriptor`
956
+ # @return [Google::Apis::LoggingV2::MetricDescriptor]
957
+ attr_accessor :metric_descriptor
958
+
685
959
  # Required. The client-assigned metric identifier. Examples: "error_count", "
686
960
  # nginx/requests".Metric identifiers are limited to 100 characters and can
687
961
  # include only the following characters: A-Z, a-z, 0-9, and the special
@@ -695,6 +969,23 @@ module Google
695
969
  # @return [String]
696
970
  attr_accessor :name
697
971
 
972
+ # Optional. A value_extractor is required when using a distribution logs-based
973
+ # metric to extract the values to record from a log entry. Two functions are
974
+ # supported for value extraction: EXTRACT(field) or REGEXP_EXTRACT(field, regex).
975
+ # The argument are: 1. field: The name of the log entry field from which the
976
+ # value is to be extracted. 2. regex: A regular expression using the Google
977
+ # RE2 syntax (https://github.com/google/re2/wiki/Syntax) with a single capture
978
+ # group to extract data from the specified log entry field. The value of the
979
+ # field is converted to a string before applying the regex. It is an error to
980
+ # specify a regex that does not include exactly one capture group.The result of
981
+ # the extraction must be convertible to a double type, as the distribution
982
+ # always records double values. If either the extraction or the conversion to
983
+ # double fails, then those values are not recorded in the distribution.Example:
984
+ # REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")
985
+ # Corresponds to the JSON property `valueExtractor`
986
+ # @return [String]
987
+ attr_accessor :value_extractor
988
+
698
989
  # Deprecated. The API version that created or updated this metric. The v2 format
699
990
  # is used by default and cannot be changed.
700
991
  # Corresponds to the JSON property `version`
@@ -707,9 +998,13 @@ module Google
707
998
 
708
999
  # Update properties of this object
709
1000
  def update!(**args)
1001
+ @bucket_options = args[:bucket_options] if args.key?(:bucket_options)
710
1002
  @description = args[:description] if args.key?(:description)
711
1003
  @filter = args[:filter] if args.key?(:filter)
1004
+ @label_extractors = args[:label_extractors] if args.key?(:label_extractors)
1005
+ @metric_descriptor = args[:metric_descriptor] if args.key?(:metric_descriptor)
712
1006
  @name = args[:name] if args.key?(:name)
1007
+ @value_extractor = args[:value_extractor] if args.key?(:value_extractor)
713
1008
  @version = args[:version] if args.key?(:version)
714
1009
  end
715
1010
  end
@@ -818,6 +1113,132 @@ module Google
818
1113
  end
819
1114
  end
820
1115
 
1116
+ # Defines a metric type and its schema. Once a metric descriptor is created,
1117
+ # deleting or altering it stops data collection and makes the metric type's
1118
+ # existing data unusable.
1119
+ class MetricDescriptor
1120
+ include Google::Apis::Core::Hashable
1121
+
1122
+ # A detailed description of the metric, which can be used in documentation.
1123
+ # Corresponds to the JSON property `description`
1124
+ # @return [String]
1125
+ attr_accessor :description
1126
+
1127
+ # A concise name for the metric, which can be displayed in user interfaces. Use
1128
+ # sentence case without an ending period, for example "Request count".
1129
+ # Corresponds to the JSON property `displayName`
1130
+ # @return [String]
1131
+ attr_accessor :display_name
1132
+
1133
+ # The set of labels that can be used to describe a specific instance of this
1134
+ # metric type. For example, the appengine.googleapis.com/http/server/
1135
+ # response_latencies metric type has a label for the HTTP response code,
1136
+ # response_code, so you can look at latencies for successful responses or just
1137
+ # for responses that failed.
1138
+ # Corresponds to the JSON property `labels`
1139
+ # @return [Array<Google::Apis::LoggingV2::LabelDescriptor>]
1140
+ attr_accessor :labels
1141
+
1142
+ # Whether the metric records instantaneous values, changes to a value, etc. Some
1143
+ # combinations of metric_kind and value_type might not be supported.
1144
+ # Corresponds to the JSON property `metricKind`
1145
+ # @return [String]
1146
+ attr_accessor :metric_kind
1147
+
1148
+ # The resource name of the metric descriptor. Depending on the implementation,
1149
+ # the name typically includes: (1) the parent resource name that defines the
1150
+ # scope of the metric type or of its data; and (2) the metric's URL-encoded type,
1151
+ # which also appears in the type field of this descriptor. For example,
1152
+ # following is the resource name of a custom metric within the GCP project my-
1153
+ # project-id:
1154
+ # "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%
1155
+ # 2Fpaid%2Famount"
1156
+ # Corresponds to the JSON property `name`
1157
+ # @return [String]
1158
+ attr_accessor :name
1159
+
1160
+ # The metric type, including its DNS name prefix. The type is not URL-encoded.
1161
+ # All user-defined custom metric types have the DNS name custom.googleapis.com.
1162
+ # Metric types should use a natural hierarchical grouping. For example:
1163
+ # "custom.googleapis.com/invoice/paid/amount"
1164
+ # "appengine.googleapis.com/http/server/response_latencies"
1165
+ # Corresponds to the JSON property `type`
1166
+ # @return [String]
1167
+ attr_accessor :type
1168
+
1169
+ # The unit in which the metric value is reported. It is only applicable if the
1170
+ # value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset
1171
+ # of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html)
1172
+ # standard:Basic units (UNIT)
1173
+ # bit bit
1174
+ # By byte
1175
+ # s second
1176
+ # min minute
1177
+ # h hour
1178
+ # d dayPrefixes (PREFIX)
1179
+ # k kilo (10**3)
1180
+ # M mega (10**6)
1181
+ # G giga (10**9)
1182
+ # T tera (10**12)
1183
+ # P peta (10**15)
1184
+ # E exa (10**18)
1185
+ # Z zetta (10**21)
1186
+ # Y yotta (10**24)
1187
+ # m milli (10**-3)
1188
+ # u micro (10**-6)
1189
+ # n nano (10**-9)
1190
+ # p pico (10**-12)
1191
+ # f femto (10**-15)
1192
+ # a atto (10**-18)
1193
+ # z zepto (10**-21)
1194
+ # y yocto (10**-24)
1195
+ # Ki kibi (2**10)
1196
+ # Mi mebi (2**20)
1197
+ # Gi gibi (2**30)
1198
+ # Ti tebi (2**40)GrammarThe grammar includes the dimensionless unit 1, such as 1/
1199
+ # s.The grammar also includes these connectors:
1200
+ # / division (as an infix operator, e.g. 1/s).
1201
+ # . multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit is
1202
+ # as follows:
1203
+ # Expression = Component ` "." Component ` ` "/" Component ` ;
1204
+ # Component = [ PREFIX ] UNIT [ Annotation ]
1205
+ # | Annotation
1206
+ # | "1"
1207
+ # ;
1208
+ # Annotation = "`" NAME "`" ;
1209
+ # Notes:
1210
+ # Annotation is just a comment if it follows a UNIT and is equivalent to 1 if
1211
+ # it is used alone. For examples, `requests`/s == 1/s, By`transmitted`/s == By/
1212
+ # s.
1213
+ # NAME is a sequence of non-blank printable ASCII characters not containing '`'
1214
+ # or '`'.
1215
+ # Corresponds to the JSON property `unit`
1216
+ # @return [String]
1217
+ attr_accessor :unit
1218
+
1219
+ # Whether the measurement is an integer, a floating-point number, etc. Some
1220
+ # combinations of metric_kind and value_type might not be supported.
1221
+ # Corresponds to the JSON property `valueType`
1222
+ # @return [String]
1223
+ attr_accessor :value_type
1224
+
1225
+ def initialize(**args)
1226
+ update!(**args)
1227
+ end
1228
+
1229
+ # Update properties of this object
1230
+ def update!(**args)
1231
+ @description = args[:description] if args.key?(:description)
1232
+ @display_name = args[:display_name] if args.key?(:display_name)
1233
+ @labels = args[:labels] if args.key?(:labels)
1234
+ @metric_kind = args[:metric_kind] if args.key?(:metric_kind)
1235
+ @name = args[:name] if args.key?(:name)
1236
+ @type = args[:type] if args.key?(:type)
1237
+ @unit = args[:unit] if args.key?(:unit)
1238
+ @value_type = args[:value_type] if args.key?(:value_type)
1239
+ end
1240
+ end
1241
+
821
1242
  # An object representing a resource that can be used for monitoring, logging,
822
1243
  # billing, or other purposes. Examples include virtual machine instances,
823
1244
  # databases, and storage devices such as disks. The type field identifies a
@@ -1210,16 +1631,21 @@ module Google
1210
1631
  class WriteLogEntriesRequest
1211
1632
  include Google::Apis::Core::Hashable
1212
1633
 
1213
- # Required. The log entries to write. Values supplied for the fields log_name,
1214
- # resource, and labels in this entries.write request are inserted into those log
1215
- # entries in this list that do not provide their own values.Stackdriver Logging
1216
- # also creates and inserts values for timestamp and insert_id if the entries do
1217
- # not provide them. The created insert_id for the N'th entry in this list will
1218
- # be greater than earlier entries and less than later entries. Otherwise, the
1219
- # order of log entries in this list does not matter.To improve throughput and to
1220
- # avoid exceeding the quota limit for calls to entries.write, you should write
1221
- # multiple log entries at once rather than calling this method for each
1222
- # individual log entry.
1634
+ # Required. The log entries to send to Stackdriver Logging. The order of log
1635
+ # entries in this list does not matter. Values supplied in this method's
1636
+ # log_name, resource, and labels fields are copied into those log entries in
1637
+ # this list that do not include values for their corresponding fields. For more
1638
+ # information, see the LogEntry type.If the timestamp or insert_id fields are
1639
+ # missing in log entries, then this method supplies the current time or a unique
1640
+ # identifier, respectively. The supplied values are chosen so that, among the
1641
+ # log entries that did not supply their own values, the entries earlier in the
1642
+ # list will sort before the entries later in the list. See entries.list.Log
1643
+ # entries with timestamps that are more than the logs retention period in the
1644
+ # past or more than 24 hours in the future might be discarded. Discarding does
1645
+ # not return an error.To improve throughput and to avoid exceeding the quota
1646
+ # limit for calls to entries.write, you should try to include several log
1647
+ # entries in this list, rather than calling this method for each individual log
1648
+ # entry.
1223
1649
  # Corresponds to the JSON property `entries`
1224
1650
  # @return [Array<Google::Apis::LoggingV2::LogEntry>]
1225
1651
  attr_accessor :entries