google-api-client 0.10.0 → 0.10.1

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 (193) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +1 -1
  4. data/api_names.yaml +37747 -36512
  5. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1016 -114
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +426 -22
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +481 -95
  9. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  10. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +27 -10
  11. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1 -0
  12. data/generated/google/apis/admin_reports_v1.rb +2 -2
  13. data/generated/google/apis/adsense_v1_4.rb +1 -1
  14. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  15. data/generated/google/apis/analytics_v3.rb +1 -1
  16. data/generated/google/apis/analyticsreporting_v4.rb +4 -4
  17. data/generated/google/apis/analyticsreporting_v4/classes.rb +428 -428
  18. data/generated/google/apis/analyticsreporting_v4/representations.rb +108 -108
  19. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  20. data/generated/google/apis/androidenterprise_v1/classes.rb +60 -66
  21. data/generated/google/apis/androidenterprise_v1/service.rb +12 -11
  22. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  23. data/generated/google/apis/androidpublisher_v2/classes.rb +7 -0
  24. data/generated/google/apis/androidpublisher_v2/representations.rb +1 -0
  25. data/generated/google/apis/androidpublisher_v2/service.rb +1 -1
  26. data/generated/google/apis/appsactivity_v1.rb +3 -3
  27. data/generated/google/apis/appsactivity_v1/service.rb +1 -1
  28. data/generated/google/apis/appstate_v1.rb +1 -1
  29. data/generated/google/apis/bigquery_v2.rb +1 -1
  30. data/generated/google/apis/bigquery_v2/classes.rb +34 -8
  31. data/generated/google/apis/bigquery_v2/representations.rb +15 -0
  32. data/generated/google/apis/calendar_v3.rb +1 -1
  33. data/generated/google/apis/calendar_v3/classes.rb +3 -5
  34. data/generated/google/apis/classroom_v1.rb +25 -22
  35. data/generated/google/apis/classroom_v1/classes.rb +910 -1001
  36. data/generated/google/apis/classroom_v1/representations.rb +240 -240
  37. data/generated/google/apis/classroom_v1/service.rb +1064 -1272
  38. data/generated/google/apis/cloudbilling_v1.rb +3 -3
  39. data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
  40. data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
  41. data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
  42. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  43. data/generated/google/apis/cloudbuild_v1/classes.rb +238 -238
  44. data/generated/google/apis/cloudbuild_v1/representations.rb +48 -48
  45. data/generated/google/apis/cloudbuild_v1/service.rb +176 -176
  46. data/generated/google/apis/clouddebugger_v2.rb +4 -4
  47. data/generated/google/apis/clouddebugger_v2/classes.rb +315 -315
  48. data/generated/google/apis/clouddebugger_v2/representations.rb +90 -90
  49. data/generated/google/apis/clouddebugger_v2/service.rb +152 -152
  50. data/generated/google/apis/cloudkms_v1.rb +35 -0
  51. data/generated/google/apis/cloudkms_v1/classes.rb +1039 -0
  52. data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
  53. data/generated/google/apis/cloudkms_v1/service.rb +933 -0
  54. data/generated/google/apis/cloudkms_v1beta1.rb +1 -1
  55. data/generated/google/apis/cloudkms_v1beta1/classes.rb +645 -605
  56. data/generated/google/apis/cloudkms_v1beta1/representations.rb +136 -136
  57. data/generated/google/apis/cloudkms_v1beta1/service.rb +258 -264
  58. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  59. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  60. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +677 -456
  61. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +154 -89
  62. data/generated/google/apis/cloudresourcemanager_v1/service.rb +380 -279
  63. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  64. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +247 -114
  65. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +72 -40
  66. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +202 -208
  67. data/generated/google/apis/cloudtrace_v1.rb +4 -4
  68. data/generated/google/apis/cloudtrace_v1/classes.rb +39 -39
  69. data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
  70. data/generated/google/apis/cloudtrace_v1/service.rb +18 -18
  71. data/generated/google/apis/compute_beta.rb +1 -1
  72. data/generated/google/apis/compute_beta/classes.rb +813 -82
  73. data/generated/google/apis/compute_beta/representations.rb +305 -0
  74. data/generated/google/apis/compute_beta/service.rb +971 -180
  75. data/generated/google/apis/compute_v1.rb +1 -1
  76. data/generated/google/apis/compute_v1/classes.rb +147 -21
  77. data/generated/google/apis/compute_v1/representations.rb +38 -0
  78. data/generated/google/apis/compute_v1/service.rb +347 -65
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/classes.rb +2 -1
  81. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  82. data/generated/google/apis/dataflow_v1b3/classes.rb +3352 -3110
  83. data/generated/google/apis/dataflow_v1b3/representations.rb +812 -730
  84. data/generated/google/apis/dataflow_v1b3/service.rb +264 -183
  85. data/generated/google/apis/dataproc_v1.rb +1 -1
  86. data/generated/google/apis/dataproc_v1/classes.rb +1200 -1164
  87. data/generated/google/apis/dataproc_v1/representations.rb +220 -204
  88. data/generated/google/apis/dataproc_v1/service.rb +299 -299
  89. data/generated/google/apis/datastore_v1.rb +4 -4
  90. data/generated/google/apis/datastore_v1/classes.rb +688 -688
  91. data/generated/google/apis/datastore_v1/representations.rb +167 -167
  92. data/generated/google/apis/datastore_v1/service.rb +68 -68
  93. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  94. data/generated/google/apis/deploymentmanager_v2/classes.rb +13 -3
  95. data/generated/google/apis/dns_v1.rb +1 -1
  96. data/generated/google/apis/dns_v2beta1.rb +1 -1
  97. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  98. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +1 -1
  99. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  100. data/generated/google/apis/drive_v2.rb +1 -1
  101. data/generated/google/apis/drive_v2/classes.rb +487 -15
  102. data/generated/google/apis/drive_v2/representations.rb +120 -0
  103. data/generated/google/apis/drive_v2/service.rb +355 -38
  104. data/generated/google/apis/drive_v3.rb +1 -1
  105. data/generated/google/apis/drive_v3/classes.rb +416 -14
  106. data/generated/google/apis/drive_v3/representations.rb +99 -0
  107. data/generated/google/apis/drive_v3/service.rb +315 -28
  108. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  109. data/generated/google/apis/games_management_v1management.rb +1 -1
  110. data/generated/google/apis/games_v1.rb +1 -1
  111. data/generated/google/apis/genomics_v1.rb +7 -7
  112. data/generated/google/apis/genomics_v1/classes.rb +2301 -2301
  113. data/generated/google/apis/genomics_v1/representations.rb +239 -239
  114. data/generated/google/apis/genomics_v1/service.rb +599 -599
  115. data/generated/google/apis/gmail_v1.rb +2 -2
  116. data/generated/google/apis/gmail_v1/service.rb +18 -1
  117. data/generated/google/apis/groupssettings_v1.rb +1 -1
  118. data/generated/google/apis/iam_v1.rb +1 -1
  119. data/generated/google/apis/iam_v1/classes.rb +440 -440
  120. data/generated/google/apis/iam_v1/representations.rb +96 -96
  121. data/generated/google/apis/iam_v1/service.rb +150 -150
  122. data/generated/google/apis/kgsearch_v1/service.rb +13 -13
  123. data/generated/google/apis/language_v1beta1.rb +1 -1
  124. data/generated/google/apis/language_v1beta1/classes.rb +235 -235
  125. data/generated/google/apis/language_v1beta1/representations.rb +73 -73
  126. data/generated/google/apis/language_v1beta1/service.rb +49 -49
  127. data/generated/google/apis/licensing_v1.rb +1 -1
  128. data/generated/google/apis/logging_v2beta1.rb +1 -1
  129. data/generated/google/apis/logging_v2beta1/classes.rb +888 -879
  130. data/generated/google/apis/logging_v2beta1/representations.rb +129 -129
  131. data/generated/google/apis/logging_v2beta1/service.rb +315 -316
  132. data/generated/google/apis/manufacturers_v1/classes.rb +139 -139
  133. data/generated/google/apis/manufacturers_v1/representations.rb +30 -30
  134. data/generated/google/apis/manufacturers_v1/service.rb +32 -32
  135. data/generated/google/apis/monitoring_v3.rb +4 -4
  136. data/generated/google/apis/monitoring_v3/classes.rb +229 -229
  137. data/generated/google/apis/monitoring_v3/representations.rb +45 -45
  138. data/generated/google/apis/monitoring_v3/service.rb +141 -141
  139. data/generated/google/apis/partners_v2.rb +3 -3
  140. data/generated/google/apis/partners_v2/classes.rb +1837 -483
  141. data/generated/google/apis/partners_v2/representations.rb +614 -157
  142. data/generated/google/apis/partners_v2/service.rb +881 -150
  143. data/generated/google/apis/people_v1.rb +1 -1
  144. data/generated/google/apis/people_v1/classes.rb +517 -465
  145. data/generated/google/apis/people_v1/representations.rb +138 -107
  146. data/generated/google/apis/people_v1/service.rb +56 -49
  147. data/generated/google/apis/plus_domains_v1.rb +1 -1
  148. data/generated/google/apis/plus_v1.rb +1 -1
  149. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  150. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +529 -458
  151. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +98 -97
  152. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +494 -370
  153. data/generated/google/apis/pubsub_v1.rb +4 -4
  154. data/generated/google/apis/pubsub_v1/classes.rb +203 -203
  155. data/generated/google/apis/pubsub_v1/representations.rb +65 -65
  156. data/generated/google/apis/pubsub_v1/service.rb +226 -217
  157. data/generated/google/apis/reseller_v1.rb +1 -1
  158. data/generated/google/apis/reseller_v1/classes.rb +213 -61
  159. data/generated/google/apis/reseller_v1/representations.rb +27 -0
  160. data/generated/google/apis/reseller_v1/service.rb +240 -47
  161. data/generated/google/apis/script_v1.rb +14 -14
  162. data/generated/google/apis/script_v1/classes.rb +95 -95
  163. data/generated/google/apis/script_v1/representations.rb +25 -25
  164. data/generated/google/apis/sheets_v4.rb +1 -1
  165. data/generated/google/apis/sheets_v4/classes.rb +4346 -4300
  166. data/generated/google/apis/sheets_v4/representations.rb +853 -837
  167. data/generated/google/apis/sheets_v4/service.rb +32 -32
  168. data/generated/google/apis/slides_v1.rb +1 -1
  169. data/generated/google/apis/slides_v1/classes.rb +804 -748
  170. data/generated/google/apis/slides_v1/representations.rb +204 -187
  171. data/generated/google/apis/slides_v1/service.rb +16 -16
  172. data/generated/google/apis/speech_v1beta1.rb +1 -1
  173. data/generated/google/apis/speech_v1beta1/classes.rb +57 -57
  174. data/generated/google/apis/speech_v1beta1/representations.rb +19 -19
  175. data/generated/google/apis/speech_v1beta1/service.rb +66 -66
  176. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  177. data/generated/google/apis/sqladmin_v1beta4/classes.rb +32 -7
  178. data/generated/google/apis/sqladmin_v1beta4/representations.rb +16 -0
  179. data/generated/google/apis/sqladmin_v1beta4/service.rb +9 -2
  180. data/generated/google/apis/storage_v1.rb +1 -1
  181. data/generated/google/apis/storage_v1/service.rb +10 -7
  182. data/generated/google/apis/vision_v1.rb +1 -1
  183. data/generated/google/apis/vision_v1/classes.rb +1393 -865
  184. data/generated/google/apis/vision_v1/representations.rb +367 -102
  185. data/generated/google/apis/vision_v1/service.rb +4 -4
  186. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  187. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  188. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  189. data/generated/google/apis/youtubereporting_v1/classes.rb +93 -93
  190. data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
  191. data/generated/google/apis/youtubereporting_v1/service.rb +108 -108
  192. data/lib/google/apis/version.rb +1 -1
  193. metadata +34 -30
@@ -27,7 +27,7 @@ module Google
27
27
  VERSION = 'V1'
28
28
  REVISION = '20150901'
29
29
 
30
- # View and manage Google Apps licenses for your domain
30
+ # View and manage G Suite licenses for your domain
31
31
  AUTH_APPS_LICENSING = 'https://www.googleapis.com/auth/apps.licensing'
32
32
  end
33
33
  end
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://cloud.google.com/logging/docs/
26
26
  module LoggingV2beta1
27
27
  VERSION = 'V2beta1'
28
- REVISION = '20170210'
28
+ REVISION = '20170306'
29
29
 
30
30
  # View your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
@@ -22,8 +22,8 @@ module Google
22
22
  module Apis
23
23
  module LoggingV2beta1
24
24
 
25
- # Result returned from ListMonitoredResourceDescriptors.
26
- class ListMonitoredResourceDescriptorsResponse
25
+ # Result returned from ListLogs.
26
+ class ListLogsResponse
27
27
  include Google::Apis::Core::Hashable
