Class: AWSCDK::Connect::CfnTaskTemplate::FieldProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
connect/cfn_task_template.rb

Overview

Describes a single task template field.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, type:, description: nil, single_select_options: nil) ⇒ FieldProperty

Returns a new instance of FieldProperty.

Parameters:



779
780
781
782
783
784
785
786
787
788
# File 'connect/cfn_task_template.rb', line 779

def initialize(id:, type:, description: nil, single_select_options: nil)
  @id = id.is_a?(Hash) ? ::AWSCDK::Connect::CfnTaskTemplate::FieldIdentifierProperty.new(**id.transform_keys(&:to_sym)) : id
  Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb25uZWN0LkNmblRhc2tUZW1wbGF0ZS5GaWVsZElkZW50aWZpZXJQcm9wZXJ0eSJ9XX19")), "id")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @single_select_options = single_select_options
  Jsii::Type.check_type(@single_select_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "singleSelectOptions") unless @single_select_options.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the field.



806
807
808
# File 'connect/cfn_task_template.rb', line 806

def description
  @description
end

#single_select_optionsArray<String>? (readonly)

A list of options for a single select field.



811
812
813
# File 'connect/cfn_task_template.rb', line 811

def single_select_options
  @single_select_options
end

#typeString (readonly)

Indicates the type of field.

Following are the valid field types: NAME DESCRIPTION | SCHEDULED_TIME | QUICK_CONNECT | URL | NUMBER | TEXT | TEXT_AREA | DATE_TIME | BOOLEAN | SINGLE_SELECT | EMAIL



801
802
803
# File 'connect/cfn_task_template.rb', line 801

def type
  @type
end

Class Method Details

.jsii_propertiesObject



813
814
815
816
817
818
819
820
# File 'connect/cfn_task_template.rb', line 813

def self.jsii_properties
  {
    :id => "id",
    :type => "type",
    :description => "description",
    :single_select_options => "singleSelectOptions",
  }
end

Instance Method Details

#to_jsiiObject



822
823
824
825
826
827
828
829
830
831
# File 'connect/cfn_task_template.rb', line 822

def to_jsii
  result = {}
  result.merge!({
    "id" => @id,
    "type" => @type,
    "description" => @description,
    "singleSelectOptions" => @single_select_options,
  })
  result.compact
end