Class: AWSCDK::Evidently::CfnExperiment::TreatmentObjectProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
evidently/cfn_experiment.rb

Overview

A structure that defines one treatment in an experiment.

A treatment is a variation of the feature that you are including in the experiment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(feature:, treatment_name:, variation:, description: nil) ⇒ TreatmentObjectProperty

Returns a new instance of TreatmentObjectProperty.

Parameters:

  • feature (String)

    The name of the feature for this experiment.

  • treatment_name (String)

    A name for this treatment.

  • variation (String)

    The name of the variation to use for this treatment.

  • description (String, nil) (defaults to: nil)

    The description of the treatment.



878
879
880
881
882
883
884
885
886
887
# File 'evidently/cfn_experiment.rb', line 878

def initialize(feature:, treatment_name:, variation:, description: nil)
  @feature = feature
  Jsii::Type.check_type(@feature, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "feature")
  @treatment_name = treatment_name
  Jsii::Type.check_type(@treatment_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "treatmentName")
  @variation = variation
  Jsii::Type.check_type(@variation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variation")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the treatment.



910
911
912
# File 'evidently/cfn_experiment.rb', line 910

def description
  @description
end

#featureString (readonly)

The name of the feature for this experiment.



893
894
895
# File 'evidently/cfn_experiment.rb', line 893

def feature
  @feature
end

#treatment_nameString (readonly)

A name for this treatment.

It can include up to 127 characters.



900
901
902
# File 'evidently/cfn_experiment.rb', line 900

def treatment_name
  @treatment_name
end

#variationString (readonly)

The name of the variation to use for this treatment.



905
906
907
# File 'evidently/cfn_experiment.rb', line 905

def variation
  @variation
end

Class Method Details

.jsii_propertiesObject



912
913
914
915
916
917
918
919
# File 'evidently/cfn_experiment.rb', line 912

def self.jsii_properties
  {
    :feature => "feature",
    :treatment_name => "treatmentName",
    :variation => "variation",
    :description => "description",
  }
end

Instance Method Details

#to_jsiiObject



921
922
923
924
925
926
927
928
929
930
# File 'evidently/cfn_experiment.rb', line 921

def to_jsii
  result = {}
  result.merge!({
    "feature" => @feature,
    "treatmentName" => @treatment_name,
    "variation" => @variation,
    "description" => @description,
  })
  result.compact
end