28
28
 
29
29
  # If there might be more results than those appearing in this response, then
@@ -33,10 +33,11 @@ module Google
33
33
  # @return [String]
34
34
  attr_accessor :next_page_token
35
35
 
36
- # A list of resource descriptors.
37
- # Corresponds to the JSON property `resourceDescriptors`
38
- # @return [Array<Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor>]
39
- attr_accessor :resource_descriptors
36
+ # A list of log names. For example, "projects/my-project/syslog" or "
37
+ # organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
38
+ # Corresponds to the JSON property `logNames`
39
+ # @return [Array<String>]
40
+ attr_accessor :log_names
40
41
 
41
42
  def initialize(**args)
42
43
  update!(**args)
@@ -45,117 +46,98 @@ module Google
45
46
  # Update properties of this object
46
47
  def update!(**args)
47
48
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
48
- @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)
49
+ @log_names = args[:log_names] if args.key?(:log_names)
49
50
  end
50
51
  end
51
52
 
52
- # A reference to a particular snapshot of the source tree used to build and
53
- # deploy an application.
54
- class SourceReference
53
+ # A common proto for logging HTTP requests. Only contains semantics defined by
54
+ # the HTTP specification. Product-specific logging information MUST be defined
55
+ # in a separate message.
56
+ class HttpRequest
55
57
  include Google::Apis::Core::Hashable
56
58
 
57
- # Optional. A URI string identifying the repository. Example: "https://github.
58
- # com/GoogleCloudPlatform/kubernetes.git"
59
- # Corresponds to the JSON property `repository`
59
+ # The request processing latency on the server, from the time the request was
60
+ # received until the response was sent.
61
+ # Corresponds to the JSON property `latency`
60
62
  # @return [String]
61
- attr_accessor :repository
63
+ attr_accessor :latency
62
64
 
63
- # The canonical and persistent identifier of the deployed revision. Example (git)
64
- # : "0035781c50ec7aa23385dc841529ce8a4b70db1b"
65
- # Corresponds to the JSON property `revisionId`
65
+ # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0;
66
+ # Windows 98; Q312461; .NET CLR 1.0.3705)".
67
+ # Corresponds to the JSON property `userAgent`
66
68
  # @return [String]
67
- attr_accessor :revision_id
68
-
69
- def initialize(**args)
70
- update!(**args)
71
- end
72
-
73
- # Update properties of this object
74
- def update!(**args)
75
- @repository = args[:repository] if args.key?(:repository)
76
- @revision_id = args[:revision_id] if args.key?(:revision_id)
77
- end
78
- end
69
+ attr_accessor :user_agent
79
70
 
80
- # Additional information about a potentially long-running operation with which a
81
- # log entry is associated.
82
- class LogEntryOperation
83
- include Google::Apis::Core::Hashable
71
+ # The number of HTTP response bytes inserted into cache. Set only when a cache
72
+ # fill was attempted.
73
+ # Corresponds to the JSON property `cacheFillBytes`
74
+ # @return [String]
75
+ attr_accessor :cache_fill_bytes
84
76
 
85
- # Optional. Set this to True if this is the last log entry in the operation.
86
- # Corresponds to the JSON property `last`
87
- # @return [Boolean]
88
- attr_accessor :last
89
- alias_method :last?, :last
77
+ # The request method. Examples: "GET", "HEAD", "PUT", "POST".
78
+ # Corresponds to the JSON property `requestMethod`
79
+ # @return [String]
80
+ attr_accessor :request_method
90
81
 
91
- # Optional. An arbitrary operation identifier. Log entries with the same
92
- # identifier are assumed to be part of the same operation.
93
- # Corresponds to the JSON property `id`
82
+ # The size of the HTTP request message in bytes, including the request headers
83
+ # and the request body.
84
+ # Corresponds to the JSON property `requestSize`
94
85
  # @return [String]
95
- attr_accessor :id
86
+ attr_accessor :request_size
96
87
 
97
- # Optional. An arbitrary producer identifier. The combination of id and producer
98
- # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com",
99
- # "github.com/MyProject/MyApplication".
100
- # Corresponds to the JSON property `producer`
88
+ # The size of the HTTP response message sent back to the client, in bytes,
89
+ # including the response headers and the response body.
90
+ # Corresponds to the JSON property `responseSize`
101
91
  # @return [String]
102
- attr_accessor :producer
92
+ attr_accessor :response_size
103
93
 
104
- # Optional. Set this to True if this is the first log entry in the operation.
105
- # Corresponds to the JSON property `first`
106
- # @return [Boolean]
107
- attr_accessor :first
108
- alias_method :first?, :first
94
+ # The scheme (http, https), the host name, the path and the query portion of the
95
+ # URL that was requested. Example: "http://example.com/some/info?color=red".
96
+ # Corresponds to the JSON property `requestUrl`
97
+ # @return [String]
98
+ attr_accessor :request_url
109
99
 
110
- def initialize(**args)
111
- update!(**args)
112
- end
100
+ # The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
101
+ # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329".
102
+ # Corresponds to the JSON property `remoteIp`
103
+ # @return [String]
104
+ attr_accessor :remote_ip
113
105
 
114
- # Update properties of this object
115
- def update!(**args)
116
- @last = args[:last] if args.key?(:last)
117
- @id = args[:id] if args.key?(:id)
118
- @producer = args[:producer] if args.key?(:producer)
119
- @first = args[:first] if args.key?(:first)
120
- end
121
- end
106
+ # The IP address (IPv4 or IPv6) of the origin server that the request was sent
107
+ # to.
108
+ # Corresponds to the JSON property `serverIp`
109
+ # @return [String]
110
+ attr_accessor :server_ip
122
111
 
123
- # Describes a logs-based metric. The value of the metric is the number of log
124
- # entries that match a logs filter in a given time interval.
125
- class LogMetric
126
- include Google::Apis::Core::Hashable
112
+ # Whether or not a cache lookup was attempted.
113
+ # Corresponds to the JSON property `cacheLookup`
114
+ # @return [Boolean]
115
+ attr_accessor :cache_lookup
116
+ alias_method :cache_lookup?, :cache_lookup
127
117
 
128
- # Output only. The API version that created or updated this metric. The version
129
- # also dictates the syntax of the filter expression. When a value for this field
130
- # is missing, the default value of V2 should be assumed.
131
- # Corresponds to the JSON property `version`
132
- # @return [String]
133
- attr_accessor :version
118
+ # Whether or not an entity was served from cache (with or without validation).
119
+ # Corresponds to the JSON property `cacheHit`
120
+ # @return [Boolean]
121
+ attr_accessor :cache_hit
122
+ alias_method :cache_hit?, :cache_hit
134
123
 
135
- # Required. An advanced logs filter which is used to match log entries. Example:
136
- # "resource.type=gae_app AND severity>=ERROR"
137
- # The maximum length of the filter is 20000 characters.
138
- # Corresponds to the JSON property `filter`
139
- # @return [String]
140
- attr_accessor :filter
124
+ # Whether or not the response was validated with the origin server before being
125
+ # served from cache. This field is only meaningful if cache_hit is True.
126
+ # Corresponds to the JSON property `cacheValidatedWithOriginServer`
127
+ # @return [Boolean]
128
+ attr_accessor :cache_validated_with_origin_server
129
+ alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server
141
130
 
142
- # Required. The client-assigned metric identifier. Examples: "error_count", "
143
- # nginx/requests".Metric identifiers are limited to 100 characters and can
144
- # include only the following characters: A-Z, a-z, 0-9, and the special
145
- # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy
146
- # of name pieces, and it cannot be the first character of the name.The metric
147
- # identifier in this field must not be URL-encoded (https://en.wikipedia.org/
148
- # wiki/Percent-encoding). However, when the metric identifier appears as the [
149
- # METRIC_ID] part of a metric_name API parameter, then the metric identifier
150
- # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
151
- # Corresponds to the JSON property `name`
152
- # @return [String]
153
- attr_accessor :name
131
+ # The response code indicating the status of response. Examples: 200, 404.
132
+ # Corresponds to the JSON property `status`
133
+ # @return [Fixnum]
134
+ attr_accessor :status
154
135
 
155
- # Optional. A description of this metric, which is used in documentation.
156
- # Corresponds to the JSON property `description`
136
+ # The referer URL of the request, as defined in HTTP/1.1 Header Field
137
+ # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
138
+ # Corresponds to the JSON property `referer`
157
139
  # @return [String]
158
- attr_accessor :description
140
+ attr_accessor :referer
159
141
 
160
142
  def initialize(**args)
161
143
  update!(**args)
@@ -163,54 +145,68 @@ module Google
163
145
 
164
146
  # Update properties of this object
165
147
  def update!(**args)
166
- @version = args[:version] if args.key?(:version)
167
- @filter = args[:filter] if args.key?(:filter)
168
- @name = args[:name] if args.key?(:name)
169
- @description = args[:description] if args.key?(:description)
148
+ @latency = args[:latency] if args.key?(:latency)
149
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
150
+ @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes)
151
+ @request_method = args[:request_method] if args.key?(:request_method)
152
+ @request_size = args[:request_size] if args.key?(:request_size)
153
+ @response_size = args[:response_size] if args.key?(:response_size)
154
+ @request_url = args[:request_url] if args.key?(:request_url)
155
+ @remote_ip = args[:remote_ip] if args.key?(:remote_ip)
156
+ @server_ip = args[:server_ip] if args.key?(:server_ip)
157
+ @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup)
158
+ @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
159
+ @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server)
160
+ @status = args[:status] if args.key?(:status)
161
+ @referer = args[:referer] if args.key?(:referer)
170
162
  end
171
163
  end
172
164
 
173
- # Result returned from WriteLogEntries. empty
174
- class WriteLogEntriesResponse
165
+ # Result returned from ListSinks.
166
+ class ListSinksResponse
175
167
  include Google::Apis::Core::Hashable
176
168
 
169
+ # A list of sinks.
170
+ # Corresponds to the JSON property `sinks`
171
+ # @return [Array<Google::Apis::LoggingV2beta1::LogSink>]
172
+ attr_accessor :sinks
173
+
174
+ # If there might be more results than appear in this response, then
175
+ # nextPageToken is included. To get the next set of results, call the same
176
+ # method again using the value of nextPageToken as pageToken.
177
+ # Corresponds to the JSON property `nextPageToken`
178
+ # @return [String]
179
+ attr_accessor :next_page_token
180
+
177
181
  def initialize(**args)
178
182
  update!(**args)
179
183
  end
180
184
 
181
185
  # Update properties of this object
182
186
  def update!(**args)
187
+ @sinks = args[:sinks] if args.key?(:sinks)
188
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
183
189
  end
184
190
  end
185
191
 
186
- # An object representing a resource that can be used for monitoring, logging,
187
- # billing, or other purposes. Examples include virtual machine instances,
188
- # databases, and storage devices such as disks. The type field identifies a
189
- # MonitoredResourceDescriptor object that describes the resource's schema.
190
- # Information in the labels field identifies the actual resource and its
191
- # attributes according to the schema. For example, a particular Compute Engine
192
- # VM instance could be represented by the following object, because the
193
- # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
194
- # zone":
195
- # ` "type": "gce_instance",
196
- # "labels": ` "instance_id": "12345678901234",
197
- # "zone": "us-central1-a" ``
198
- class MonitoredResource
192
+ # A description of a label.
193
+ class LabelDescriptor
199
194
  include Google::Apis::Core::Hashable
200
195
 
201
- # Required. The monitored resource type. This field must match the type field of
202
- # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL
203
- # database is "cloudsql_database".
204
- # Corresponds to the JSON property `type`
196
+ # The label key.
197
+ # Corresponds to the JSON property `key`
205
198
  # @return [String]
206
- attr_accessor :type
199
+ attr_accessor :key
207
200
 
208
- # Required. Values for all of the labels listed in the associated monitored
209
- # resource descriptor. For example, Cloud SQL databases use the labels "
210
- # database_id" and "zone".
211
- # Corresponds to the JSON property `labels`
212
- # @return [Hash<String,String>]
213
- attr_accessor :labels
201
+ # A human-readable description for the label.
202
+ # Corresponds to the JSON property `description`
203
+ # @return [String]
204
+ attr_accessor :description
205
+
206
+ # The type of data that can be assigned to the label.
207
+ # Corresponds to the JSON property `valueType`
208
+ # @return [String]
209
+ attr_accessor :value_type
214
210
 
215
211
  def initialize(**args)
216
212
  update!(**args)
@@ -218,70 +214,58 @@ module Google
218
214
 
219
215
  # Update properties of this object
220
216
  def update!(**args)
221
- @type = args[:type] if args.key?(:type)
222
- @labels = args[:labels] if args.key?(:labels)
217
+ @key = args[:key] if args.key?(:key)
218
+ @description = args[:description] if args.key?(:description)
219
+ @value_type = args[:value_type] if args.key?(:value_type)
223
220
  end
