Class: AWSCDK::Pinpoint::CfnSegment::LocationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pinpoint/cfn_segment.rb

Overview

Specifies location-based criteria, such as region or GPS coordinates, for the segment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(country: nil, gps_point: nil) ⇒ LocationProperty

Returns a new instance of LocationProperty.

Parameters:



889
890
891
892
893
894
# File 'pinpoint/cfn_segment.rb', line 889

def initialize(country: nil, gps_point: nil)
  @country = country.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::SetDimensionProperty.new(**country.transform_keys(&:to_sym)) : country
  Jsii::Type.check_type(@country, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LlNldERpbWVuc2lvblByb3BlcnR5In1dfX0=")), "country") unless @country.nil?
  @gps_point = gps_point.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnSegment::GPSPointProperty.new(**gps_point.transform_keys(&:to_sym)) : gps_point
  Jsii::Type.check_type(@gps_point, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5TZWdtZW50LkdQU1BvaW50UHJvcGVydHkifV19fQ==")), "gpsPoint") unless @gps_point.nil?
end

Instance Attribute Details

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

The country or region code, in ISO 3166-1 alpha-2 format, for the segment.



900
901
902
# File 'pinpoint/cfn_segment.rb', line 900

def country
  @country
end

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

The GPS point dimension for the segment.



905
906
907
# File 'pinpoint/cfn_segment.rb', line 905

def gps_point
  @gps_point
end

Class Method Details

.jsii_propertiesObject



907
908
909
910
911
912
# File 'pinpoint/cfn_segment.rb', line 907

def self.jsii_properties
  {
    :country => "country",
    :gps_point => "gpsPoint",
  }
end

Instance Method Details

#to_jsiiObject



914
915
916
917
918
919
920
921
# File 'pinpoint/cfn_segment.rb', line 914

def to_jsii
  result = {}
  result.merge!({
    "country" => @country,
    "gpsPoint" => @gps_point,
  })
  result.compact
end