Class: AWSCDK::Cases::CfnFieldProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cases/cfn_field_props.rb

Overview

Properties for defining a CfnField.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, type:, attributes: nil, description: nil, domain_id: nil, tags: nil) ⇒ CfnFieldProps

Returns a new instance of CfnFieldProps.

Parameters:

  • name (String)

    Name of the field.

  • type (String)

    Type of the field.

  • attributes (AWSCDK::IResolvable, AWSCDK::Cases::CfnField::FieldAttributesProperty, nil) (defaults to: nil)

    Union of field attributes.

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

    Description of the field.

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

    The unique identifier of the Cases domain.

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

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



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'cases/cfn_field_props.rb', line 15

def initialize(name:, type:, attributes: nil, description: nil, domain_id: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @attributes = attributes.is_a?(Hash) ? ::AWSCDK::Cases::CfnField::FieldAttributesProperty.new(**attributes.transform_keys(&:to_sym)) : attributes
  Jsii::Type.check_type(@attributes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jYXNlcy5DZm5GaWVsZC5GaWVsZEF0dHJpYnV0ZXNQcm9wZXJ0eSJ9XX19")), "attributes") unless @attributes.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @domain_id = domain_id
  Jsii::Type.check_type(@domain_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainId") unless @domain_id.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?
end

Instance Attribute Details

#attributesAWSCDK::IResolvable, ... (readonly)

Union of field attributes.



44
45
46
# File 'cases/cfn_field_props.rb', line 44

def attributes
  @attributes
end

#descriptionString? (readonly)

Description of the field.



49
50
51
# File 'cases/cfn_field_props.rb', line 49

def description
  @description
end

#domain_idString? (readonly)

The unique identifier of the Cases domain.



54
55
56
# File 'cases/cfn_field_props.rb', line 54

def domain_id
  @domain_id
end

#nameString (readonly)

Name of the field.



34
35
36
# File 'cases/cfn_field_props.rb', line 34

def name
  @name
end

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

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



59
60
61
# File 'cases/cfn_field_props.rb', line 59

def tags
  @tags
end

#typeString (readonly)

Type of the field.



39
40
41
# File 'cases/cfn_field_props.rb', line 39

def type
  @type
end

Class Method Details

.jsii_propertiesObject



61
62
63
64
65
66
67
68
69
70
# File 'cases/cfn_field_props.rb', line 61

def self.jsii_properties
  {
    :name => "name",
    :type => "type",
    :attributes => "attributes",
    :description => "description",
    :domain_id => "domainId",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



72
73
74
75
76
77
78
79
80
81
82
83
# File 'cases/cfn_field_props.rb', line 72

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "type" => @type,
    "attributes" => @attributes,
    "description" => @description,
    "domainId" => @domain_id,
    "tags" => @tags,
  })
  result.compact
end