224
221
  end
225
222
 
226
- # The parameters to WriteLogEntries.
227
- class WriteLogEntriesRequest
228
- include Google::Apis::Core::Hashable
229
-
230
- # Optional. Default labels that are added to the labels field of all log entries
231
- # in entries. If a log entry already has a label with the same key as a label in
232
- # this parameter, then the log entry's label is not changed. See LogEntry.
233
- # Corresponds to the JSON property `labels`
234
- # @return [Hash<String,String>]
235
- attr_accessor :labels
223
+ # An object that describes the schema of a MonitoredResource object using a type
224
+ # name and a set of labels. For example, the monitored resource descriptor for
225
+ # Google Compute Engine VM instances has a type of "gce_instance" and specifies
226
+ # the use of the labels "instance_id" and "zone" to identify particular VM
227
+ # instances.Different APIs can support different monitored resource types. APIs
228
+ # generally provide a list method that returns the monitored resource
229
+ # descriptors used by the API.
230
+ class MonitoredResourceDescriptor
231
+ include Google::Apis::Core::Hashable
236
232
 
237
- # An object representing a resource that can be used for monitoring, logging,
238
- # billing, or other purposes. Examples include virtual machine instances,
239
- # databases, and storage devices such as disks. The type field identifies a
240
- # MonitoredResourceDescriptor object that describes the resource's schema.
241
- # Information in the labels field identifies the actual resource and its
242
- # attributes according to the schema. For example, a particular Compute Engine
243
- # VM instance could be represented by the following object, because the
244
- # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
245
- # zone":
246
- # ` "type": "gce_instance",
247
- # "labels": ` "instance_id": "12345678901234",
248
- # "zone": "us-central1-a" ``
249
- # Corresponds to the JSON property `resource`
250
- # @return [Google::Apis::LoggingV2beta1::MonitoredResource]
251
- attr_accessor :resource
233
+ # Optional. The resource name of the monitored resource descriptor: "projects/`
234
+ # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of
235
+ # the type field in this object and `project_id` is a project ID that provides
236
+ # API-specific context for accessing the type. APIs that do not use project
237
+ # information can use the resource name format "monitoredResourceDescriptors/`
238
+ # type`".
239
+ # Corresponds to the JSON property `name`
240
+ # @return [String]
241
+ attr_accessor :name
252
242
 
253
- # Optional. A default log resource name that is assigned to all log entries in
254
- # entries that do not specify a value for log_name:
255
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
256
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
257
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
258
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
259
- # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
260
- # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
261
- # 2Factivity". For more information about log names, see LogEntry.
262
- # Corresponds to the JSON property `logName`
243
+ # Optional. A concise name for the monitored resource type that might be
244
+ # displayed in user interfaces. It should be a Title Cased Noun Phrase, without
245
+ # any article or other determiners. For example, "Google Cloud SQL Database".
246
+ # Corresponds to the JSON property `displayName`
263
247
  # @return [String]
264
- attr_accessor :log_name
248
+ attr_accessor :display_name
265
249
 
266
- # Required. The log entries to write. Values supplied for the fields log_name,
267
- # resource, and labels in this entries.write request are added to those log
268
- # entries that do not provide their own values for the fields.To improve
269
- # throughput and to avoid exceeding the quota limit for calls to entries.write,
270
- # you should write multiple log entries at once rather than calling this method
271
- # for each individual log entry.
272
- # Corresponds to the JSON property `entries`
273
- # @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
274
- attr_accessor :entries
250
+ # Optional. A detailed description of the monitored resource type that might be
251
+ # used in documentation.
252
+ # Corresponds to the JSON property `description`
253
+ # @return [String]
254
+ attr_accessor :description
275
255
 
276
- # Optional. Whether valid entries should be written even if some other entries
277
- # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not
278
- # written, the response status will be the error associated with one of the
279
- # failed entries and include error details in the form of
280
- # WriteLogEntriesPartialErrors.
281
- # Corresponds to the JSON property `partialSuccess`
282
- # @return [Boolean]
283
- attr_accessor :partial_success
284
- alias_method :partial_success?, :partial_success
256
+ # Required. The monitored resource type. For example, the type "
257
+ # cloudsql_database" represents databases in Google Cloud SQL. The maximum
258
+ # length of this value is 256 characters.
259
+ # Corresponds to the JSON property `type`
260
+ # @return [String]
261
+ attr_accessor :type
262
+
263
+ # Required. A set of labels used to describe instances of this monitored
264
+ # resource type. For example, an individual Google Cloud SQL database is
265
+ # identified by values for the labels "database_id" and "zone".
266
+ # Corresponds to the JSON property `labels`
267
+ # @return [Array<Google::Apis::LoggingV2beta1::LabelDescriptor>]
268
+ attr_accessor :labels
285
269
 
286
270
  def initialize(**args)
287
271
  update!(**args)
@@ -289,84 +273,39 @@ module Google
289
273
 
290
274
  # Update properties of this object
291
275
  def update!(**args)
276
+ @name = args[:name] if args.key?(:name)
277
+ @display_name = args[:display_name] if args.key?(:display_name)
278
+ @description = args[:description] if args.key?(:description)
279
+ @type = args[:type] if args.key?(:type)
292
280
  @labels = args[:labels] if args.key?(:labels)
293
- @resource = args[:resource] if args.key?(:resource)
294
- @log_name = args[:log_name] if args.key?(:log_name)
295
- @entries = args[:entries] if args.key?(:entries)
296
- @partial_success = args[:partial_success] if args.key?(:partial_success)
297
281
  end
298
282
  end
299
283
 
300
- # Describes a sink used to export log entries to one of the following
301
- # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
302
- # Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
303
- # The sink must be created within a project, organization, billing account, or
304
- # folder.
305
- class LogSink
284
+ # Additional information about the source code location that produced the log
285
+ # entry.
286
+ class LogEntrySourceLocation
306
287
  include Google::Apis::Core::Hashable
307
288
 
308
- # Required. The client-assigned sink identifier, unique within the project.
309
- # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100
310
- # characters and can include only the following characters: upper and lower-case
311
- # alphanumeric characters, underscores, hyphens, and periods.
312
- # Corresponds to the JSON property `name`
313
- # @return [String]
314
- attr_accessor :name
315
-
316
- # Optional. An advanced logs filter. The only exported log entries are those
317
- # that are in the resource owning the sink and that match the filter. The filter
318
- # must use the log entry format specified by the output_version_format parameter.
319
- # For example, in the v2 format:
320
- # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
321
- # Corresponds to the JSON property `filter`
322
- # @return [String]
323
- attr_accessor :filter
324
-
325
- # Required. The export destination:
326
- # "storage.googleapis.com/[GCS_BUCKET]"
327
- # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
328
- # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
329
- # The sink's writer_identity, set when the sink is created, must have permission
330
- # to write to the destination or else the log entries are not exported. For more
331
- # information, see Exporting Logs With Sinks.
332
- # Corresponds to the JSON property `destination`
333
- # @return [String]
334
- attr_accessor :destination
335
-
336
- # Optional. The time at which this sink will stop exporting log entries. Log
337
- # entries are exported only if their timestamp is earlier than the end time. If
338
- # this field is not supplied, there is no end time. If both a start time and an
339
- # end time are provided, then the end time must be later than the start time.
340
- # Corresponds to the JSON property `endTime`
341
- # @return [String]
342
- attr_accessor :end_time
343
-
344
- # Optional. The time at which this sink will begin exporting log entries. Log
345
- # entries are exported only if their timestamp is not earlier than the start
346
- # time. The default value of this field is the time the sink is created or
347
- # updated.
348
- # Corresponds to the JSON property `startTime`
289
+ # Optional. Human-readable name of the function or method being invoked, with
290
+ # optional context such as the class or package name. This information may be
291
+ # used in contexts such as the logs viewer, where a file and line number are
292
+ # less meaningful. The format can vary by language. For example: qual.if.ied.
293
+ # Class.method (Java), dir/package.func (Go), function (Python).
294
+ # Corresponds to the JSON property `function`
349
295
  # @return [String]
350
- attr_accessor :start_time
296
+ attr_accessor :function
351
297
 
352
- # Output only. An IAM identity&mdash;a service account or group&mdash;under
353
- # which Stackdriver Logging writes the exported log entries to the sink's
354
- # destination. This field is set by sinks.create and sinks.update, based on the
355
- # setting of unique_writer_identity in those methods.Until you grant this
356
- # identity write-access to the destination, log entry exports from this sink
357
- # will fail. For more information, see Granting access for a resource. Consult
358
- # the destination service's documentation to determine the appropriate IAM roles
359
- # to assign to the identity.
360
- # Corresponds to the JSON property `writerIdentity`
298
+ # Optional. Line within the source file. 1-based; 0 indicates no line number
299
+ # available.
300
+ # Corresponds to the JSON property `line`
361
301
  # @return [String]
362
- attr_accessor :writer_identity
302
+ attr_accessor :line
363
303
 
364
- # Optional. The log entry format to use for this sink's exported log entries.
365
- # The v2 format is used by default. The v1 format is deprecated and should be
366
- # used only as part of a migration effort to v2. See Migration to the v2 API.
367
- # Corresponds to the JSON property `outputVersionFormat`
304
+ # Optional. Source file name. Depending on the runtime environment, this might
305
+ # be a simple name or a fully-qualified name.
306
+ # Corresponds to the JSON property `file`
368
307
  # @return [String]
369
- attr_accessor :output_version_format
308
+ attr_accessor :file
370
309
 
371
310
  def initialize(**args)
372
311
  update!(**args)
@@ -374,29 +313,30 @@ module Google
374
313
 
375
314
  # Update properties of this object
376
315
  def update!(**args)
377
- @name = args[:name] if args.key?(:name)
378
- @filter = args[:filter] if args.key?(:filter)
379
- @destination = args[:destination] if args.key?(:destination)
380
- @end_time = args[:end_time] if args.key?(:end_time)
381
- @start_time = args[:start_time] if args.key?(:start_time)
382
- @writer_identity = args[:writer_identity] if args.key?(:writer_identity)
383
- @output_version_format = args[:output_version_format] if args.key?(:output_version_format)
316
+ @function = args[:function] if args.key?(:function)
317
+ @line = args[:line] if args.key?(:line)
318
+ @file = args[:file] if args.key?(:file)
384
319
  end
385
320
  end
386
321
 
387
- # Result returned from ListLogs.
388
- class ListLogsResponse
322
+ # Result returned from ListLogEntries.
323
+ class ListLogEntriesResponse
389
324
  include Google::Apis::Core::Hashable
390
325
 
391
- # A list of log names. For example, "projects/my-project/syslog" or "
392
- # organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
393
- # Corresponds to the JSON property `logNames`
394
- # @return [Array<String>]
395
- attr_accessor :log_names
326
+ # A list of log entries.
327
+ # Corresponds to the JSON property `entries`
328
+ # @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
329
+ attr_accessor :entries
396
330
 
397
331
  # If there might be more results than those appearing in this response, then
398
332
  # nextPageToken is included. To get the next set of results, call this method
399
- # again using the value of nextPageToken as pageToken.
333
+ # again using the value of nextPageToken as pageToken.If a value for
334
+ # next_page_token appears and the entries field is empty, it means that the
335
+ # search found no log entries so far but it did not have time to search all the
336
+ # possible log entries. Retry the method with this value for page_token to
337
+ # continue the search. Alternatively, consider speeding up the search by
338
+ # changing your filter to specify a single log name or resource type, or to
339
+ # narrow the time range of the search.
400
340
  # Corresponds to the JSON property `nextPageToken`
401
341
  # @return [String]
402
342
  attr_accessor :next_page_token
@@ -407,227 +347,206 @@ module Google
407
347
 
408
348
  # Update properties of this object
409
349
  def update!(**args)
410
- @log_names = args[:log_names] if args.key?(:log_names)
350
+ @entries = args[:entries] if args.key?(:entries)
411
351
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
412
352
  end
413
353
  end
414
354
 
415
- # A common proto for logging HTTP requests. Only contains semantics defined by
416
- # the HTTP specification. Product-specific logging information MUST be defined
417
- # in a separate message.
418
- class HttpRequest
355
+ # Application log line emitted while processing a request.
356
+ class LogLine
419
357
  include Google::Apis::Core::Hashable
420
358
 
421
- # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0;
422
- # Windows 98; Q312461; .NET CLR 1.0.3705)".
423
- # Corresponds to the JSON property `userAgent`
424
- # @return [String]
425
- attr_accessor :user_agent
426
-
427
- # The request processing latency on the server, from the time the request was
428
- # received until the response was sent.
429
- # Corresponds to the JSON property `latency`
359
+ # Approximate time when this log entry was made.
360
+ # Corresponds to the JSON property `time`
430
361
  # @return [String]
431
- attr_accessor :latency
362
+ attr_accessor :time
432
363
 
