Class: AWSCDK::AppSync::BaseChannelNamespaceProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppSync::BaseChannelNamespaceProps
- Defined in:
- app_sync/base_channel_namespace_props.rb
Overview
the base properties for a channel namespace.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#authorization_config ⇒ AWSCDK::AppSync::NamespaceAuthConfig?
readonly
Authorization config for channel namespace.
-
#channel_namespace_name ⇒ String?
readonly
the name of the channel namespace.
-
#code ⇒ AWSCDK::AppSync::Code?
readonly
The Event Handler code.
-
#publish_handler_config ⇒ AWSCDK::AppSync::HandlerConfig?
readonly
onPublish handler config.
-
#subscribe_handler_config ⇒ AWSCDK::AppSync::HandlerConfig?
readonly
onSubscribe handler config.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(authorization_config: nil, channel_namespace_name: nil, code: nil, publish_handler_config: nil, subscribe_handler_config: nil) ⇒ BaseChannelNamespaceProps
constructor
A new instance of BaseChannelNamespaceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(authorization_config: nil, channel_namespace_name: nil, code: nil, publish_handler_config: nil, subscribe_handler_config: nil) ⇒ BaseChannelNamespaceProps
Returns a new instance of BaseChannelNamespaceProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app_sync/base_channel_namespace_props.rb', line 12 def initialize(authorization_config: nil, channel_namespace_name: nil, code: nil, publish_handler_config: nil, subscribe_handler_config: nil) @authorization_config = .is_a?(Hash) ? ::AWSCDK::AppSync::NamespaceAuthConfig.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@authorization_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5OYW1lc3BhY2VBdXRoQ29uZmlnIn0=")), "authorizationConfig") unless @authorization_config.nil? @channel_namespace_name = channel_namespace_name Jsii::Type.check_type(@channel_namespace_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "channelNamespaceName") unless @channel_namespace_name.nil? @code = code Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5Db2RlIn0=")), "code") unless @code.nil? @publish_handler_config = publish_handler_config.is_a?(Hash) ? ::AWSCDK::AppSync::HandlerConfig.new(**publish_handler_config.transform_keys(&:to_sym)) : publish_handler_config Jsii::Type.check_type(@publish_handler_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5IYW5kbGVyQ29uZmlnIn0=")), "publishHandlerConfig") unless @publish_handler_config.nil? @subscribe_handler_config = subscribe_handler_config.is_a?(Hash) ? ::AWSCDK::AppSync::HandlerConfig.new(**subscribe_handler_config.transform_keys(&:to_sym)) : subscribe_handler_config Jsii::Type.check_type(@subscribe_handler_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5IYW5kbGVyQ29uZmlnIn0=")), "subscribeHandlerConfig") unless @subscribe_handler_config.nil? end |
Instance Attribute Details
#authorization_config ⇒ AWSCDK::AppSync::NamespaceAuthConfig? (readonly)
Note:
Default: - defaults to Event API default auth config
Authorization config for channel namespace.
29 30 31 |
# File 'app_sync/base_channel_namespace_props.rb', line 29 def @authorization_config end |
#channel_namespace_name ⇒ String? (readonly)
Note:
Default: - the construct's id will be used
the name of the channel namespace.
34 35 36 |
# File 'app_sync/base_channel_namespace_props.rb', line 34 def channel_namespace_name @channel_namespace_name end |
#code ⇒ AWSCDK::AppSync::Code? (readonly)
Note:
Default: - no code is used
The Event Handler code.
39 40 41 |
# File 'app_sync/base_channel_namespace_props.rb', line 39 def code @code end |
#publish_handler_config ⇒ AWSCDK::AppSync::HandlerConfig? (readonly)
Note:
Default: - no handler config
onPublish handler config.
44 45 46 |
# File 'app_sync/base_channel_namespace_props.rb', line 44 def publish_handler_config @publish_handler_config end |
#subscribe_handler_config ⇒ AWSCDK::AppSync::HandlerConfig? (readonly)
Note:
Default: - no handler config
onSubscribe handler config.
49 50 51 |
# File 'app_sync/base_channel_namespace_props.rb', line 49 def subscribe_handler_config @subscribe_handler_config end |
Class Method Details
.jsii_properties ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'app_sync/base_channel_namespace_props.rb', line 51 def self.jsii_properties { :authorization_config => "authorizationConfig", :channel_namespace_name => "channelNamespaceName", :code => "code", :publish_handler_config => "publishHandlerConfig", :subscribe_handler_config => "subscribeHandlerConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 |
# File 'app_sync/base_channel_namespace_props.rb', line 61 def to_jsii result = {} result.merge!({ "authorizationConfig" => @authorization_config, "channelNamespaceName" => @channel_namespace_name, "code" => @code, "publishHandlerConfig" => @publish_handler_config, "subscribeHandlerConfig" => @subscribe_handler_config, }) result.compact end |