Class: Google::Apis::ApphubV1::Workload
- Inherits:
-
Object
- Object
- Google::Apis::ApphubV1::Workload
- 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
-
#attributes ⇒ Google::Apis::ApphubV1::Attributes
Consumer provided attributes.
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
Optional.
-
#discovered_workload ⇒ String
Required.
-
#display_name ⇒ String
Optional.
-
#name ⇒ String
Identifier.
-
#state ⇒ String
Output only.
-
#uid ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
-
#workload_properties ⇒ Google::Apis::ApphubV1::WorkloadProperties
Properties of an underlying compute resource represented by the Workload.
-
#workload_reference ⇒ Google::Apis::ApphubV1::WorkloadReference
Reference of an underlying compute resource represented by the Workload.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Workload
constructor
A new instance of Workload.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Workload
Returns a new instance of Workload.
1962 1963 1964 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1962 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attributes ⇒ Google::Apis::ApphubV1::Attributes
Consumer provided attributes.
Corresponds to the JSON property attributes
1905 1906 1907 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1905 def attributes @attributes end |
#create_time ⇒ String
Output only. Create time.
Corresponds to the JSON property createTime
1910 1911 1912 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1910 def create_time @create_time end |
#description ⇒ String
Optional. User-defined description of a Workload. Can have a maximum length of
2048 characters.
Corresponds to the JSON property description
1916 1917 1918 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1916 def description @description end |
#discovered_workload ⇒ String
Required. Immutable. The resource name of the original discovered workload.
Corresponds to the JSON property discoveredWorkload
1921 1922 1923 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1921 def discovered_workload @discovered_workload end |
#display_name ⇒ String
Optional. User-defined name for the Workload. Can have a maximum length of 63
characters.
Corresponds to the JSON property displayName
1927 1928 1929 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1927 def display_name @display_name end |
#name ⇒ String
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
1934 1935 1936 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1934 def name @name end |
#state ⇒ String
Output only. Workload state.
Corresponds to the JSON property state
1939 1940 1941 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1939 def state @state end |
#uid ⇒ String
Output only. A universally unique identifier (UUID) for the Workload
in the
UUID4 format.
Corresponds to the JSON property uid
1945 1946 1947 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1945 def uid @uid end |
#update_time ⇒ String
Output only. Update time.
Corresponds to the JSON property updateTime
1950 1951 1952 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1950 def update_time @update_time end |
#workload_properties ⇒ Google::Apis::ApphubV1::WorkloadProperties
Properties of an underlying compute resource represented by the Workload.
Corresponds to the JSON property workloadProperties
1955 1956 1957 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1955 def workload_properties @workload_properties end |
#workload_reference ⇒ Google::Apis::ApphubV1::WorkloadReference
Reference of an underlying compute resource represented by the Workload.
Corresponds to the JSON property workloadReference
1960 1961 1962 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1960 def workload_reference @workload_reference end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 |
# File 'lib/google/apis/apphub_v1/classes.rb', line 1967 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 |