433
- # The number of HTTP response bytes inserted into cache. Set only when a cache
434
- # fill was attempted.
435
- # Corresponds to the JSON property `cacheFillBytes`
364
+ # Severity of this log entry.
365
+ # Corresponds to the JSON property `severity`
436
366
  # @return [String]
437
- attr_accessor :cache_fill_bytes
367
+ attr_accessor :severity
438
368
 
439
- # The request method. Examples: "GET", "HEAD", "PUT", "POST".
440
- # Corresponds to the JSON property `requestMethod`
369
+ # App-provided log message.
370
+ # Corresponds to the JSON property `logMessage`
441
371
  # @return [String]
442
- attr_accessor :request_method
372
+ attr_accessor :log_message
443
373
 
444
- # The size of the HTTP response message sent back to the client, in bytes,
445
- # including the response headers and the response body.
446
- # Corresponds to the JSON property `responseSize`
447
- # @return [String]
448
- attr_accessor :response_size
374
+ # Specifies a location in a source code file.
375
+ # Corresponds to the JSON property `sourceLocation`
376
+ # @return [Google::Apis::LoggingV2beta1::SourceLocation]
377
+ attr_accessor :source_location
449
378
 
450
- # The size of the HTTP request message in bytes, including the request headers
451
- # and the request body.
452
- # Corresponds to the JSON property `requestSize`
453
- # @return [String]
454
- attr_accessor :request_size
455
-
456
- # The scheme (http, https), the host name, the path and the query portion of the
457
- # URL that was requested. Example: "http://example.com/some/info?color=red".
458
- # Corresponds to the JSON property `requestUrl`
459
- # @return [String]
460
- attr_accessor :request_url
461
-
462
- # The IP address (IPv4 or IPv6) of the origin server that the request was sent
463
- # to.
464
- # Corresponds to the JSON property `serverIp`
465
- # @return [String]
466
- attr_accessor :server_ip
467
-
468
- # The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
469
- # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329".
470
- # Corresponds to the JSON property `remoteIp`
471
- # @return [String]
472
- attr_accessor :remote_ip
473
-
474
- # Whether or not a cache lookup was attempted.
475
- # Corresponds to the JSON property `cacheLookup`
476
- # @return [Boolean]
477
- attr_accessor :cache_lookup
478
- alias_method :cache_lookup?, :cache_lookup
479
-
480
- # Whether or not an entity was served from cache (with or without validation).
481
- # Corresponds to the JSON property `cacheHit`
482
- # @return [Boolean]
483
- attr_accessor :cache_hit
484
- alias_method :cache_hit?, :cache_hit
485
-
486
- # Whether or not the response was validated with the origin server before being
487
- # served from cache. This field is only meaningful if cache_hit is True.
488
- # Corresponds to the JSON property `cacheValidatedWithOriginServer`
489
- # @return [Boolean]
490
- attr_accessor :cache_validated_with_origin_server
491
- alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server
492
-
493
- # The response code indicating the status of response. Examples: 200, 404.
494
- # Corresponds to the JSON property `status`
495
- # @return [Fixnum]
496
- attr_accessor :status
497
-
498
- # The referer URL of the request, as defined in HTTP/1.1 Header Field
499
- # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
500
- # Corresponds to the JSON property `referer`
501
- # @return [String]
502
- attr_accessor :referer
503
-
504
- def initialize(**args)
505
- update!(**args)
506
- end
379
+ def initialize(**args)
380
+ update!(**args)
381
+ end
507
382
 
508
383
  # Update properties of this object
509
384
  def update!(**args)
510
- @user_agent = args[:user_agent] if args.key?(:user_agent)
511
- @latency = args[:latency] if args.key?(:latency)
512
- @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes)
513
- @request_method = args[:request_method] if args.key?(:request_method)
514
- @response_size = args[:response_size] if args.key?(:response_size)
515
- @request_size = args[:request_size] if args.key?(:request_size)
516
- @request_url = args[:request_url] if args.key?(:request_url)
517
- @server_ip = args[:server_ip] if args.key?(:server_ip)
518
- @remote_ip = args[:remote_ip] if args.key?(:remote_ip)
519
- @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup)
520
- @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
521
- @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server)
522
- @status = args[:status] if args.key?(:status)
523
- @referer = args[:referer] if args.key?(:referer)
385
+ @time = args[:time] if args.key?(:time)
386
+ @severity = args[:severity] if args.key?(:severity)
387
+ @log_message = args[:log_message] if args.key?(:log_message)
388
+ @source_location = args[:source_location] if args.key?(:source_location)
524
389
  end
525
390
  end
526
391
 
527
- # Result returned from ListSinks.
528
- class ListSinksResponse
392
+ # Result returned from ListLogMetrics.
393
+ class ListLogMetricsResponse
529
394
  include Google::Apis::Core::Hashable
530
395
 
396
+ # A list of logs-based metrics.
397
+ # Corresponds to the JSON property `metrics`
398
+ # @return [Array<Google::Apis::LoggingV2beta1::LogMetric>]
399
+ attr_accessor :metrics
400
+
531
401
  # If there might be more results than appear in this response, then
532
- # nextPageToken is included. To get the next set of results, call the same
533
- # method again using the value of nextPageToken as pageToken.
402
+ # nextPageToken is included. To get the next set of results, call this method
403
+ # again using the value of nextPageToken as pageToken.
534
404
  # Corresponds to the JSON property `nextPageToken`
535
405
  # @return [String]
536
406
  attr_accessor :next_page_token
537
407
 
538
- # A list of sinks.
539
- # Corresponds to the JSON property `sinks`
540
- # @return [Array<Google::Apis::LoggingV2beta1::LogSink>]
541
- attr_accessor :sinks
542
-
543
408
  def initialize(**args)
544
409
  update!(**args)
545
410
  end
546
411
 
547
412
  # Update properties of this object
548
413
  def update!(**args)
414
+ @metrics = args[:metrics] if args.key?(:metrics)
549
415
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
550
- @sinks = args[:sinks] if args.key?(:sinks)
551
416
  end
552
417
  end
553
418
 
554
- # A description of a label.
555
- class LabelDescriptor
419
+ # A generic empty message that you can re-use to avoid defining duplicated empty
420
+ # messages in your APIs. A typical example is to use it as the request or the
421
+ # response type of an API method. For instance:
422
+ # service Foo `
423
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
424
+ # `
425
+ # The JSON representation for Empty is empty JSON object ``.
426
+ class Empty
556
427
  include Google::Apis::Core::Hashable
557
428
 
558
- # The label key.
559
- # Corresponds to the JSON property `key`
560
- # @return [String]
561
- attr_accessor :key
562
-
563
- # A human-readable description for the label.
564
- # Corresponds to the JSON property `description`
565
- # @return [String]
566
- attr_accessor :description
567
-
568
- # The type of data that can be assigned to the label.
569
- # Corresponds to the JSON property `valueType`
570
- # @return [String]
571
- attr_accessor :value_type
572
-
573
429
  def initialize(**args)
574
430
  update!(**args)
575
431
  end
576
432
 
577
433
  # Update properties of this object
578
434
  def update!(**args)
579
- @key = args[:key] if args.key?(:key)
580
- @description = args[:description] if args.key?(:description)
581
- @value_type = args[:value_type] if args.key?(:value_type)
582
435
  end
583
436
  end
584
437
 
585
- # An object that describes the schema of a MonitoredResource object using a type
586
- # name and a set of labels. For example, the monitored resource descriptor for
587
- # Google Compute Engine VM instances has a type of "gce_instance" and specifies
588
- # the use of the labels "instance_id" and "zone" to identify particular VM
589
- # instances.Different APIs can support different monitored resource types. APIs
590
- # generally provide a list method that returns the monitored resource
591
- # descriptors used by the API.
592
- class MonitoredResourceDescriptor
438
+ # An individual entry in a log.
439
+ class LogEntry
593
440
  include Google::Apis::Core::Hashable
594
441
 
595
- # Optional. The resource name of the monitored resource descriptor: "projects/`
596
- # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of
597
- # the type field in this object and `project_id` is a project ID that provides
598
- # API-specific context for accessing the type. APIs that do not use project
599
- # information can use the resource name format "monitoredResourceDescriptors/`
600
- # type`".
601
- # Corresponds to the JSON property `name`
442
+ # Optional. Resource name of the trace associated with the log entry, if any. If
443
+ # it contains a relative resource name, the name is assumed to be relative to //
444
+ # tracing.googleapis.com. Example: projects/my-projectid/traces/
445
+ # 06796866738c859f2f19b7cfb3214824
446
+ # Corresponds to the JSON property `trace`
602
447
  # @return [String]
603
- attr_accessor :name
448
+ attr_accessor :trace
604
449
 
605
- # Optional. A concise name for the monitored resource type that might be
606
- # displayed in user interfaces. It should be a Title Cased Noun Phrase, without
607
- # any article or other determiners. For example, "Google Cloud SQL Database".
608
- # Corresponds to the JSON property `displayName`
450
+ # Optional. A set of user-defined (key, value) data that provides additional
451
+ # information about the log entry.
452
+ # Corresponds to the JSON property `labels`
453
+ # @return [Hash<String,String>]
454
+ attr_accessor :labels
455
+
456
+ # Optional. The severity of the log entry. The default value is LogSeverity.
457
+ # DEFAULT.
458
+ # Corresponds to the JSON property `severity`
609
459
  # @return [String]
610
- attr_accessor :display_name
460
+ attr_accessor :severity
611
461
 
612
- # Optional. A detailed description of the monitored resource type that might be
613
- # used in documentation.
614
- # Corresponds to the JSON property `description`
462
+ # Additional information about the source code location that produced the log
463
+ # entry.
464
+ # Corresponds to the JSON property `sourceLocation`
465
+ # @return [Google::Apis::LoggingV2beta1::LogEntrySourceLocation]
466
+ attr_accessor :source_location
467
+
468
+ # Optional. The time the event described by the log entry occurred. If omitted
469
+ # in a new log entry, Stackdriver Logging will insert the time the log entry is
470
+ # received. Stackdriver Logging might reject log entries whose time stamps are
471
+ # more than a couple of hours in the future. Log entries with time stamps in the
472
+ # past are accepted.
473
+ # Corresponds to the JSON property `timestamp`
615
474
  # @return [String]
616
- attr_accessor :description
475
+ attr_accessor :timestamp
617
476
 
618
- # Required. The monitored resource type. For example, the type "
619
- # cloudsql_database" represents databases in Google Cloud SQL. The maximum
620
- # length of this value is 256 characters.
621
- # Corresponds to the JSON property `type`
477
+ # Required. The resource name of the log to which this log entry belongs:
478
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
479
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
480
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
481
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
482
+ # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/
483
+ # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must
484
+ # be less than 512 characters long and can only include the following characters:
485
+ # upper and lower case alphanumeric characters, forward-slash, underscore,
486
+ # hyphen, and period.For backward compatibility, if log_name begins with a
487
+ # forward-slash, such as /projects/..., then the log entry is ingested as usual
488
+ # but the forward-slash is removed. Listing the log entry will not show the
489
+ # leading slash and filtering for a log name with a leading slash will never
490
+ # return any results.
491
+ # Corresponds to the JSON property `logName`
622
492
  # @return [String]
623
- attr_accessor :type
493
+ attr_accessor :log_name
624
494
 
625
- # Required. A set of labels used to describe instances of this monitored
626
- # resource type. For example, an individual Google Cloud SQL database is
627
- # identified by values for the labels "database_id" and "zone".
628
- # Corresponds to the JSON property `labels`
629
- # @return [Array<Google::Apis::LoggingV2beta1::LabelDescriptor>]
630
- attr_accessor :labels
495
+ # A common proto for logging HTTP requests. Only contains semantics defined by
496
+ # the HTTP specification. Product-specific logging information MUST be defined
497
+ # in a separate message.
498
+ # Corresponds to the JSON property `httpRequest`
499
+ # @return [Google::Apis::LoggingV2beta1::HttpRequest]
500
+ attr_accessor :http_request
501
+
502
+ # An object representing a resource that can be used for monitoring, logging,
503
+ # billing, or other purposes. Examples include virtual machine instances,
504
+ # databases, and storage devices such as disks. The type field identifies a
505
+ # MonitoredResourceDescriptor object that describes the resource's schema.
506
+ # Information in the labels field identifies the actual resource and its
507
+ # attributes according to the schema. For example, a particular Compute Engine
508
+ # VM instance could be represented by the following object, because the
509
+ # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
510
+ # zone":
511
+ # ` "type": "gce_instance",
512
+ # "labels": ` "instance_id": "12345678901234",
513
+ # "zone": "us-central1-a" ``
514
+ # Corresponds to the JSON property `resource`
515
+ # @return [Google::Apis::LoggingV2beta1::MonitoredResource]
516
+ attr_accessor :resource
517
+
518
+ # The log entry payload, represented as a structure that is expressed as a JSON
519
+ # object.
520
+ # Corresponds to the JSON property `jsonPayload`
521
+ # @return [Hash<String,Object>]
522
+ attr_accessor :json_payload
523
+
524
+ # Additional information about a potentially long-running operation with which a
525
+ # log entry is associated.
526
+ # Corresponds to the JSON property `operation`
527
+ # @return [Google::Apis::LoggingV2beta1::LogEntryOperation]
528
+ attr_accessor :operation
529
+
530
+ # Optional. A unique identifier for the log entry. If you provide a value, then
531
+ # Stackdriver Logging considers other log entries in the same project, with the
532
+ # same timestamp, and with the same insert_id to be duplicates which can be
533
+ # removed. If omitted in new log entries, then Stackdriver Logging will insert
534
+ # its own unique identifier. The insert_id is used to order log entries that
535
+ # have the same timestamp value.
536
+ # Corresponds to the JSON property `insertId`
537
+ # @return [String]
538
+ attr_accessor :insert_id
539
+
540
+ # The log entry payload, represented as a Unicode string (UTF-8).
541
+ # Corresponds to the JSON property `textPayload`
542
+ # @return [String]
543
+ attr_accessor :text_payload
544
+
545
+ # The log entry payload, represented as a protocol buffer. Some Google Cloud
546
+ # Platform services use this field for their log entry payloads.
547
+ # Corresponds to the JSON property `protoPayload`
548
+ # @return [Hash<String,Object>]
549
+ attr_accessor :proto_payload
631
550
 
