Class: AWSCDK::Evidently::CfnExperiment::TreatmentToWeightProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Evidently::CfnExperiment::TreatmentToWeightProperty
- Defined in:
- evidently/cfn_experiment.rb
Overview
This structure defines how much experiment traffic to allocate to one treatment used in the experiment.
Instance Attribute Summary collapse
-
#split_weight ⇒ Numeric
readonly
The portion of experiment traffic to allocate to this treatment.
-
#treatment ⇒ String
readonly
The name of the treatment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(split_weight:, treatment:) ⇒ TreatmentToWeightProperty
constructor
A new instance of TreatmentToWeightProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(split_weight:, treatment:) ⇒ TreatmentToWeightProperty
Returns a new instance of TreatmentToWeightProperty.
941 942 943 944 945 946 |
# File 'evidently/cfn_experiment.rb', line 941 def initialize(split_weight:, treatment:) @split_weight = split_weight Jsii::Type.check_type(@split_weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "splitWeight") @treatment = treatment Jsii::Type.check_type(@treatment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "treatment") end |
Instance Attribute Details
#split_weight ⇒ Numeric (readonly)
The portion of experiment traffic to allocate to this treatment.
Specify the traffic portion in thousandths of a percent, so 20,000 allocated to a treatment would allocate 20% of the experiment traffic to that treatment.
954 955 956 |
# File 'evidently/cfn_experiment.rb', line 954 def split_weight @split_weight end |
#treatment ⇒ String (readonly)
The name of the treatment.
959 960 961 |
# File 'evidently/cfn_experiment.rb', line 959 def treatment @treatment end |
Class Method Details
.jsii_properties ⇒ Object
961 962 963 964 965 966 |
# File 'evidently/cfn_experiment.rb', line 961 def self.jsii_properties { :split_weight => "splitWeight", :treatment => "treatment", } end |
Instance Method Details
#to_jsii ⇒ Object
968 969 970 971 972 973 974 975 |
# File 'evidently/cfn_experiment.rb', line 968 def to_jsii result = {} result.merge!({ "splitWeight" => @split_weight, "treatment" => @treatment, }) result.compact end |