Class: Google::Apis::ApphubV1alpha::Workload

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

Overview

Workload is an App Hub data model that contains a discovered workload, which represents a binary deployment (such as managed instance groups (MIGs) and GKE deployments) that performs the smallest logical subset of business functionality.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Workload

Returns a new instance of Workload.



1642
1643
1644
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1642

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

Instance Attribute Details

#attributesGoogle::Apis::ApphubV1alpha::Attributes

Consumer provided attributes. Corresponds to the JSON property attributes



1588
1589
1590
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1588

def attributes
  @attributes
end

#create_timeString

Output only. Create time. Corresponds to the JSON property createTime

Returns:

  • (String)


1593
1594
1595
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1593

def create_time
  @create_time
end

#descriptionString

Optional. User-defined description of a Workload. Corresponds to the JSON property description

Returns:

  • (String)


1598
1599
1600
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1598

def description
  @description
end

#discovered_workloadString

Required. Immutable. The resource name of the original discovered workload. Corresponds to the JSON property discoveredWorkload

Returns:

  • (String)


1603
1604
1605
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1603

def discovered_workload
  @discovered_workload
end

#display_nameString

Optional. User-defined name for the Workload. Corresponds to the JSON property displayName

Returns:

  • (String)


1608
1609
1610
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1608

def display_name
  @display_name
end

#nameString

Identifier. The resource name of the Workload. Format: "projects/host-project- id/locations/location/applications/application-id/workloads/workload-id" Corresponds to the JSON property name

Returns:

  • (String)


1614
1615
1616
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1614

def name
  @name
end

#stateString

Output only. Workload state. Corresponds to the JSON property state

Returns:

  • (String)


1619
1620
1621
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1619

def state
  @state
end

#uidString

Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format. Corresponds to the JSON property uid

Returns:

  • (String)


1625
1626
1627
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1625

def uid
  @uid
end

#update_timeString

Output only. Update time. Corresponds to the JSON property updateTime

Returns:

  • (String)


1630
1631
1632
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1630

def update_time
  @update_time
end

#workload_propertiesGoogle::Apis::ApphubV1alpha::WorkloadProperties

Properties of an underlying compute resource represented by the Workload. Corresponds to the JSON property workloadProperties



1635
1636
1637
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1635

def workload_properties
  @workload_properties
end

#workload_referenceGoogle::Apis::ApphubV1alpha::WorkloadReference

Reference of an underlying compute resource represented by the Workload. Corresponds to the JSON property workloadReference



1640
1641
1642
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1640

def workload_reference
  @workload_reference
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
# File 'lib/google/apis/apphub_v1alpha/classes.rb', line 1647

def update!(**args)
  @attributes = args[:attributes] if args.key?(:attributes)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @discovered_workload = args[:discovered_workload] if args.key?(:discovered_workload)
  @display_name = args[:display_name] if args.key?(:display_name)
  @name = args[:name] if args.key?(:name)
  @state = args[:state] if args.key?(:state)
  @uid = args[:uid] if args.key?(:uid)
  @update_time = args[:update_time] if args.key?(:update_time)
  @workload_properties = args[:workload_properties] if args.key?(:workload_properties)
  @workload_reference = args[:workload_reference] if args.key?(:workload_reference)
end