Class: AWSCDK::SNS::NumericConditions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sns/numeric_conditions.rb

Overview

Conditions that can be applied to numeric attributes.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allowlist: nil, between: nil, between_strict: nil, greater_than: nil, greater_than_or_equal_to: nil, less_than: nil, less_than_or_equal_to: nil) ⇒ NumericConditions

Returns a new instance of NumericConditions.

Parameters:

  • allowlist (Array<Numeric>, nil) (defaults to: nil)

    Match one or more values.

  • between (AWSCDK::SNS::BetweenCondition, nil) (defaults to: nil)

    Match values that are between the specified values.

  • between_strict (AWSCDK::SNS::BetweenCondition, nil) (defaults to: nil)

    Match values that are strictly between the specified values.

  • greater_than (Numeric, nil) (defaults to: nil)

    Match values that are greater than the specified value.

  • greater_than_or_equal_to (Numeric, nil) (defaults to: nil)

    Match values that are greater than or equal to the specified value.

  • less_than (Numeric, nil) (defaults to: nil)

    Match values that are less than the specified value.

  • less_than_or_equal_to (Numeric, nil) (defaults to: nil)

    Match values that are less than or equal to the specified value.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'sns/numeric_conditions.rb', line 14

def initialize(allowlist: nil, between: nil, between_strict: nil, greater_than: nil, greater_than_or_equal_to: nil, less_than: nil, less_than_or_equal_to: nil)
  @allowlist = allowlist
  Jsii::Type.check_type(@allowlist, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6Im51bWJlciJ9LCJraW5kIjoiYXJyYXkifX0=")), "allowlist") unless @allowlist.nil?
  @between = between.is_a?(Hash) ? ::AWSCDK::SNS::BetweenCondition.new(**between.transform_keys(&:to_sym)) : between
  Jsii::Type.check_type(@between, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLkJldHdlZW5Db25kaXRpb24ifQ==")), "between") unless @between.nil?
  @between_strict = between_strict.is_a?(Hash) ? ::AWSCDK::SNS::BetweenCondition.new(**between_strict.transform_keys(&:to_sym)) : between_strict
  Jsii::Type.check_type(@between_strict, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLkJldHdlZW5Db25kaXRpb24ifQ==")), "betweenStrict") unless @between_strict.nil?
  @greater_than = greater_than
  Jsii::Type.check_type(@greater_than, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "greaterThan") unless @greater_than.nil?
  @greater_than_or_equal_to = greater_than_or_equal_to
  Jsii::Type.check_type(@greater_than_or_equal_to, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "greaterThanOrEqualTo") unless @greater_than_or_equal_to.nil?
  @less_than = less_than
  Jsii::Type.check_type(@less_than, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "lessThan") unless @less_than.nil?
  @less_than_or_equal_to = less_than_or_equal_to
  Jsii::Type.check_type(@less_than_or_equal_to, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "lessThanOrEqualTo") unless @less_than_or_equal_to.nil?
end

Instance Attribute Details

#allowlistArray<Numeric>? (readonly)

Note:

Default: - None

Match one or more values.

Returns:

  • (Array<Numeric>, nil)


35
36
37
# File 'sns/numeric_conditions.rb', line 35

def allowlist
  @allowlist
end

#betweenAWSCDK::SNS::BetweenCondition? (readonly)

Note:

Default: - None

Match values that are between the specified values.



40
41
42
# File 'sns/numeric_conditions.rb', line 40

def between
  @between
end

#between_strictAWSCDK::SNS::BetweenCondition? (readonly)

Note:

Default: - None

Match values that are strictly between the specified values.



45
46
47
# File 'sns/numeric_conditions.rb', line 45

def between_strict
  @between_strict
end

#greater_thanNumeric? (readonly)

Note:

Default: - None

Match values that are greater than the specified value.

Returns:

  • (Numeric, nil)


50
51
52
# File 'sns/numeric_conditions.rb', line 50

def greater_than
  @greater_than
end

#greater_than_or_equal_toNumeric? (readonly)

Note:

Default: - None

Match values that are greater than or equal to the specified value.

Returns:

  • (Numeric, nil)


55
56
57
# File 'sns/numeric_conditions.rb', line 55

def greater_than_or_equal_to
  @greater_than_or_equal_to
end

#less_thanNumeric? (readonly)

Note:

Default: - None

Match values that are less than the specified value.

Returns:

  • (Numeric, nil)


60
61
62
# File 'sns/numeric_conditions.rb', line 60

def less_than
  @less_than
end

#less_than_or_equal_toNumeric? (readonly)

Note:

Default: - None

Match values that are less than or equal to the specified value.

Returns:

  • (Numeric, nil)


65
66
67
# File 'sns/numeric_conditions.rb', line 65

def less_than_or_equal_to
  @less_than_or_equal_to
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
76
77
# File 'sns/numeric_conditions.rb', line 67

def self.jsii_properties
  {
    :allowlist => "allowlist",
    :between => "between",
    :between_strict => "betweenStrict",
    :greater_than => "greaterThan",
    :greater_than_or_equal_to => "greaterThanOrEqualTo",
    :less_than => "lessThan",
    :less_than_or_equal_to => "lessThanOrEqualTo",
  }
end

Instance Method Details

#to_jsiiObject



79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'sns/numeric_conditions.rb', line 79

def to_jsii
  result = {}
  result.merge!({
    "allowlist" => @allowlist,
    "between" => @between,
    "betweenStrict" => @between_strict,
    "greaterThan" => @greater_than,
    "greaterThanOrEqualTo" => @greater_than_or_equal_to,
    "lessThan" => @less_than,
    "lessThanOrEqualTo" => @less_than_or_equal_to,
  })
  result.compact
end