Class: Google::Apis::BackupdrV1::GcpResource

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

Overview

Minimum details to identify a Google Cloud resource

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GcpResource

Returns a new instance of GcpResource.



2281
2282
2283
# File 'lib/google/apis/backupdr_v1/classes.rb', line 2281

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

Instance Attribute Details

#gcp_resourcenameString

Name of the Google Cloud resource. Corresponds to the JSON property gcpResourcename

Returns:

  • (String)


2268
2269
2270
# File 'lib/google/apis/backupdr_v1/classes.rb', line 2268

def gcp_resourcename
  @gcp_resourcename
end

#locationString

Location of the resource: //"global"/"unspecified". Corresponds to the JSON property location

Returns:

  • (String)


2273
2274
2275
# File 'lib/google/apis/backupdr_v1/classes.rb', line 2273

def location
  @location
end

#typeString

Type of the resource. Use the Unified Resource Type, eg. compute.googleapis. com/Instance. Corresponds to the JSON property type

Returns:

  • (String)


2279
2280
2281
# File 'lib/google/apis/backupdr_v1/classes.rb', line 2279

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2286
2287
2288
2289
2290
# File 'lib/google/apis/backupdr_v1/classes.rb', line 2286

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