Class: Google::Apis::ClouderrorreportingV1beta1::ServiceContext

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

Overview

Describes a running service that sends errors. Its version changes over time and multiple versions can run in parallel.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ServiceContext

Returns a new instance of ServiceContext



494
495
496
# File 'generated/google/apis/clouderrorreporting_v1beta1/classes.rb', line 494

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

Instance Attribute Details

#resource_typeString

Type of the MonitoredResource. List of possible values: https://cloud.google.com/monitoring/api/resources Value is set automatically for incoming errors and must not be set when reporting errors. Corresponds to the JSON property resourceType

Returns:

  • (String)


474
475
476
# File 'generated/google/apis/clouderrorreporting_v1beta1/classes.rb', line 474

def resource_type
  @resource_type
end

#serviceString

An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to version, which can be changed whenever new code is deployed. Contains the service name for error reports extracted from Google App Engine logs or default if the App Engine default service is used. Corresponds to the JSON property service

Returns:

  • (String)


484
485
486
# File 'generated/google/apis/clouderrorreporting_v1beta1/classes.rb', line 484

def service
  @service
end

#versionString

Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app. Corresponds to the JSON property version

Returns:

  • (String)


492
493
494
# File 'generated/google/apis/clouderrorreporting_v1beta1/classes.rb', line 492

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



499
500
501
502
503
# File 'generated/google/apis/clouderrorreporting_v1beta1/classes.rb', line 499

def update!(**args)
  @resource_type = args[:resource_type] if args.key?(:resource_type)
  @service = args[:service] if args.key?(:service)
  @version = args[:version] if args.key?(:version)
end