Class: Google::Apis::ServicecontrolV1::ConsumerInfo

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

ConsumerInfo provides information about the consumer.

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

Returns a new instance of ConsumerInfo.


676
677
678
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 676

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

Instance Attribute Details

#consumer_numberFixnum

The consumer identity number, can be Google cloud project number, folder number or organization number e.g. 1234567890. A value of 0 indicates no consumer number is found. Corresponds to the JSON property consumerNumber

Returns:

  • (Fixnum)

661
662
663
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 661

def consumer_number
  @consumer_number
end

#project_numberFixnum

The Google cloud project number, e.g. 1234567890. A value of 0 indicates no project number is found. NOTE: This field is deprecated after Chemist support flexible consumer id. New code should not depend on this field anymore. Corresponds to the JSON property projectNumber

Returns:

  • (Fixnum)

668
669
670
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 668

def project_number
  @project_number
end

#typeString

The type of the consumer which should have been defined in Google Resource Manager. Corresponds to the JSON property type

Returns:

  • (String)

674
675
676
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 674

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


681
682
683
684
685
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 681

def update!(**args)
  @consumer_number = args[:consumer_number] if args.key?(:consumer_number)
  @project_number = args[:project_number] if args.key?(:project_number)
  @type = args[:type] if args.key?(:type)
end