Class: AWSCDK::AppSync::SourceAPI

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_sync/source_api.rb

Overview

Configuration of source API.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_api:, description: nil, merge_type: nil) ⇒ SourceAPI

Returns a new instance of SourceAPI.

Parameters:

  • source_api (AWSCDK::AppSync::IGraphqlAPI)

    Source API that is associated with the merged API.

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

    Description of the Source API asssociation.

  • merge_type (AWSCDK::AppSync::MergeType, nil) (defaults to: nil)

    Merging option used to associate the source API to the Merged API.



10
11
12
13
14
15
16
17
# File 'app_sync/source_api.rb', line 10

def initialize(source_api:, description: nil, merge_type: nil)
  @source_api = source_api
  Jsii::Type.check_type(@source_api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5JR3JhcGhxbEFwaSJ9")), "sourceApi")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @merge_type = merge_type
  Jsii::Type.check_type(@merge_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5NZXJnZVR5cGUifQ==")), "mergeType") unless @merge_type.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

Description of the Source API asssociation.

Returns:

  • (String, nil)


26
27
28
# File 'app_sync/source_api.rb', line 26

def description
  @description
end

#merge_typeAWSCDK::AppSync::MergeType? (readonly)

Note:

Default: - Auto merge. The merge is triggered automatically when the source API has changed

Merging option used to associate the source API to the Merged API.

Returns:



31
32
33
# File 'app_sync/source_api.rb', line 31

def merge_type
  @merge_type
end

#source_apiAWSCDK::AppSync::IGraphqlAPI (readonly)

Source API that is associated with the merged API.



22
23
24
# File 'app_sync/source_api.rb', line 22

def source_api
  @source_api
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
39
# File 'app_sync/source_api.rb', line 33

def self.jsii_properties
  {
    :source_api => "sourceApi",
    :description => "description",
    :merge_type => "mergeType",
  }
end

Instance Method Details

#to_jsiiObject



41
42
43
44
45
46
47
48
49
# File 'app_sync/source_api.rb', line 41

def to_jsii
  result = {}
  result.merge!({
    "sourceApi" => @source_api,
    "description" => @description,
    "mergeType" => @merge_type,
  })
  result.compact
end