632
551
  def initialize(**args)
633
552
  update!(**args)
@@ -635,36 +554,42 @@ module Google
635
554
 
636
555
  # Update properties of this object
637
556
  def update!(**args)
638
- @name = args[:name] if args.key?(:name)
639
- @display_name = args[:display_name] if args.key?(:display_name)
640
- @description = args[:description] if args.key?(:description)
641
- @type = args[:type] if args.key?(:type)
557
+ @trace = args[:trace] if args.key?(:trace)
642
558
  @labels = args[:labels] if args.key?(:labels)
559
+ @severity = args[:severity] if args.key?(:severity)
560
+ @source_location = args[:source_location] if args.key?(:source_location)
561
+ @timestamp = args[:timestamp] if args.key?(:timestamp)
562
+ @log_name = args[:log_name] if args.key?(:log_name)
563
+ @http_request = args[:http_request] if args.key?(:http_request)
564
+ @resource = args[:resource] if args.key?(:resource)
565
+ @json_payload = args[:json_payload] if args.key?(:json_payload)
566
+ @operation = args[:operation] if args.key?(:operation)
567
+ @insert_id = args[:insert_id] if args.key?(:insert_id)
568
+ @text_payload = args[:text_payload] if args.key?(:text_payload)
569
+ @proto_payload = args[:proto_payload] if args.key?(:proto_payload)
643
570
  end
644
571
  end
645
572
 
646
- # Additional information about the source code location that produced the log
647
- # entry.
648
- class LogEntrySourceLocation
573
+ # Specifies a location in a source code file.
574
+ class SourceLocation
649
575
  include Google::Apis::Core::Hashable
650
576
 
651
- # Optional. Source file name. Depending on the runtime environment, this might
652
- # be a simple name or a fully-qualified name.
577
+ # Source file name. Depending on the runtime environment, this might be a simple
578
+ # name or a fully-qualified name.
653
579
  # Corresponds to the JSON property `file`
654
580
  # @return [String]
655
581
  attr_accessor :file
656
582
 
657
- # Optional. Human-readable name of the function or method being invoked, with
658
- # optional context such as the class or package name. This information may be
659
- # used in contexts such as the logs viewer, where a file and line number are
660
- # less meaningful. The format can vary by language. For example: qual.if.ied.
661
- # Class.method (Java), dir/package.func (Go), function (Python).
662
- # Corresponds to the JSON property `function`
583
+ # Human-readable name of the function or method being invoked, with optional
584
+ # context such as the class or package name. This information is used in
585
+ # contexts such as the logs viewer, where a file and line number are less
586
+ # meaningful. The format can vary by language. For example: qual.if.ied.Class.
587
+ # method (Java), dir/package.func (Go), function (Python).
588
+ # Corresponds to the JSON property `functionName`
663
589
  # @return [String]
664
- attr_accessor :function
590
+ attr_accessor :function_name
665
591
 
666
- # Optional. Line within the source file. 1-based; 0 indicates no line number
667
- # available.
592
+ # Line within the source file.
668
593
  # Corresponds to the JSON property `line`
669
594
  # @return [String]
670
595
  attr_accessor :line
@@ -676,67 +601,67 @@ module Google
676
601
  # Update properties of this object
677
602
  def update!(**args)
678
603
  @file = args[:file] if args.key?(:file)
679
- @function = args[:function] if args.key?(:function)
604
+ @function_name = args[:function_name] if args.key?(:function_name)
680
605
  @line = args[:line] if args.key?(:line)
681
606
  end
682
607
  end
683
608
 
684
- # Result returned from ListLogEntries.
685
- class ListLogEntriesResponse
609
+ # The parameters to ListLogEntries.
610
+ class ListLogEntriesRequest
686
611
  include Google::Apis::Core::Hashable
687
612
 
688
- # A list of log entries.
689
- # Corresponds to the JSON property `entries`
690
- # @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
691
- attr_accessor :entries
692
-
693
- # If there might be more results than those appearing in this response, then
694
- # nextPageToken is included. To get the next set of results, call this method
695
- # again using the value of nextPageToken as pageToken.If a value for
696
- # next_page_token appears and the entries field is empty, it means that the
697
- # search found no log entries so far but it did not have time to search all the
698
- # possible log entries. Retry the method with this value for page_token to
699
- # continue the search. Alternatively, consider speeding up the search by
700
- # changing your filter to specify a single log name or resource type, or to
701
- # narrow the time range of the search.
702
- # Corresponds to the JSON property `nextPageToken`
613
+ # Optional. If present, then retrieve the next batch of results from the
614
+ # preceding call to this method. page_token must be the value of next_page_token
615
+ # from the previous response. The values of other method parameters should be
616
+ # identical to those in the previous call.
617
+ # Corresponds to the JSON property `pageToken`
703
618
  # @return [String]
704
- attr_accessor :next_page_token
705
-
706
- def initialize(**args)
707
- update!(**args)
708
- end
709
-
710
- # Update properties of this object
711
- def update!(**args)
712
- @entries = args[:entries] if args.key?(:entries)
713
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
714
- end
715
- end
716
-
717
- # Application log line emitted while processing a request.
718
- class LogLine
719
- include Google::Apis::Core::Hashable
619
+ attr_accessor :page_token
720
620
 
721
- # Specifies a location in a source code file.
722
- # Corresponds to the JSON property `sourceLocation`
723
- # @return [Google::Apis::LoggingV2beta1::SourceLocation]
724
- attr_accessor :source_location
621
+ # Optional. The maximum number of results to return from this request. Non-
622
+ # positive values are ignored. The presence of next_page_token in the response
623
+ # indicates that more results might be available.
624
+ # Corresponds to the JSON property `pageSize`
625
+ # @return [Fixnum]
626
+ attr_accessor :page_size
725
627
 
726
- # Approximate time when this log entry was made.
727
- # Corresponds to the JSON property `time`
628
+ # Optional. How the results should be sorted. Presently, the only permitted
629
+ # values are "timestamp asc" (default) and "timestamp desc". The first option
630
+ # returns entries in order of increasing values of LogEntry.timestamp (oldest
631
+ # first), and the second option returns entries in order of decreasing
632
+ # timestamps (newest first). Entries with equal timestamps are returned in order
633
+ # of their insert_id values.
634
+ # Corresponds to the JSON property `orderBy`
728
635
  # @return [String]
729
- attr_accessor :time
636
+ attr_accessor :order_by
730
637
 
731
- # Severity of this log entry.
732
- # Corresponds to the JSON property `severity`
733
- # @return [String]
734
- attr_accessor :severity
638
+ # Required. Names of one or more parent resources from which to retrieve log
639
+ # entries:
640
+ # "projects/[PROJECT_ID]"
641
+ # "organizations/[ORGANIZATION_ID]"
642
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
643
+ # "folders/[FOLDER_ID]"
644
+ # Projects listed in the project_ids field are added to this list.
645
+ # Corresponds to the JSON property `resourceNames`
646
+ # @return [Array<String>]
647
+ attr_accessor :resource_names
735
648
 
736
- # App-provided log message.
737
- # Corresponds to the JSON property `logMessage`
649
+ # Optional. A filter that chooses which log entries to return. See Advanced Logs
650
+ # Filters. Only log entries that match the filter are returned. An empty filter
651
+ # matches all log entries in the resources listed in resource_names. Referencing
652
+ # a parent resource that is not listed in resource_names will cause the filter
653
+ # to return no results. The maximum length of the filter is 20000 characters.
654
+ # Corresponds to the JSON property `filter`
738
655
  # @return [String]
739
- attr_accessor :log_message
656
+ attr_accessor :filter
657
+
658
+ # Deprecated. Use resource_names instead. One or more project identifiers or
659
+ # project numbers from which to retrieve log entries. Example: "my-project-1A".
660
+ # If present, these project identifiers are converted to resource name format
661
+ # and added to the list of resources in resource_names.
662
+ # Corresponds to the JSON property `projectIds`
663
+ # @return [Array<String>]
664
+ attr_accessor :project_ids
740
665
 
741
666
  def initialize(**args)
742
667
  update!(**args)
@@ -744,301 +669,159 @@ module Google
744
669
 
745
670
  # Update properties of this object
746
671
  def update!(**args)
747
- @source_location = args[:source_location] if args.key?(:source_location)
748
- @time = args[:time] if args.key?(:time)
749
- @severity = args[:severity] if args.key?(:severity)
750
- @log_message = args[:log_message] if args.key?(:log_message)
672
+ @page_token = args[:page_token] if args.key?(:page_token)
673
+ @page_size = args[:page_size] if args.key?(:page_size)
674
+ @order_by = args[:order_by] if args.key?(:order_by)
675
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
676
+ @filter = args[:filter] if args.key?(:filter)
677
+ @project_ids = args[:project_ids] if args.key?(:project_ids)
751
678
  end
752
679
  end
753
680
 
754
- # Result returned from ListLogMetrics.
755
- class ListLogMetricsResponse
681
+ # Complete log information about a single HTTP request to an App Engine
682
+ # application.
683
+ class RequestLog
756
684
  include Google::Apis::Core::Hashable
757
685
 
758
- # A list of logs-based metrics.
759
- # Corresponds to the JSON property `metrics`
760
- # @return [Array<Google::Apis::LoggingV2beta1::LogMetric>]
761
- attr_accessor :metrics
686
+ # If the instance processing this request belongs to a manually scaled module,
687
+ # then this is the 0-based index of the instance. Otherwise, this value is -1.
688
+ # Corresponds to the JSON property `instanceIndex`
689
+ # @return [Fixnum]
690
+ attr_accessor :instance_index
762
691
 
763
- # If there might be more results than appear in this response, then
764
- # nextPageToken is included. To get the next set of results, call this method
765
- # again using the value of nextPageToken as pageToken.
766
- # Corresponds to the JSON property `nextPageToken`
767
- # @return [String]
768
- attr_accessor :next_page_token
692
+ # Whether this request is finished or active.
693
+ # Corresponds to the JSON property `finished`
694
+ # @return [Boolean]
695
+ attr_accessor :finished
696
+ alias_method :finished?, :finished
769
697
 
770
- def initialize(**args)
771
- update!(**args)
772
- end
698
+ # Internet host and port number of the resource being requested.
699
+ # Corresponds to the JSON property `host`
700
+ # @return [String]
701
+ attr_accessor :host
773
702
 
774
- # Update properties of this object
775
- def update!(**args)
776
- @metrics = args[:metrics] if args.key?(:metrics)
777
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
778
- end
779
- end
703
+ # HTTP version of request. Example: "HTTP/1.1".
704
+ # Corresponds to the JSON property `httpVersion`
705
+ # @return [String]
706
+ attr_accessor :http_version
780
707
 
781
- # An individual entry in a log.
782
- class LogEntry
783
- include Google::Apis::Core::Hashable
708
+ # Time when the request started.
709
+ # Corresponds to the JSON property `startTime`
710
+ # @return [String]
711
+ attr_accessor :start_time
784
712
 
785
- # Required. The resource name of the log to which this log entry belongs:
786
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
787
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
788
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
789
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
790
- # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/
791
- # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must
792
- # be less than 512 characters long and can only include the following characters:
793
- # upper and lower case alphanumeric characters, forward-slash, underscore,
794
- # hyphen, and period.For backward compatibility, if log_name begins with a
795
- # forward-slash, such as /projects/..., then the log entry is ingested as usual
796
- # but the forward-slash is removed. Listing the log entry will not show the
797
- # leading slash and filtering for a log name with a leading slash will never
798
- # return any results.
799
- # Corresponds to the JSON property `logName`
713
+ # Latency of the request.
714
+ # Corresponds to the JSON property `latency`
800
715
  # @return [String]
