Class: AWSCDK::Pinpoint::CfnGCMChannelProps

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

Overview

Properties for defining a CfnGCMChannel.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(application_id:, api_key: nil, default_authentication_method: nil, enabled: nil, service_json: nil) ⇒ CfnGCMChannelProps

Returns a new instance of CfnGCMChannelProps.

Parameters:

  • application_id (String)

    The unique identifier for the Amazon Pinpoint application that the GCM channel applies to.

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

    The Web API key, also called the server key , that you received from Google to communicate with Google services.

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

    The default authentication method used for GCM.

  • enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Specifies whether to enable the GCM channel for the Amazon Pinpoint application.

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

    The contents of the JSON file provided by Google during registration in order to generate an access token for authentication.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'pinpoint/cfn_gcm_channel_props.rb', line 14

def initialize(application_id:, api_key: nil, default_authentication_method: nil, enabled: nil, service_json: nil)
  @application_id = application_id
  Jsii::Type.check_type(@application_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "applicationId")
  @api_key = api_key
  Jsii::Type.check_type(@api_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiKey") unless @api_key.nil?
  @default_authentication_method = default_authentication_method
  Jsii::Type.check_type(@default_authentication_method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultAuthenticationMethod") unless @default_authentication_method.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") unless @enabled.nil?
  @service_json = service_json
  Jsii::Type.check_type(@service_json, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceJson") unless @service_json.nil?
end

Instance Attribute Details

#api_keyString? (readonly)

The Web API key, also called the server key , that you received from Google to communicate with Google services.



36
37
38
# File 'pinpoint/cfn_gcm_channel_props.rb', line 36

def api_key
  @api_key
end

#application_idString (readonly)

The unique identifier for the Amazon Pinpoint application that the GCM channel applies to.



31
32
33
# File 'pinpoint/cfn_gcm_channel_props.rb', line 31

def application_id
  @application_id
end

#default_authentication_methodString? (readonly)

The default authentication method used for GCM.

Values are either "TOKEN" or "KEY". Defaults to "KEY".



43
44
45
# File 'pinpoint/cfn_gcm_channel_props.rb', line 43

def default_authentication_method
  @default_authentication_method
end

#enabledBoolean, ... (readonly)

Specifies whether to enable the GCM channel for the Amazon Pinpoint application.



48
49
50
# File 'pinpoint/cfn_gcm_channel_props.rb', line 48

def enabled
  @enabled
end

#service_jsonString? (readonly)

The contents of the JSON file provided by Google during registration in order to generate an access token for authentication.

For more information see Migrate from legacy FCM APIs to HTTP v1 .



55
56
57
# File 'pinpoint/cfn_gcm_channel_props.rb', line 55

def service_json
  @service_json
end

Class Method Details

.jsii_propertiesObject



57
58
59
60
61
62
63
64
65
# File 'pinpoint/cfn_gcm_channel_props.rb', line 57

def self.jsii_properties
  {
    :application_id => "applicationId",
    :api_key => "apiKey",
    :default_authentication_method => "defaultAuthenticationMethod",
    :enabled => "enabled",
    :service_json => "serviceJson",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "applicationId" => @application_id,
    "apiKey" => @api_key,
    "defaultAuthenticationMethod" => @default_authentication_method,
    "enabled" => @enabled,
    "serviceJson" => @service_json,
  })
  result.compact
end