Class: Google::Apis::RunV1alpha1::RouteSpec

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

Overview

RouteSpec holds the desired state of the Route (from the client).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RouteSpec

Returns a new instance of RouteSpec.



4122
4123
4124
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 4122

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)


4113
4114
4115
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 4113

def generation
  @generation
end

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

Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations. Cloud Run currently supports a single configurationName. Corresponds to the JSON property traffic



4120
4121
4122
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 4120

def traffic
  @traffic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4127
4128
4129
4130
# File 'lib/google/apis/run_v1alpha1/classes.rb', line 4127

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