Class: AWSCDK::Evidently::CfnExperiment::OnlineAbConfigObjectProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Evidently::CfnExperiment::OnlineAbConfigObjectProperty
- Defined in:
- evidently/cfn_experiment.rb
Overview
A structure that contains the configuration of which variation to use as the "control" version.
The "control" version is used for comparison with other variations. This structure also specifies how much experiment traffic is allocated to each variation.
Instance Attribute Summary collapse
-
#control_treatment_name ⇒ String?
readonly
The name of the variation that is to be the default variation that the other variations are compared to.
-
#treatment_weights ⇒ AWSCDK::IResolvable, ...
readonly
A set of key-value pairs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(control_treatment_name: nil, treatment_weights: nil) ⇒ OnlineAbConfigObjectProperty
constructor
A new instance of OnlineAbConfigObjectProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(control_treatment_name: nil, treatment_weights: nil) ⇒ OnlineAbConfigObjectProperty
Returns a new instance of OnlineAbConfigObjectProperty.
762 763 764 765 766 767 |
# File 'evidently/cfn_experiment.rb', line 762 def initialize(control_treatment_name: nil, treatment_weights: nil) @control_treatment_name = control_treatment_name Jsii::Type.check_type(@control_treatment_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "controlTreatmentName") unless @control_treatment_name.nil? @treatment_weights = treatment_weights Jsii::Type.check_type(@treatment_weights, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZpZGVudGx5LkNmbkV4cGVyaW1lbnQuVHJlYXRtZW50VG9XZWlnaHRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "treatmentWeights") unless @treatment_weights.nil? end |
Instance Attribute Details
#control_treatment_name ⇒ String? (readonly)
The name of the variation that is to be the default variation that the other variations are compared to.
773 774 775 |
# File 'evidently/cfn_experiment.rb', line 773 def control_treatment_name @control_treatment_name end |
#treatment_weights ⇒ AWSCDK::IResolvable, ... (readonly)
A set of key-value pairs.
The keys are treatment names, and the values are the portion of experiment traffic to be assigned to that treatment. Specify the traffic portion in thousandths of a percent, so 20,000 for a variation would allocate 20% of the experiment traffic to that variation.
780 781 782 |
# File 'evidently/cfn_experiment.rb', line 780 def treatment_weights @treatment_weights end |
Class Method Details
.jsii_properties ⇒ Object
782 783 784 785 786 787 |
# File 'evidently/cfn_experiment.rb', line 782 def self.jsii_properties { :control_treatment_name => "controlTreatmentName", :treatment_weights => "treatmentWeights", } end |
Instance Method Details
#to_jsii ⇒ Object
789 790 791 792 793 794 795 796 |
# File 'evidently/cfn_experiment.rb', line 789 def to_jsii result = {} result.merge!({ "controlTreatmentName" => @control_treatment_name, "treatmentWeights" => @treatment_weights, }) result.compact end |