Class: AWSCDK::FraudDetector::CfnVariableProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
fraud_detector/cfn_variable_props.rb

Overview

Properties for defining a CfnVariable.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_source:, data_type:, default_value:, name:, description: nil, tags: nil, variable_type: nil) ⇒ CfnVariableProps

Returns a new instance of CfnVariableProps.

Parameters:

  • data_source (String)

    The data source of the variable.

  • data_type (String)

    The data type of the variable.

  • default_value (String)

    The default value of the variable.

  • name (String)

    The name of the variable.

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

    The description of the variable.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of key-value pairs to apply to this resource.

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

    The type of the variable. For more information see Variable types .



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'fraud_detector/cfn_variable_props.rb', line 16

def initialize(data_source:, data_type:, default_value:, name:, description: nil, tags: nil, variable_type: nil)
  @data_source = data_source
  Jsii::Type.check_type(@data_source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dataSource")
  @data_type = data_type
  Jsii::Type.check_type(@data_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dataType")
  @default_value = default_value
  Jsii::Type.check_type(@default_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultValue")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @variable_type = variable_type
  Jsii::Type.check_type(@variable_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variableType") unless @variable_type.nil?
end

Instance Attribute Details

#data_sourceString (readonly)

The data source of the variable.

Valid values: EVENT | EXTERNAL_MODEL_SCORE

When defining a variable within a detector, you can only use the EVENT value for DataSource when the Inline property is set to true. If the Inline property is set false, you can use either EVENT or MODEL_SCORE for DataSource.



41
42
43
# File 'fraud_detector/cfn_variable_props.rb', line 41

def data_source
  @data_source
end

#data_typeString (readonly)

The data type of the variable.

Valid data types: STRING | INTEGER | BOOLEAN | FLOAT



48
49
50
# File 'fraud_detector/cfn_variable_props.rb', line 48

def data_type
  @data_type
end

#default_valueString (readonly)

The default value of the variable.



53
54
55
# File 'fraud_detector/cfn_variable_props.rb', line 53

def default_value
  @default_value
end

#descriptionString? (readonly)

The description of the variable.



65
66
67
# File 'fraud_detector/cfn_variable_props.rb', line 65

def description
  @description
end

#nameString (readonly)

The name of the variable.

Pattern: ^[0-9a-z_-]+$



60
61
62
# File 'fraud_detector/cfn_variable_props.rb', line 60

def name
  @name
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.

For more information, see Tag .



72
73
74
# File 'fraud_detector/cfn_variable_props.rb', line 72

def tags
  @tags
end

#variable_typeString? (readonly)

The type of the variable. For more information see Variable types .

Valid Values: AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT



79
80
81
# File 'fraud_detector/cfn_variable_props.rb', line 79

def variable_type
  @variable_type
end

Class Method Details

.jsii_propertiesObject



81
82
83
84
85
86
87
88
89
90
91
# File 'fraud_detector/cfn_variable_props.rb', line 81

def self.jsii_properties
  {
    :data_source => "dataSource",
    :data_type => "dataType",
    :default_value => "defaultValue",
    :name => "name",
    :description => "description",
    :tags => "tags",
    :variable_type => "variableType",
  }
end

Instance Method Details

#to_jsiiObject



93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'fraud_detector/cfn_variable_props.rb', line 93

def to_jsii
  result = {}
  result.merge!({
    "dataSource" => @data_source,
    "dataType" => @data_type,
    "defaultValue" => @default_value,
    "name" => @name,
    "description" => @description,
    "tags" => @tags,
    "variableType" => @variable_type,
  })
  result.compact
end