Class: Google::Apis::TpuV2::Location

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

Overview

A resource that represents a Google Cloud location.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Location

Returns a new instance of Location.



630
631
632
# File 'lib/google/apis/tpu_v2/classes.rb', line 630

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

Instance Attribute Details

#display_nameString

The friendly name for this location, typically a nearby city name. For example, "Tokyo". Corresponds to the JSON property displayName

Returns:

  • (String)


605
606
607
# File 'lib/google/apis/tpu_v2/classes.rb', line 605

def display_name
  @display_name
end

#labelsHash<String,String>

Cross-service attributes for the location. For example "cloud.googleapis.com/ region": "us-east1" Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


611
612
613
# File 'lib/google/apis/tpu_v2/classes.rb', line 611

def labels
  @labels
end

#location_idString

The canonical id for this location. For example: "us-east1". Corresponds to the JSON property locationId

Returns:

  • (String)


616
617
618
# File 'lib/google/apis/tpu_v2/classes.rb', line 616

def location_id
  @location_id
end

#metadataHash<String,Object>

Service-specific metadata. For example the available capacity at the given location. Corresponds to the JSON property metadata

Returns:

  • (Hash<String,Object>)


622
623
624
# File 'lib/google/apis/tpu_v2/classes.rb', line 622

def 
  @metadata
end

#nameString

Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1" Corresponds to the JSON property name

Returns:

  • (String)


628
629
630
# File 'lib/google/apis/tpu_v2/classes.rb', line 628

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



635
636
637
638
639
640
641
# File 'lib/google/apis/tpu_v2/classes.rb', line 635

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @labels = args[:labels] if args.key?(:labels)
  @location_id = args[:location_id] if args.key?(:location_id)
  @metadata = args[:metadata] if args.key?(:metadata)
  @name = args[:name] if args.key?(:name)
end