Class: Google::Apis::SaasservicemgmtV1beta1::EvaluationSpec

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

Overview

EvaluationSpec holds rules for evaluating the value of a flag.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EvaluationSpec

Returns a new instance of EvaluationSpec.



469
470
471
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 469

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

Instance Attribute Details

#allocationsArray<Google::Apis::SaasservicemgmtV1beta1::Allocation>

Optional. A list of allocations. Corresponds to the JSON property allocations



444
445
446
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 444

def allocations
  @allocations
end

#attributesArray<String>

Optional. Names of the context attributes that are used in the evaluation rules and allocations. Corresponds to the JSON property attributes

Returns:

  • (Array<String>)


450
451
452
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 450

def attributes
  @attributes
end

#default_targetString

Optional. Deprecated: Use base_target instead. Default variant or allocation of the flag. Corresponds to the JSON property defaultTarget

Returns:

  • (String)


456
457
458
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 456

def default_target
  @default_target
end

#rulesArray<Google::Apis::SaasservicemgmtV1beta1::EvaluationRule>

Optional. Evaluation rules define the logic for evaluating the flag against a given context. The rules are evaluated sequentially in their specified order. Corresponds to the JSON property rules



462
463
464
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 462

def rules
  @rules
end

#variantsArray<Google::Apis::SaasservicemgmtV1beta1::Variant>

Optional. A list of variants. Corresponds to the JSON property variants



467
468
469
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 467

def variants
  @variants
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



474
475
476
477
478
479
480
# File 'lib/google/apis/saasservicemgmt_v1beta1/classes.rb', line 474

def update!(**args)
  @allocations = args[:allocations] if args.key?(:allocations)
  @attributes = args[:attributes] if args.key?(:attributes)
  @default_target = args[:default_target] if args.key?(:default_target)
  @rules = args[:rules] if args.key?(:rules)
  @variants = args[:variants] if args.key?(:variants)
end