Class: Google::Apis::FirebaseapphostingV1::TrafficSplit

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

Overview

The traffic allocation for the backend.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TrafficSplit

Returns a new instance of TrafficSplit.



2022
2023
2024
# File 'lib/google/apis/firebaseapphosting_v1/classes.rb', line 2022

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

Instance Attribute Details

#buildString

Required. The build that traffic is being routed to. Corresponds to the JSON property build

Returns:

  • (String)


2014
2015
2016
# File 'lib/google/apis/firebaseapphosting_v1/classes.rb', line 2014

def build
  @build
end

#percentFixnum

Required. The percentage of traffic to send to the build. Currently must be 100% or 0%. Corresponds to the JSON property percent

Returns:

  • (Fixnum)


2020
2021
2022
# File 'lib/google/apis/firebaseapphosting_v1/classes.rb', line 2020

def percent
  @percent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2027
2028
2029
2030
# File 'lib/google/apis/firebaseapphosting_v1/classes.rb', line 2027

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