801
- attr_accessor :log_name
716
+ attr_accessor :latency
802
717
 
803
- # A common proto for logging HTTP requests. Only contains semantics defined by
804
- # the HTTP specification. Product-specific logging information MUST be defined
805
- # in a separate message.
806
- # Corresponds to the JSON property `httpRequest`
807
- # @return [Google::Apis::LoggingV2beta1::HttpRequest]
808
- attr_accessor :http_request
718
+ # Origin IP address.
719
+ # Corresponds to the JSON property `ip`
720
+ # @return [String]
721
+ attr_accessor :ip
809
722
 
810
- # An object representing a resource that can be used for monitoring, logging,
811
- # billing, or other purposes. Examples include virtual machine instances,
812
- # databases, and storage devices such as disks. The type field identifies a
813
- # MonitoredResourceDescriptor object that describes the resource's schema.
814
- # Information in the labels field identifies the actual resource and its
815
- # attributes according to the schema. For example, a particular Compute Engine
816
- # VM instance could be represented by the following object, because the
817
- # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
818
- # zone":
819
- # ` "type": "gce_instance",
820
- # "labels": ` "instance_id": "12345678901234",
821
- # "zone": "us-central1-a" ``
822
- # Corresponds to the JSON property `resource`
823
- # @return [Google::Apis::LoggingV2beta1::MonitoredResource]
824
- attr_accessor :resource
723
+ # Application that handled this request.
724
+ # Corresponds to the JSON property `appId`
725
+ # @return [String]
726
+ attr_accessor :app_id
825
727
 
826
- # The log entry payload, represented as a structure that is expressed as a JSON
827
- # object.
828
- # Corresponds to the JSON property `jsonPayload`
829
- # @return [Hash<String,Object>]
830
- attr_accessor :json_payload
728
+ # App Engine release version.
729
+ # Corresponds to the JSON property `appEngineRelease`
730
+ # @return [String]
731
+ attr_accessor :app_engine_release
831
732
 
832
- # Optional. A unique ID for the log entry. If you provide this field, the
833
- # logging service considers other log entries in the same project with the same
834
- # ID as duplicates which can be removed. If omitted, Stackdriver Logging will
835
- # generate a unique ID for this log entry.
836
- # Corresponds to the JSON property `insertId`
733
+ # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE".
734
+ # Corresponds to the JSON property `method`
837
735
  # @return [String]
838
- attr_accessor :insert_id
736
+ attr_accessor :method_prop
839
737
 
840
- # Additional information about a potentially long-running operation with which a
841
- # log entry is associated.
842
- # Corresponds to the JSON property `operation`
843
- # @return [Google::Apis::LoggingV2beta1::LogEntryOperation]
844
- attr_accessor :operation
738
+ # An indication of the relative cost of serving this request.
739
+ # Corresponds to the JSON property `cost`
740
+ # @return [Float]
741
+ attr_accessor :cost
845
742
 
846
- # The log entry payload, represented as a Unicode string (UTF-8).
847
- # Corresponds to the JSON property `textPayload`
743
+ # An identifier for the instance that handled the request.
744
+ # Corresponds to the JSON property `instanceId`
848
745
  # @return [String]
849
- attr_accessor :text_payload
746
+ attr_accessor :instance_id
850
747
 
851
- # The log entry payload, represented as a protocol buffer. Some Google Cloud
852
- # Platform services use this field for their log entry payloads.
853
- # Corresponds to the JSON property `protoPayload`
854
- # @return [Hash<String,Object>]
855
- attr_accessor :proto_payload
856
-
857
- # Optional. Resource name of the trace associated with the log entry, if any. If
858
- # it contains a relative resource name, the name is assumed to be relative to //
859
- # tracing.googleapis.com. Example: projects/my-projectid/traces/
860
- # 06796866738c859f2f19b7cfb3214824
861
- # Corresponds to the JSON property `trace`
748
+ # Number of CPU megacycles used to process request.
749
+ # Corresponds to the JSON property `megaCycles`
862
750
  # @return [String]
863
- attr_accessor :trace
751
+ attr_accessor :mega_cycles
864
752
 
865
- # Optional. A set of user-defined (key, value) data that provides additional
866
- # information about the log entry.
867
- # Corresponds to the JSON property `labels`
868
- # @return [Hash<String,String>]
869
- attr_accessor :labels
753
+ # Whether this is the first RequestLog entry for this request. If an active
754
+ # request has several RequestLog entries written to Stackdriver Logging, then
755
+ # this field will be set for one of them.
756
+ # Corresponds to the JSON property `first`
757
+ # @return [Boolean]
758
+ attr_accessor :first
759
+ alias_method :first?, :first
870
760
 
871
- # Optional. The severity of the log entry. The default value is LogSeverity.
872
- # DEFAULT.
873
- # Corresponds to the JSON property `severity`
761
+ # Version of the application that handled this request.
762
+ # Corresponds to the JSON property `versionId`
874
763
  # @return [String]
875
- attr_accessor :severity
876
-
877
- # Additional information about the source code location that produced the log
878
- # entry.
879
- # Corresponds to the JSON property `sourceLocation`
880
- # @return [Google::Apis::LoggingV2beta1::LogEntrySourceLocation]
881
- attr_accessor :source_location
764
+ attr_accessor :version_id
882
765
 
883
- # Optional. The time the event described by the log entry occurred. If omitted,
884
- # Stackdriver Logging will use the time the log entry is received.
885
- # Corresponds to the JSON property `timestamp`
766
+ # Module of the application that handled this request.
767
+ # Corresponds to the JSON property `moduleId`
886
768
  # @return [String]
887
- attr_accessor :timestamp
888
-
889
- def initialize(**args)
890
- update!(**args)
891
- end
892
-
893
- # Update properties of this object
894
- def update!(**args)
895
- @log_name = args[:log_name] if args.key?(:log_name)
896
- @http_request = args[:http_request] if args.key?(:http_request)
897
- @resource = args[:resource] if args.key?(:resource)
898
- @json_payload = args[:json_payload] if args.key?(:json_payload)
899
- @insert_id = args[:insert_id] if args.key?(:insert_id)
900
- @operation = args[:operation] if args.key?(:operation)
901
- @text_payload = args[:text_payload] if args.key?(:text_payload)
902
- @proto_payload = args[:proto_payload] if args.key?(:proto_payload)
903
- @trace = args[:trace] if args.key?(:trace)
904
- @labels = args[:labels] if args.key?(:labels)
905
- @severity = args[:severity] if args.key?(:severity)
906
- @source_location = args[:source_location] if args.key?(:source_location)
907
- @timestamp = args[:timestamp] if args.key?(:timestamp)
908
- end
909
- end
769
+ attr_accessor :module_id
910
770
 
911
- # A generic empty message that you can re-use to avoid defining duplicated empty
912
- # messages in your APIs. A typical example is to use it as the request or the
913
- # response type of an API method. For instance:
914
- # service Foo `
915
- # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
916
- # `
917
- # The JSON representation for Empty is empty JSON object ``.
918
- class Empty
919
- include Google::Apis::Core::Hashable
771
+ # Time when the request finished.
772
+ # Corresponds to the JSON property `endTime`
773
+ # @return [String]
774
+ attr_accessor :end_time
920
775
 
921
- def initialize(**args)
922
- update!(**args)
923
- end
776
+ # User agent that made the request.
777
+ # Corresponds to the JSON property `userAgent`
778
+ # @return [String]
779
+ attr_accessor :user_agent
924
780
 
925
- # Update properties of this object
926
- def update!(**args)
927
- end
928
- end
781
+ # Whether this was a loading request for the instance.
782
+ # Corresponds to the JSON property `wasLoadingRequest`
783
+ # @return [Boolean]
784
+ attr_accessor :was_loading_request
785
+ alias_method :was_loading_request?, :was_loading_request
929
786
 
930
- # Specifies a location in a source code file.
931
- class SourceLocation
932
- include Google::Apis::Core::Hashable
787
+ # Source code for the application that handled this request. There can be more
788
+ # than one source reference per deployed application if source code is
789
+ # distributed among multiple repositories.
790
+ # Corresponds to the JSON property `sourceReference`
791
+ # @return [Array<Google::Apis::LoggingV2beta1::SourceReference>]
792
+ attr_accessor :source_reference
933
793
 
934
- # Source file name. Depending on the runtime environment, this might be a simple
935
- # name or a fully-qualified name.
936
- # Corresponds to the JSON property `file`
794
+ # Size in bytes sent back to client by request.
795
+ # Corresponds to the JSON property `responseSize`
937
796
  # @return [String]
938
- attr_accessor :file
797
+ attr_accessor :response_size
939
798
 
940
- # Human-readable name of the function or method being invoked, with optional
941
- # context such as the class or package name. This information is used in
942
- # contexts such as the logs viewer, where a file and line number are less
943
- # meaningful. The format can vary by language. For example: qual.if.ied.Class.
944
- # method (Java), dir/package.func (Go), function (Python).
945
- # Corresponds to the JSON property `functionName`
799
+ # Stackdriver Trace identifier for this request.
800
+ # Corresponds to the JSON property `traceId`
946
801
  # @return [String]
947
- attr_accessor :function_name
802
+ attr_accessor :trace_id
948
803
 
949
- # Line within the source file.
804
+ # A list of log lines emitted by the application while serving this request.
950
805
  # Corresponds to the JSON property `line`
951
- # @return [String]
806
+ # @return [Array<Google::Apis::LoggingV2beta1::LogLine>]
952
807
  attr_accessor :line
953
808
 
954
- def initialize(**args)
955
- update!(**args)
956
- end
957
-
958
- # Update properties of this object
959
- def update!(**args)
960
- @file = args[:file] if args.key?(:file)
961
- @function_name = args[:function_name] if args.key?(:function_name)
962
- @line = args[:line] if args.key?(:line)
963
- end
964
- end
965
-
966
- # The parameters to ListLogEntries.
967
- class ListLogEntriesRequest
968
- include Google::Apis::Core::Hashable
969
-
970
- # Optional. How the results should be sorted. Presently, the only permitted
971
- # values are "timestamp asc" (default) and "timestamp desc". The first option
972
- # returns entries in order of increasing values of LogEntry.timestamp (oldest
973
- # first), and the second option returns entries in order of decreasing
974
- # timestamps (newest first). Entries with equal timestamps are returned in order
975
- # of LogEntry.insertId.
976
- # Corresponds to the JSON property `orderBy`
809
+ # Queue name of the request, in the case of an offline request.
810
+ # Corresponds to the JSON property `taskQueueName`
977
811
  # @return [String]
978
- attr_accessor :order_by
979
-
980
- # Required. Names of one or more parent resources from which to retrieve log
981
- # entries:
982
- # "projects/[PROJECT_ID]"
983
- # "organizations/[ORGANIZATION_ID]"
984
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
985
- # "folders/[FOLDER_ID]"
986
- # Projects listed in the project_ids field are added to this list.
987
- # Corresponds to the JSON property `resourceNames`
988
- # @return [Array<String>]
989
- attr_accessor :resource_names
812
+ attr_accessor :task_queue_name
990
813
 
991
- # Optional. A filter that chooses which log entries to return. See Advanced Logs
992
- # Filters. Only log entries that match the filter are returned. An empty filter
993
- # matches all log entries in the resources listed in resource_names. Referencing
994
- # a parent resource that is not listed in resource_names will cause the filter
995
- # to return no results. The maximum length of the filter is 20000 characters.
996
- # Corresponds to the JSON property `filter`
814
+ # Referrer URL of request.
815
+ # Corresponds to the JSON property `referrer`
997
816
  # @return [String]
998
- attr_accessor :filter
999
-
1000
- # Deprecated. Use resource_names instead. One or more project identifiers or
1001
- # project numbers from which to retrieve log entries. Example: "my-project-1A".
1002
- # If present, these project identifiers are converted to resource name format
1003
- # and added to the list of resources in resource_names.
1004
- # Corresponds to the JSON property `projectIds`
1005
- # @return [Array<String>]
1006
- attr_accessor :project_ids
817
+ attr_accessor :referrer
1007
818
 
1008
- # Optional. If present, then retrieve the next batch of results from the
1009
- # preceding call to this method. pageToken must be the value of nextPageToken
1010
- # from the previous response. The values of other method parameters should be
1011
- # identical to those in the previous call.
1012
- # Corresponds to the JSON property `pageToken`
819
+ # Globally unique identifier for a request, which is based on the request start
820
+ # time. Request IDs for requests which started later will compare greater as
821
+ # strings than those for requests which started earlier.
822
+ # Corresponds to the JSON property `requestId`
1013
823
  # @return [String]
