Class: Google::Apis::FirebaseremoteconfigV1::RemoteConfigParameter

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

Overview

While default_value and conditional_values are each optional, at least one of the two is required - otherwise, the parameter is meaningless (and an exception will be thrown by the validation logic).

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) ⇒ RemoteConfigParameter

Returns a new instance of RemoteConfigParameter



137
138
139
# File 'generated/google/apis/firebaseremoteconfig_v1/classes.rb', line 137

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

Instance Attribute Details

#conditional_valuesHash<String,Google::Apis::FirebaseremoteconfigV1::RemoteConfigParameterValue>

Optional - a map of (condition_name, value). The condition_name of the highest priority (the one listed first in the conditions array) determines the value of this parameter. Corresponds to the JSON property conditionalValues



125
126
127
# File 'generated/google/apis/firebaseremoteconfig_v1/classes.rb', line 125

def conditional_values
  @conditional_values
end

#default_valueGoogle::Apis::FirebaseremoteconfigV1::RemoteConfigParameterValue

A RemoteConfigParameter's "value" (either the default value, or the value associated with a condition name) is either a string, or the "use_in_app_default" indicator (which means to leave out the parameter from the returned map that is the output of the parameter fetch). We represent the "use_in_app_default" as a bool, but (when using the boolean instead of the string) it should always be true. Corresponds to the JSON property defaultValue



135
136
137
# File 'generated/google/apis/firebaseremoteconfig_v1/classes.rb', line 135

def default_value
  @default_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



142
143
144
145
# File 'generated/google/apis/firebaseremoteconfig_v1/classes.rb', line 142

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