Class: Google::Apis::GameservicesV1beta::CustomField

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

Overview

Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.

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) ⇒ CustomField

Returns a new instance of CustomField.



404
405
406
# File 'generated/google/apis/gameservices_v1beta/classes.rb', line 404

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

Instance Attribute Details

#nameString

Name is the field name. Corresponds to the JSON property name

Returns:

  • (String)


395
396
397
# File 'generated/google/apis/gameservices_v1beta/classes.rb', line 395

def name
  @name
end

#valueString

Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext. Corresponds to the JSON property value

Returns:

  • (String)


402
403
404
# File 'generated/google/apis/gameservices_v1beta/classes.rb', line 402

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



409
410
411
412
# File 'generated/google/apis/gameservices_v1beta/classes.rb', line 409

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @value = args[:value] if args.key?(:value)
end