1014
- attr_accessor :page_token
1015
-
1016
- # Optional. The maximum number of results to return from this request. Non-
1017
- # positive values are ignored. The presence of nextPageToken in the response
1018
- # indicates that more results might be available.
1019
- # Corresponds to the JSON property `pageSize`
1020
- # @return [Fixnum]
1021
- attr_accessor :page_size
1022
-
1023
- def initialize(**args)
1024
- update!(**args)
1025
- end
1026
-
1027
- # Update properties of this object
1028
- def update!(**args)
1029
- @order_by = args[:order_by] if args.key?(:order_by)
1030
- @resource_names = args[:resource_names] if args.key?(:resource_names)
1031
- @filter = args[:filter] if args.key?(:filter)
1032
- @project_ids = args[:project_ids] if args.key?(:project_ids)
1033
- @page_token = args[:page_token] if args.key?(:page_token)
1034
- @page_size = args[:page_size] if args.key?(:page_size)
1035
- end
1036
- end
1037
-
1038
- # Complete log information about a single HTTP request to an App Engine
1039
- # application.
1040
- class RequestLog
1041
- include Google::Apis::Core::Hashable
824
+ attr_accessor :request_id
1042
825
 
1043
826
  # The logged-in user who made the request.Most likely, this is the part of the
1044
827
  # user's email before the @ sign. The field value is the same for different
@@ -1077,145 +860,398 @@ module Google
1077
860
  # @return [String]
1078
861
  attr_accessor :url_map_entry
1079
862
 
1080
- # If the instance processing this request belongs to a manually scaled module,
1081
- # then this is the 0-based index of the instance. Otherwise, this value is -1.
1082
- # Corresponds to the JSON property `instanceIndex`
1083
- # @return [Fixnum]
1084
- attr_accessor :instance_index
1085
-
1086
- # Whether this request is finished or active.
1087
- # Corresponds to the JSON property `finished`
1088
- # @return [Boolean]
1089
- attr_accessor :finished
1090
- alias_method :finished?, :finished
1091
-
1092
- # Internet host and port number of the resource being requested.
1093
- # Corresponds to the JSON property `host`
1094
- # @return [String]
1095
- attr_accessor :host
1096
-
1097
- # HTTP version of request. Example: "HTTP/1.1".
1098
- # Corresponds to the JSON property `httpVersion`
1099
- # @return [String]
1100
- attr_accessor :http_version
1101
-
1102
- # Time when the request started.
1103
- # Corresponds to the JSON property `startTime`
1104
- # @return [String]
1105
- attr_accessor :start_time
1106
-
1107
- # Latency of the request.
1108
- # Corresponds to the JSON property `latency`
1109
- # @return [String]
1110
- attr_accessor :latency
1111
-
1112
- # Origin IP address.
1113
- # Corresponds to the JSON property `ip`
1114
- # @return [String]
1115
- attr_accessor :ip
863
+ def initialize(**args)
864
+ update!(**args)
865
+ end
1116
866
 
1117
- # Application that handled this request.
1118
- # Corresponds to the JSON property `appId`
867
+ # Update properties of this object
868
+ def update!(**args)
869
+ @instance_index = args[:instance_index] if args.key?(:instance_index)
870
+ @finished = args[:finished] if args.key?(:finished)
871
+ @host = args[:host] if args.key?(:host)
872
+ @http_version = args[:http_version] if args.key?(:http_version)
873
+ @start_time = args[:start_time] if args.key?(:start_time)
874
+ @latency = args[:latency] if args.key?(:latency)
875
+ @ip = args[:ip] if args.key?(:ip)
876
+ @app_id = args[:app_id] if args.key?(:app_id)
877
+ @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release)
878
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
879
+ @cost = args[:cost] if args.key?(:cost)
880
+ @instance_id = args[:instance_id] if args.key?(:instance_id)
881
+ @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles)
882
+ @first = args[:first] if args.key?(:first)
883
+ @version_id = args[:version_id] if args.key?(:version_id)
884
+ @module_id = args[:module_id] if args.key?(:module_id)
885
+ @end_time = args[:end_time] if args.key?(:end_time)
886
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
887
+ @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request)
888
+ @source_reference = args[:source_reference] if args.key?(:source_reference)
889
+ @response_size = args[:response_size] if args.key?(:response_size)
890
+ @trace_id = args[:trace_id] if args.key?(:trace_id)
891
+ @line = args[:line] if args.key?(:line)
892
+ @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name)
893
+ @referrer = args[:referrer] if args.key?(:referrer)
894
+ @request_id = args[:request_id] if args.key?(:request_id)
895
+ @nickname = args[:nickname] if args.key?(:nickname)
896
+ @status = args[:status] if args.key?(:status)
897
+ @resource = args[:resource] if args.key?(:resource)
898
+ @pending_time = args[:pending_time] if args.key?(:pending_time)
899
+ @task_name = args[:task_name] if args.key?(:task_name)
900
+ @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry)
901
+ end
902
+ end
903
+
904
+ # Result returned from ListMonitoredResourceDescriptors.
905
+ class ListMonitoredResourceDescriptorsResponse
906
+ include Google::Apis::Core::Hashable
907
+
908
+ # A list of resource descriptors.
909
+ # Corresponds to the JSON property `resourceDescriptors`
910
+ # @return [Array<Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor>]
911
+ attr_accessor :resource_descriptors
912
+
913
+ # If there might be more results than those appearing in this response, then
914
+ # nextPageToken is included. To get the next set of results, call this method
915
+ # again using the value of nextPageToken as pageToken.
916
+ # Corresponds to the JSON property `nextPageToken`
1119
917
  # @return [String]
1120
- attr_accessor :app_id
918
+ attr_accessor :next_page_token
1121
919
 
1122
- # App Engine release version.
1123
- # Corresponds to the JSON property `appEngineRelease`
920
+ def initialize(**args)
921
+ update!(**args)
922
+ end
923
+
924
+ # Update properties of this object
925
+ def update!(**args)
926
+ @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)
927
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
928
+ end
929
+ end
930
+
931
+ # A reference to a particular snapshot of the source tree used to build and
932
+ # deploy an application.
933
+ class SourceReference
934
+ include Google::Apis::Core::Hashable
935
+
936
+ # The canonical and persistent identifier of the deployed revision. Example (git)
937
+ # : "0035781c50ec7aa23385dc841529ce8a4b70db1b"
938
+ # Corresponds to the JSON property `revisionId`
1124
939
  # @return [String]
1125
- attr_accessor :app_engine_release
940
+ attr_accessor :revision_id
1126
941
 
1127
- # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE".
1128
- # Corresponds to the JSON property `method`
942
+ # Optional. A URI string identifying the repository. Example: "https://github.
943
+ # com/GoogleCloudPlatform/kubernetes.git"
944
+ # Corresponds to the JSON property `repository`
1129
945
  # @return [String]
1130
- attr_accessor :method_prop
946
+ attr_accessor :repository
1131
947
 
1132
- # An indication of the relative cost of serving this request.
1133
- # Corresponds to the JSON property `cost`
1134
- # @return [Float]
1135
- attr_accessor :cost
948
+ def initialize(**args)
949
+ update!(**args)
950
+ end
1136
951
 
1137
- # An identifier for the instance that handled the request.
1138
- # Corresponds to the JSON property `instanceId`
952
+ # Update properties of this object
953
+ def update!(**args)
954
+ @revision_id = args[:revision_id] if args.key?(:revision_id)
955
+ @repository = args[:repository] if args.key?(:repository)
956
+ end
957
+ end
958
+
959
+ # Describes a logs-based metric. The value of the metric is the number of log
960
+ # entries that match a logs filter in a given time interval.
961
+ class LogMetric
962
+ include Google::Apis::Core::Hashable
963
+
964
+ # Required. The client-assigned metric identifier. Examples: "error_count", "
965
+ # nginx/requests".Metric identifiers are limited to 100 characters and can
966
+ # include only the following characters: A-Z, a-z, 0-9, and the special
967
+ # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy
968
+ # of name pieces, and it cannot be the first character of the name.The metric
969
+ # identifier in this field must not be URL-encoded (https://en.wikipedia.org/
970
+ # wiki/Percent-encoding). However, when the metric identifier appears as the [
971
+ # METRIC_ID] part of a metric_name API parameter, then the metric identifier
972
+ # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
973
+ # Corresponds to the JSON property `name`
1139
974
  # @return [String]
1140
- attr_accessor :instance_id
975
+ attr_accessor :name
1141
976
 
1142
- # Number of CPU megacycles used to process request.
1143
- # Corresponds to the JSON property `megaCycles`
977
+ # Optional. A description of this metric, which is used in documentation.
978
+ # Corresponds to the JSON property `description`
1144
979
  # @return [String]
1145
- attr_accessor :mega_cycles
980
+ attr_accessor :description
1146
981
 
1147
- # Whether this is the first RequestLog entry for this request. If an active
1148
- # request has several RequestLog entries written to Stackdriver Logging, then
1149
- # this field will be set for one of them.
982
+ # Output only. The API version that created or updated this metric. The version
983
+ # also dictates the syntax of the filter expression. When a value for this field
984
+ # is missing, the default value of V2 should be assumed.
985
+ # Corresponds to the JSON property `version`
986
+ # @return [String]
987
+ attr_accessor :version
988
+
989
+ # Required. An advanced logs filter which is used to match log entries. Example:
990
+ # "resource.type=gae_app AND severity>=ERROR"
991
+ # The maximum length of the filter is 20000 characters.
992
+ # Corresponds to the JSON property `filter`
993
+ # @return [String]
994
+ attr_accessor :filter
995
+
996
+ def initialize(**args)
997
+ update!(**args)
998
+ end
999
+
1000
+ # Update properties of this object
1001
+ def update!(**args)
1002
+ @name = args[:name] if args.key?(:name)
1003
+ @description = args[:description] if args.key?(:description)
1004
+ @version = args[:version] if args.key?(:version)
1005
+ @filter = args[:filter] if args.key?(:filter)
1006
+ end
1007
+ end
1008
+
1009
+ # Additional information about a potentially long-running operation with which a
1010
+ # log entry is associated.
1011
+ class LogEntryOperation
1012
+ include Google::Apis::Core::Hashable
1013
+
1014
+ # Optional. Set this to True if this is the last log entry in the operation.
1015
+ # Corresponds to the JSON property `last`
1016
+ # @return [Boolean]
1017
+ attr_accessor :last
1018
+ alias_method :last?, :last
1019
+
1020
+ # Optional. An arbitrary operation identifier. Log entries with the same
1021
+ # identifier are assumed to be part of the same operation.
1022
+ # Corresponds to the JSON property `id`
1023
+ # @return [String]
1024
+ attr_accessor :id
1025
+
1026
+ # Optional. An arbitrary producer identifier. The combination of id and producer
1027
+ # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com",
1028
+ # "github.com/MyProject/MyApplication".
1029
+ # Corresponds to the JSON property `producer`
1030
+ # @return [String]
1031
+ attr_accessor :producer
1032
+
1033
+ # Optional. Set this to True if this is the first log entry in the operation.
1150
1034
  # Corresponds to the JSON property `first`
1151
1035
  # @return [Boolean]
1152
1036
  attr_accessor :first
1153
1037
  alias_method :first?, :first
1154
1038
 
1155
- # Version of the application that handled this request.
1156
- # Corresponds to the JSON property `versionId`
1039
+ def initialize(**args)
1040
+ update!(**args)
1041
+ end
1042
+
1043
+ # Update properties of this object
1044
+ def update!(**args)
1045
+ @last = args[:last] if args.key?(:last)
1046
+ @id = args[:id] if args.key?(:id)
1047
+ @producer = args[:producer] if args.key?(:producer)
1048
+ @first = args[:first] if args.key?(:first)
1049
+ end
1050
+ end
1051
+
1052
+ # Result returned from WriteLogEntries. empty
1053
+ class WriteLogEntriesResponse
1054
+ include Google::Apis::Core::Hashable
1055
+
1056
+ def initialize(**args)
1057
+ update!(**args)
1058
+ end
1059
+
1060
+ # Update properties of this object
1061
+ def update!(**args)
1062
+ end
1063
+ end
1064
+
1065
+ # An object representing a resource that can be used for monitoring, logging,
1066
+ # billing, or other purposes. Examples include virtual machine instances,
1067
+ # databases, and storage devices such as disks. The type field identifies a
1068
+ # MonitoredResourceDescriptor object that describes the resource's schema.
1069
+ # Information in the labels field identifies the actual resource and its
1070
+ # attributes according to the schema. For example, a particular Compute Engine
1071
+ # VM instance could be represented by the following object, because the
1072
+ # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
1073
+ # zone":
1074
+ # ` "type": "gce_instance",
1075
+ # "labels": ` "instance_id": "12345678901234",
1076
+ # "zone": "us-central1-a" ``
1077
+ class MonitoredResource
1078
+ include Google::Apis::Core::Hashable
1079
+
1080
+ # Required. Values for all of the labels listed in the associated monitored
1081
+ # resource descriptor. For example, Cloud SQL databases use the labels "
1082
+ # database_id" and "zone".
1083
+ # Corresponds to the JSON property `labels`
1084
+ # @return [Hash<String,String>]
1085
+ attr_accessor :labels
1086
+
1087
+ # Required. The monitored resource type. This field must match the type field of
1088
+ # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL
1089
+ # database is "cloudsql_database".
1090
+ # Corresponds to the JSON property `type`
1157
1091
  # @return [String]
