Class: Google::Apis::ApphubV1::Workload

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/apphub_v1/classes.rb,
lib/google/apis/apphub_v1/representations.rb,
lib/google/apis/apphub_v1/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.



1773
1774
1775
# File 'lib/google/apis/apphub_v1/classes.rb', line 1773

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

Instance Attribute Details

#attributesGoogle::Apis::ApphubV1::Attributes

Consumer provided attributes. Corresponds to the JSON property attributes



1716
1717
1718
# File 'lib/google/apis/apphub_v1/classes.rb', line 1716

def attributes
  @attributes
end

#create_timeString

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

Returns:

  • (String)


1721
1722
1723
# File 'lib/google/apis/apphub_v1/classes.rb', line 1721

def create_time
  @create_time
end

#descriptionString

Optional. User-defined description of a Workload. Can have a maximum length of 2048 characters. Corresponds to the JSON property description

Returns:

  • (String)


1727
1728
1729
# File 'lib/google/apis/apphub_v1/classes.rb', line 1727

def description
  @description
end

#discovered_workloadString

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

Returns:

  • (String)


1732
1733
1734
# File 'lib/google/apis/apphub_v1/classes.rb', line 1732

def discovered_workload
  @discovered_workload
end

#display_nameString

Optional. User-defined name for the Workload. Can have a maximum length of 63 characters. Corresponds to the JSON property displayName

Returns:

  • (String)


1738
1739
1740
# File 'lib/google/apis/apphub_v1/classes.rb', line 1738

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)


1745
1746
1747
# File 'lib/google/apis/apphub_v1/classes.rb', line 1745

def name
  @name
end

#stateString

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

Returns:

  • (String)


1750
1751
1752
# File 'lib/google/apis/apphub_v1/classes.rb', line 1750

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)


1756
1757
1758
# File 'lib/google/apis/apphub_v1/classes.rb', line 1756

def uid
  @uid
end

#update_timeString

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

Returns:

  • (String)


1761
1762
1763
# File 'lib/google/apis/apphub_v1/classes.rb', line 1761

def update_time
  @update_time
end

#workload_propertiesGoogle::Apis::ApphubV1::WorkloadProperties

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



1766
1767
1768
# File 'lib/google/apis/apphub_v1/classes.rb', line 1766

def workload_properties
  @workload_properties
end

#workload_referenceGoogle::Apis::ApphubV1::WorkloadReference

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



1771
1772
1773
# File 'lib/google/apis/apphub_v1/classes.rb', line 1771

def workload_reference
  @workload_reference
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
# File 'lib/google/apis/apphub_v1/classes.rb', line 1778

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