Class: Google::Apis::RunV1alpha1::ServiceSpec

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

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ServiceSpec

Returns a new instance of ServiceSpec



4049
4050
4051
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4049

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

Instance Attribute Details

#generationFixnum

Deprecated and not currently populated by Cloud Run. See metadata.generation instead, which is the sequence number containing the latest generation of the desired state. Read-only. Corresponds to the JSON property generation

Returns:

  • (Fixnum)


4007
4008
4009
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4007

def generation
  @generation
end

#manualGoogle::Apis::RunV1alpha1::ServiceSpecManualType

ServiceSpecManualType contains the options for configuring a manual service. See ServiceSpec for more details. Not currently supported by Cloud Run. Corresponds to the JSON property manual



4014
4015
4016
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4014

def manual
  @manual
end

#pinnedGoogle::Apis::RunV1alpha1::ServiceSpecPinnedType

ServiceSpecPinnedType Pins this service to a specific revision name. The revision must be owned by the configuration provided. Deprecated and not supported by Cloud Run. Corresponds to the JSON property pinned



4021
4022
4023
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4021

def pinned
  @pinned
end

#releaseGoogle::Apis::RunV1alpha1::ServiceSpecReleaseType

ServiceSpecReleaseType contains the options for slowly releasing revisions. See ServiceSpec for more details. Not currently supported by Cloud Run. Corresponds to the JSON property release



4028
4029
4030
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4028

def release
  @release
end

#run_latestGoogle::Apis::RunV1alpha1::ServiceSpecRunLatest

ServiceSpecRunLatest contains the options for always having a route to the latest configuration. See ServiceSpec for more details. Corresponds to the JSON property runLatest



4034
4035
4036
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4034

def run_latest
  @run_latest
end

#templateGoogle::Apis::RunV1alpha1::RevisionTemplate

RevisionTemplateSpec describes the data a revision should have when created from a template. Based on: https://github.com/kubernetes/api/blob/e771f807/core/v1/types.go#L3179-L3190 Corresponds to the JSON property template



4041
4042
4043
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4041

def template
  @template
end

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

Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations. Corresponds to the JSON property traffic



4047
4048
4049
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4047

def traffic
  @traffic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4054
4055
4056
4057
4058
4059
4060
4061
4062
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 4054

def update!(**args)
  @generation = args[:generation] if args.key?(:generation)
  @manual = args[:manual] if args.key?(:manual)
  @pinned = args[:pinned] if args.key?(:pinned)
  @release = args[:release] if args.key?(:release)
  @run_latest = args[:run_latest] if args.key?(:run_latest)
  @template = args[:template] if args.key?(:template)
  @traffic = args[:traffic] if args.key?(:traffic)
end