Class: Google::Apis::ServicecontrolV1::Operation

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

Overview

Represents information regarding an operation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Operation

Returns a new instance of Operation



1114
1115
1116
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1114

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

Instance Attribute Details

#consumer_idString

Identity of the consumer who is using the service. This field should be filled in for the operations initiated by a consumer, but not for service-initiated operations that are not related to a specific consumer. This can be in one of the following formats: project:, project_number:, api_key:. Corresponds to the JSON property consumerId

Returns:

  • (String)


1015
1016
1017
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1015

def consumer_id
  @consumer_id
end

#end_timeString

End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check. Corresponds to the JSON property endTime

Returns:

  • (String)


1022
1023
1024
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1022

def end_time
  @end_time
end

#importanceString

DO NOT USE. This is an experimental field. Corresponds to the JSON property importance

Returns:

  • (String)


1027
1028
1029
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1027

def importance
  @importance
end

#labelsHash<String,String>

Labels describing the operation. Only the following labels are allowed:

  • Labels describing monitored resources as defined in the service configuration.
  • Default labels of metric values. When specified, labels defined in the metric value override these default.
  • The following labels defined by Google Cloud Platform:
  • cloud.googleapis.com/location describing the location where the operation happened,
  • servicecontrol.googleapis.com/user_agent describing the user agent of the API request,
  • servicecontrol.googleapis.com/service_agent describing the service used to handle the API request (e.g. ESP),
  • servicecontrol.googleapis.com/platform describing the platform where the API is served (e.g. GAE, GCE, GKE). Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1045
1046
1047
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1045

def labels
  @labels
end

#log_entriesArray<Google::Apis::ServicecontrolV1::LogEntry>

Represents information to be logged. Corresponds to the JSON property logEntries



1050
1051
1052
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1050

def log_entries
  @log_entries
end

#metric_value_setsArray<Google::Apis::ServicecontrolV1::MetricValueSet>

Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error. Corresponds to the JSON property metricValueSets



1063
1064
1065
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1063

def metric_value_sets
  @metric_value_sets
end

#operation_idString

Identity of the operation. This must be unique within the scope of the service that generated the operation. If the service calls Check() and Report() on the same operation, the two calls should carry the same id. UUID version 4 is recommended, though not required. In scenarios where an operation is computed from existing information and an idempotent id is desirable for deduplication purpose, UUID version 5 is recommended. See RFC 4122 for details. Corresponds to the JSON property operationId

Returns:

  • (String)


1075
1076
1077
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1075

def operation_id
  @operation_id
end

#operation_nameString

Fully qualified name of the operation. Reserved for future use. Corresponds to the JSON property operationName

Returns:

  • (String)


1080
1081
1082
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1080

def operation_name
  @operation_name
end

#quota_propertiesGoogle::Apis::ServicecontrolV1::QuotaProperties

Represents the properties needed for quota operations. Corresponds to the JSON property quotaProperties



1085
1086
1087
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1085

def quota_properties
  @quota_properties
end

#resource_containerString

DO NOT USE. This field is deprecated, use "resources" field instead. The resource name of the parent of a resource in the resource hierarchy. This can be in one of the following formats:

  • “projects/
  • “folders/
  • “organizations/” Corresponds to the JSON property resourceContainer

Returns:

  • (String)


1095
1096
1097
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1095

def resource_container
  @resource_container
end

#resourcesArray<Google::Apis::ServicecontrolV1::ResourceInfo>

The resources that are involved in the operation. Corresponds to the JSON property resources



1100
1101
1102
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1100

def resources
  @resources
end

#start_timeString

Required. Start time of the operation. Corresponds to the JSON property startTime

Returns:

  • (String)


1105
1106
1107
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1105

def start_time
  @start_time
end

#user_labelsHash<String,String>

User defined labels for the resource that this operation is associated with. Only a combination of 1000 user labels per consumer project are allowed. Corresponds to the JSON property userLabels

Returns:

  • (Hash<String,String>)


1112
1113
1114
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1112

def user_labels
  @user_labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1119

def update!(**args)
  @consumer_id = args[:consumer_id] if args.key?(:consumer_id)
  @end_time = args[:end_time] if args.key?(:end_time)
  @importance = args[:importance] if args.key?(:importance)
  @labels = args[:labels] if args.key?(:labels)
  @log_entries = args[:log_entries] if args.key?(:log_entries)
  @metric_value_sets = args[:metric_value_sets] if args.key?(:metric_value_sets)
  @operation_id = args[:operation_id] if args.key?(:operation_id)
  @operation_name = args[:operation_name] if args.key?(:operation_name)
  @quota_properties = args[:quota_properties] if args.key?(:quota_properties)
  @resource_container = args[:resource_container] if args.key?(:resource_container)
  @resources = args[:resources] if args.key?(:resources)
  @start_time = args[:start_time] if args.key?(:start_time)
  @user_labels = args[:user_labels] if args.key?(:user_labels)
end