Class: Google::Apis::RunV1::ServiceSpec

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

Overview

ServiceSpec holds the desired state of the Route (from the client), which is used to manipulate the underlying Route and Configuration(s).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ServiceSpec

Returns a new instance of ServiceSpec.



5740
5741
5742
# File 'lib/google/apis/run_v1/classes.rb', line 5740

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

Instance Attribute Details

#templateGoogle::Apis::RunV1::RevisionTemplate

RevisionTemplateSpec describes the data a revision should have when created from a template. Corresponds to the JSON property template



5732
5733
5734
# File 'lib/google/apis/run_v1/classes.rb', line 5732

def template
  @template
end

#trafficArray<Google::Apis::RunV1::TrafficTarget>

Specifies how to distribute traffic over a collection of Knative Revisions and Configurations to the Service's main URL. Corresponds to the JSON property traffic



5738
5739
5740
# File 'lib/google/apis/run_v1/classes.rb', line 5738

def traffic
  @traffic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5745
5746
5747
5748
# File 'lib/google/apis/run_v1/classes.rb', line 5745

def update!(**args)
  @template = args[:template] if args.key?(:template)
  @traffic = args[:traffic] if args.key?(:traffic)
end