1158
- attr_accessor :version_id
1092
+ attr_accessor :type
1159
1093
 
1160
- # Module of the application that handled this request.
1161
- # Corresponds to the JSON property `moduleId`
1094
+ def initialize(**args)
1095
+ update!(**args)
1096
+ end
1097
+
1098
+ # Update properties of this object
1099
+ def update!(**args)
1100
+ @labels = args[:labels] if args.key?(:labels)
1101
+ @type = args[:type] if args.key?(:type)
1102
+ end
1103
+ end
1104
+
1105
+ # Describes a sink used to export log entries to one of the following
1106
+ # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
1107
+ # Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
1108
+ # The sink must be created within a project, organization, billing account, or
1109
+ # folder.
1110
+ class LogSink
1111
+ include Google::Apis::Core::Hashable
1112
+
1113
+ # Required. The client-assigned sink identifier, unique within the project.
1114
+ # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100
1115
+ # characters and can include only the following characters: upper and lower-case
1116
+ # alphanumeric characters, underscores, hyphens, and periods.
1117
+ # Corresponds to the JSON property `name`
1162
1118
  # @return [String]
1163
- attr_accessor :module_id
1119
+ attr_accessor :name
1164
1120
 
1165
- # Time when the request finished.
1166
- # Corresponds to the JSON property `endTime`
1121
+ # Required. The export destination:
1122
+ # "storage.googleapis.com/[GCS_BUCKET]"
1123
+ # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
1124
+ # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
1125
+ # The sink's writer_identity, set when the sink is created, must have permission
1126
+ # to write to the destination or else the log entries are not exported. For more
1127
+ # information, see Exporting Logs With Sinks.
1128
+ # Corresponds to the JSON property `destination`
1167
1129
  # @return [String]
1168
- attr_accessor :end_time
1130
+ attr_accessor :destination
1169
1131
 
1170
- # User agent that made the request.
1171
- # Corresponds to the JSON property `userAgent`
1132
+ # Optional. An advanced logs filter. The only exported log entries are those
1133
+ # that are in the resource owning the sink and that match the filter. The filter
1134
+ # must use the log entry format specified by the output_version_format parameter.
1135
+ # For example, in the v2 format:
1136
+ # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
1137
+ # Corresponds to the JSON property `filter`
1172
1138
  # @return [String]
1173
- attr_accessor :user_agent
1139
+ attr_accessor :filter
1174
1140
 
1175
- # Whether this was a loading request for the instance.
1176
- # Corresponds to the JSON property `wasLoadingRequest`
1177
- # @return [Boolean]
1178
- attr_accessor :was_loading_request
1179
- alias_method :was_loading_request?, :was_loading_request
1141
+ # Optional. The time at which this sink will stop exporting log entries. Log
1142
+ # entries are exported only if their timestamp is earlier than the end time. If
1143
+ # this field is not supplied, there is no end time. If both a start time and an
1144
+ # end time are provided, then the end time must be later than the start time.
1145
+ # Corresponds to the JSON property `endTime`
1146
+ # @return [String]
1147
+ attr_accessor :end_time
1180
1148
 
1181
- # Source code for the application that handled this request. There can be more
1182
- # than one source reference per deployed application if source code is
1183
- # distributed among multiple repositories.
1184
- # Corresponds to the JSON property `sourceReference`
1185
- # @return [Array<Google::Apis::LoggingV2beta1::SourceReference>]
1186
- attr_accessor :source_reference
1149
+ # Output only. An IAM identity&mdash;a service account or group&mdash;under
1150
+ # which Stackdriver Logging writes the exported log entries to the sink's
1151
+ # destination. This field is set by sinks.create and sinks.update, based on the
1152
+ # setting of unique_writer_identity in those methods.Until you grant this
1153
+ # identity write-access to the destination, log entry exports from this sink
1154
+ # will fail. For more information, see Granting access for a resource. Consult
1155
+ # the destination service's documentation to determine the appropriate IAM roles
1156
+ # to assign to the identity.
1157
+ # Corresponds to the JSON property `writerIdentity`
1158
+ # @return [String]
1159
+ attr_accessor :writer_identity
1187
1160
 
1188
- # Size in bytes sent back to client by request.
1189
- # Corresponds to the JSON property `responseSize`
1161
+ # Optional. The time at which this sink will begin exporting log entries. Log
1162
+ # entries are exported only if their timestamp is not earlier than the start
1163
+ # time. The default value of this field is the time the sink is created or
1164
+ # updated.
1165
+ # Corresponds to the JSON property `startTime`
1190
1166
  # @return [String]
1191
- attr_accessor :response_size
1167
+ attr_accessor :start_time
1192
1168
 
1193
- # Stackdriver Trace identifier for this request.
1194
- # Corresponds to the JSON property `traceId`
1169
+ # Optional. The log entry format to use for this sink's exported log entries.
1170
+ # The v2 format is used by default. The v1 format is deprecated and should be
1171
+ # used only as part of a migration effort to v2. See Migration to the v2 API.
1172
+ # Corresponds to the JSON property `outputVersionFormat`
1195
1173
  # @return [String]
1196
- attr_accessor :trace_id
1174
+ attr_accessor :output_version_format
1197
1175
 
1198
- # A list of log lines emitted by the application while serving this request.
1199
- # Corresponds to the JSON property `line`
1200
- # @return [Array<Google::Apis::LoggingV2beta1::LogLine>]
1201
- attr_accessor :line
1176
+ def initialize(**args)
1177
+ update!(**args)
1178
+ end
1202
1179
 
1203
- # Referrer URL of request.
1204
- # Corresponds to the JSON property `referrer`
1205
- # @return [String]
1206
- attr_accessor :referrer
1180
+ # Update properties of this object
1181
+ def update!(**args)
1182
+ @name = args[:name] if args.key?(:name)
1183
+ @destination = args[:destination] if args.key?(:destination)
1184
+ @filter = args[:filter] if args.key?(:filter)
1185
+ @end_time = args[:end_time] if args.key?(:end_time)
1186
+ @writer_identity = args[:writer_identity] if args.key?(:writer_identity)
1187
+ @start_time = args[:start_time] if args.key?(:start_time)
1188
+ @output_version_format = args[:output_version_format] if args.key?(:output_version_format)
1189
+ end
1190
+ end
1207
1191
 
1208
- # Queue name of the request, in the case of an offline request.
1209
- # Corresponds to the JSON property `taskQueueName`
1210
- # @return [String]
1211
- attr_accessor :task_queue_name
1192
+ # The parameters to WriteLogEntries.
1193
+ class WriteLogEntriesRequest
1194
+ include Google::Apis::Core::Hashable
1212
1195
 
1213
- # Globally unique identifier for a request, which is based on the request start
1214
- # time. Request IDs for requests which started later will compare greater as
1215
- # strings than those for requests which started earlier.
1216
- # Corresponds to the JSON property `requestId`
1196
+ # An object representing a resource that can be used for monitoring, logging,
1197
+ # billing, or other purposes. Examples include virtual machine instances,
1198
+ # databases, and storage devices such as disks. The type field identifies a
1199
+ # MonitoredResourceDescriptor object that describes the resource's schema.
1200
+ # Information in the labels field identifies the actual resource and its
1201
+ # attributes according to the schema. For example, a particular Compute Engine
1202
+ # VM instance could be represented by the following object, because the
1203
+ # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
1204
+ # zone":
1205
+ # ` "type": "gce_instance",
1206
+ # "labels": ` "instance_id": "12345678901234",
1207
+ # "zone": "us-central1-a" ``
1208
+ # Corresponds to the JSON property `resource`
1209
+ # @return [Google::Apis::LoggingV2beta1::MonitoredResource]
1210
+ attr_accessor :resource
1211
+
1212
+ # Optional. A default log resource name that is assigned to all log entries in
1213
+ # entries that do not specify a value for log_name:
1214
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
1215
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
1216
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
1217
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
1218
+ # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
1219
+ # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
1220
+ # 2Factivity". For more information about log names, see LogEntry.
1221
+ # Corresponds to the JSON property `logName`
1217
1222
  # @return [String]
1218
- attr_accessor :request_id
1223
+ attr_accessor :log_name
1224
+
1225
+ # Required. The log entries to write. Values supplied for the fields log_name,
1226
+ # resource, and labels in this entries.write request are inserted into those log
1227
+ # entries in this list that do not provide their own values.Stackdriver Logging
1228
+ # also creates and inserts values for timestamp and insert_id if the entries do
1229
+ # not provide them. The created insert_id for the N'th entry in this list will
1230
+ # be greater than earlier entries and less than later entries. Otherwise, the
1231
+ # order of log entries in this list does not matter.To improve throughput and to
1232
+ # avoid exceeding the quota limit for calls to entries.write, you should write
1233
+ # multiple log entries at once rather than calling this method for each
1234
+ # individual log entry.
1235
+ # Corresponds to the JSON property `entries`
1236
+ # @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
1237
+ attr_accessor :entries
1238
+
1239
+ # Optional. Whether valid entries should be written even if some other entries
1240
+ # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not
1241
+ # written, then the response status is the error associated with one of the
1242
+ # failed entries and the response includes error details keyed by the entries'
1243
+ # zero-based index in the entries.write method.
1244
+ # Corresponds to the JSON property `partialSuccess`
1245
+ # @return [Boolean]
1246
+ attr_accessor :partial_success
1247
+ alias_method :partial_success?, :partial_success
1248
+
1249
+ # Optional. Default labels that are added to the labels field of all log entries
1250
+ # in entries. If a log entry already has a label with the same key as a label in
1251
+ # this parameter, then the log entry's label is not changed. See LogEntry.
1252
+ # Corresponds to the JSON property `labels`
1253
+ # @return [Hash<String,String>]
1254
+ attr_accessor :labels
1219
1255
 
1220
1256
  def initialize(**args)
1221
1257
  update!(**args)
@@ -1223,38 +1259,11 @@ module Google
1223
1259
 
1224
1260
  # Update properties of this object
1225
1261
  def update!(**args)
1226
- @nickname = args[:nickname] if args.key?(:nickname)
1227
- @status = args[:status] if args.key?(:status)
1228
1262
  @resource = args[:resource] if args.key?(:resource)
1229
- @pending_time = args[:pending_time] if args.key?(:pending_time)
1230
- @task_name = args[:task_name] if args.key?(:task_name)
1231
- @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry)
1232
- @instance_index = args[:instance_index] if args.key?(:instance_index)
1233
- @finished = args[:finished] if args.key?(:finished)
1234
- @host = args[:host] if args.key?(:host)
1235
- @http_version = args[:http_version] if args.key?(:http_version)
1236
- @start_time = args[:start_time] if args.key?(:start_time)
1237
- @latency = args[:latency] if args.key?(:latency)
1238
- @ip = args[:ip] if args.key?(:ip)
1239
- @app_id = args[:app_id] if args.key?(:app_id)
1240
- @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release)
1241
- @method_prop = args[:method_prop] if args.key?(:method_prop)
1242
- @cost = args[:cost] if args.key?(:cost)
1243
- @instance_id = args[:instance_id] if args.key?(:instance_id)
1244
- @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles)
1245
- @first = args[:first] if args.key?(:first)
1246
- @version_id = args[:version_id] if args.key?(:version_id)
1247
- @module_id = args[:module_id] if args.key?(:module_id)
1248
- @end_time = args[:end_time] if args.key?(:end_time)
1249
- @user_agent = args[:user_agent] if args.key?(:user_agent)
1250
- @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request)
1251
- @source_reference = args[:source_reference] if args.key?(:source_reference)
1252
- @response_size = args[:response_size] if args.key?(:response_size)
1253
- @trace_id = args[:trace_id] if args.key?(:trace_id)
1254
- @line = args[:line] if args.key?(:line)
1255
- @referrer = args[:referrer] if args.key?(:referrer)
1256
- @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name)
1257
- @request_id = args[:request_id] if args.key?(:request_id)
1263
+ @log_name = args[:log_name] if args.key?(:log_name)
1264
+ @entries = args[:entries] if args.key?(:entries)
1265
+ @partial_success = args[:partial_success] if args.key?(:partial_success)
1266
+ @labels = args[:labels] if args.key?(:labels)
1258
1267
  end
1259
1268
  end
1260
1269
  end