Class: AWSCDK::CustomerProfiles::CfnSegmentDefinition::SortAttributeProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
customer_profiles/cfn_segment_definition.rb

Overview

Defines the characteristics and rules for sorting by a specific attribute.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, order:, data_type: nil, type: nil) ⇒ SortAttributeProperty

Returns a new instance of SortAttributeProperty.

Parameters:

  • name (String)

    The name of the attribute to sort by.

  • order (String)

    The sort order for the attribute (ascending or descending).

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

    The data type of the sort attribute (e.g., string, number, date).

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

    The type of attribute (e.g., profile, calculated).



1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
# File 'customer_profiles/cfn_segment_definition.rb', line 1493

def initialize(name:, order:, data_type: nil, type: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @order = order
  Jsii::Type.check_type(@order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "order")
  @data_type = data_type
  Jsii::Type.check_type(@data_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dataType") unless @data_type.nil?
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil?
end

Instance Attribute Details

#data_typeString? (readonly)

The data type of the sort attribute (e.g., string, number, date).



1518
1519
1520
# File 'customer_profiles/cfn_segment_definition.rb', line 1518

def data_type
  @data_type
end

#nameString (readonly)

The name of the attribute to sort by.



1508
1509
1510
# File 'customer_profiles/cfn_segment_definition.rb', line 1508

def name
  @name
end

#orderString (readonly)

The sort order for the attribute (ascending or descending).



1513
1514
1515
# File 'customer_profiles/cfn_segment_definition.rb', line 1513

def order
  @order
end

#typeString? (readonly)

The type of attribute (e.g., profile, calculated).



1523
1524
1525
# File 'customer_profiles/cfn_segment_definition.rb', line 1523

def type
  @type
end

Class Method Details

.jsii_propertiesObject



1525
1526
1527
1528
1529
1530
1531
1532
# File 'customer_profiles/cfn_segment_definition.rb', line 1525

def self.jsii_properties
  {
    :name => "name",
    :order => "order",
    :data_type => "dataType",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
# File 'customer_profiles/cfn_segment_definition.rb', line 1534

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "order" => @order,
    "dataType" => @data_type,
    "type" => @type,
  })
  result.compact
end