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

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

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.



3665
3666
3667
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 3665

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)


3656
3657
3658
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 3656

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



3663
3664
3665
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 3663

def traffic
  @traffic
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3670
3671
3672
3673
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 3670

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