Class: Google::Apis::LoggingV1beta3::LogEntryMetadata

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable
Defined in:
generated/google/apis/logging_v1beta3/classes.rb,
generated/google/apis/logging_v1beta3/representations.rb,
generated/google/apis/logging_v1beta3/representations.rb

Overview

Additional data that is associated with a log entry, set by the service creating the log entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LogEntryMetadata

Returns a new instance of LogEntryMetadata.



257
258
259
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 257

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#labelsHash<String,String>

A set of (key, value) data that provides additional information about the log entry. If the log entry is from one of the Google Cloud Platform sources listed below, the indicated (key, value) information must be provided: Google App Engine, service_name appengine.googleapis.com: "appengine.googleapis.com/ module_id", "appengine.googleapis.com/version_id", and one of: "appengine. googleapis.com/replica_index", "appengine.googleapis.com/clone_id", or else provide the following Compute Engine labels: Google Compute Engine, service_name compute.googleapis.com: "compute.googleapis.com/resource_type", "instance" "compute.googleapis.com/resource_id", Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


255
256
257
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 255

def labels
  @labels
end

#project_idString

The project ID of the Google Cloud Platform service that created the log entry. Corresponds to the JSON property projectId

Returns:

  • (String)


216
217
218
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 216

def project_id
  @project_id
end

#regionString

The region name of the Google Cloud Platform service that created the log entry. For example, "us-central1". Corresponds to the JSON property region

Returns:

  • (String)


228
229
230
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 228

def region
  @region
end

#service_nameString

The API name of the Google Cloud Platform service that created the log entry. For example, "compute.googleapis.com". Corresponds to the JSON property serviceName

Returns:

  • (String)


222
223
224
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 222

def service_name
  @service_name
end

#severityString

The severity of the log entry. Corresponds to the JSON property severity

Returns:

  • (String)


211
212
213
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 211

def severity
  @severity
end

#timestampString

The time the event described by the log entry occurred. Timestamps must be later than January 1, 1970. Corresponds to the JSON property timestamp

Returns:

  • (String)


206
207
208
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 206

def timestamp
  @timestamp
end

#user_idString

The fully-qualified email address of the authenticated user that performed or requested the action represented by the log entry. If the log entry does not apply to an action taken by an authenticated user, then the field should be empty. Corresponds to the JSON property userId

Returns:

  • (String)


242
243
244
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 242

def user_id
  @user_id
end

#zoneString

The zone of the Google Cloud Platform service that created the log entry. For example, "us-central1-a". Corresponds to the JSON property zone

Returns:

  • (String)


234
235
236
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 234

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



262
263
264
265
266
267
268
269
270
271
# File 'generated/google/apis/logging_v1beta3/classes.rb', line 262

def update!(**args)
  @timestamp = args[:timestamp] unless args[:timestamp].nil?
  @severity = args[:severity] unless args[:severity].nil?
  @project_id = args[:project_id] unless args[:project_id].nil?
  @service_name = args[:service_name] unless args[:service_name].nil?
  @region = args[:region] unless args[:region].nil?
  @zone = args[:zone] unless args[:zone].nil?
  @user_id = args[:user_id] unless args[:user_id].nil?
  @labels = args[:labels] unless args[:labels].nil?
end