All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.cloudshiftdev.awscdk.services.appsync.CfnSourceApiAssociation.kt Maven / Gradle / Ivy

The newest version!
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")

package io.cloudshiftdev.awscdk.services.appsync

import io.cloudshiftdev.awscdk.CfnResource
import io.cloudshiftdev.awscdk.IInspectable
import io.cloudshiftdev.awscdk.IResolvable
import io.cloudshiftdev.awscdk.TreeInspector
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import io.cloudshiftdev.awscdk.common.CdkObject
import io.cloudshiftdev.awscdk.common.CdkObjectWrappers
import kotlin.Any
import kotlin.String
import kotlin.Unit
import kotlin.jvm.JvmName
import io.cloudshiftdev.constructs.Construct as CloudshiftdevConstructsConstruct
import software.constructs.Construct as SoftwareConstructsConstruct

/**
 * Describes the configuration of a source API.
 *
 * A source API is a GraphQL API that is linked to a merged API. There can be multiple source APIs
 * attached to each merged API. When linked to a merged API, the source API's schema, data sources, and
 * resolvers will be combined with other linked source API data to form a new, singular API. Source
 * APIs can originate from your account or from other accounts via Resource Access Manager.
 *
 * Example:
 *
 * ```
 * // The code below shows an example of how to instantiate this type.
 * // The values are placeholders you should change.
 * import io.cloudshiftdev.awscdk.services.appsync.*;
 * CfnSourceApiAssociation cfnSourceApiAssociation = CfnSourceApiAssociation.Builder.create(this,
 * "MyCfnSourceApiAssociation")
 * .description("description")
 * .mergedApiIdentifier("mergedApiIdentifier")
 * .sourceApiAssociationConfig(SourceApiAssociationConfigProperty.builder()
 * .mergeType("mergeType")
 * .build())
 * .sourceApiIdentifier("sourceApiIdentifier")
 * .build();
 * ```
 *
 * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html)
 */
public open class CfnSourceApiAssociation(
  cdkObject: software.amazon.awscdk.services.appsync.CfnSourceApiAssociation,
) : CfnResource(cdkObject),
    IInspectable {
  public constructor(scope: CloudshiftdevConstructsConstruct, id: String) :
      this(software.amazon.awscdk.services.appsync.CfnSourceApiAssociation(scope.let(CloudshiftdevConstructsConstruct.Companion::unwrap),
      id)
  )

  public constructor(
    scope: CloudshiftdevConstructsConstruct,
    id: String,
    props: CfnSourceApiAssociationProps,
  ) :
      this(software.amazon.awscdk.services.appsync.CfnSourceApiAssociation(scope.let(CloudshiftdevConstructsConstruct.Companion::unwrap),
      id, props.let(CfnSourceApiAssociationProps.Companion::unwrap))
  )

  public constructor(
    scope: CloudshiftdevConstructsConstruct,
    id: String,
    props: CfnSourceApiAssociationProps.Builder.() -> Unit,
  ) : this(scope, id, CfnSourceApiAssociationProps(props)
  )

  /**
   * The Amazon Resource Name (ARN) of the source API association.
   */
  public open fun attrAssociationArn(): String = unwrap(this).getAttrAssociationArn()

  /**
   * The ID generated by the AppSync service for the source API association.
   */
  public open fun attrAssociationId(): String = unwrap(this).getAttrAssociationId()

  /**
   * The datetime value of the last successful merge of the source API association.
   *
   * The result will be in UTC format and your local time zone.
   */
  public open fun attrLastSuccessfulMergeDate(): String =
      unwrap(this).getAttrLastSuccessfulMergeDate()

  /**
   * The Amazon Resource Name (ARN) of the merged API.
   */
  public open fun attrMergedApiArn(): String = unwrap(this).getAttrMergedApiArn()

  /**
   * The ID of the merged API.
   */
  public open fun attrMergedApiId(): String = unwrap(this).getAttrMergedApiId()

  /**
   * The source API's Amazon Resource Name (ARN) value.
   */
  public open fun attrSourceApiArn(): String = unwrap(this).getAttrSourceApiArn()

  /**
   * The state of the source API association.
   *
   * The following values are valid:
   *
   * `MERGE_SCHEDULED | MERGE_FAILED | MERGE_SUCCESS | MERGE_IN_PROGRESS |
   * AUTO_MERGE_SCHEDULE_FAILED | DELETION_SCHEDULED | DELETION_IN_PROGRESS | DELETION_FAILED`
   */
  public open fun attrSourceApiAssociationStatus(): String =
      unwrap(this).getAttrSourceApiAssociationStatus()

  /**
   * The message describing the state of the source API association.
   */
  public open fun attrSourceApiAssociationStatusDetail(): String =
      unwrap(this).getAttrSourceApiAssociationStatusDetail()

  /**
   * The ID of the source API.
   */
  public open fun attrSourceApiId(): String = unwrap(this).getAttrSourceApiId()

  /**
   * The description field of the association configuration.
   */
  public open fun description(): String? = unwrap(this).getDescription()

  /**
   * The description field of the association configuration.
   */
  public open fun description(`value`: String) {
    unwrap(this).setDescription(`value`)
  }

  /**
   * Examines the CloudFormation resource and discloses attributes.
   *
   * @param inspector tree inspector to collect and process attributes. 
   */
  public override fun inspect(inspector: TreeInspector) {
    unwrap(this).inspect(inspector.let(TreeInspector.Companion::unwrap))
  }

  /**
   * The identifier of the AppSync Merged API.
   */
  public open fun mergedApiIdentifier(): String? = unwrap(this).getMergedApiIdentifier()

  /**
   * The identifier of the AppSync Merged API.
   */
  public open fun mergedApiIdentifier(`value`: String) {
    unwrap(this).setMergedApiIdentifier(`value`)
  }

  /**
   * The `SourceApiAssociationConfig` object data.
   */
  public open fun sourceApiAssociationConfig(): Any? = unwrap(this).getSourceApiAssociationConfig()

  /**
   * The `SourceApiAssociationConfig` object data.
   */
  public open fun sourceApiAssociationConfig(`value`: IResolvable) {
    unwrap(this).setSourceApiAssociationConfig(`value`.let(IResolvable.Companion::unwrap))
  }

  /**
   * The `SourceApiAssociationConfig` object data.
   */
  public open fun sourceApiAssociationConfig(`value`: SourceApiAssociationConfigProperty) {
    unwrap(this).setSourceApiAssociationConfig(`value`.let(SourceApiAssociationConfigProperty.Companion::unwrap))
  }

  /**
   * The `SourceApiAssociationConfig` object data.
   */
  @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
  @JvmName("e1bce05f541ba7087b1072d6d8719c04c39d66c9ea93eb11905c18f00dc120ee")
  public open
      fun sourceApiAssociationConfig(`value`: SourceApiAssociationConfigProperty.Builder.() -> Unit):
      Unit = sourceApiAssociationConfig(SourceApiAssociationConfigProperty(`value`))

  /**
   * The identifier of the AppSync Source API.
   */
  public open fun sourceApiIdentifier(): String? = unwrap(this).getSourceApiIdentifier()

  /**
   * The identifier of the AppSync Source API.
   */
  public open fun sourceApiIdentifier(`value`: String) {
    unwrap(this).setSourceApiIdentifier(`value`)
  }

  /**
   * A fluent builder for [io.cloudshiftdev.awscdk.services.appsync.CfnSourceApiAssociation].
   */
  @CdkDslMarker
  public interface Builder {
    /**
     * The description field of the association configuration.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-description)
     * @param description The description field of the association configuration. 
     */
    public fun description(description: String)

    /**
     * The identifier of the AppSync Merged API.
     *
     * This is generated by the AppSync service. In most cases, Merged APIs (especially in your
     * account) only require the API ID value or ARN of the merged API. However, Merged APIs from other
     * accounts (cross-account use cases) strictly require the full resource ARN of the merged API.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-mergedapiidentifier)
     * @param mergedApiIdentifier The identifier of the AppSync Merged API. 
     */
    public fun mergedApiIdentifier(mergedApiIdentifier: String)

    /**
     * The `SourceApiAssociationConfig` object data.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-sourceapiassociationconfig)
     * @param sourceApiAssociationConfig The `SourceApiAssociationConfig` object data. 
     */
    public fun sourceApiAssociationConfig(sourceApiAssociationConfig: IResolvable)

    /**
     * The `SourceApiAssociationConfig` object data.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-sourceapiassociationconfig)
     * @param sourceApiAssociationConfig The `SourceApiAssociationConfig` object data. 
     */
    public
        fun sourceApiAssociationConfig(sourceApiAssociationConfig: SourceApiAssociationConfigProperty)

    /**
     * The `SourceApiAssociationConfig` object data.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-sourceapiassociationconfig)
     * @param sourceApiAssociationConfig The `SourceApiAssociationConfig` object data. 
     */
    @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
    @JvmName("b83545ef86d3cef4902a53c5fc8e79af6c7e41f53f252afb692d4e978d0745c2")
    public
        fun sourceApiAssociationConfig(sourceApiAssociationConfig: SourceApiAssociationConfigProperty.Builder.() -> Unit)

    /**
     * The identifier of the AppSync Source API.
     *
     * This is generated by the AppSync service. In most cases, source APIs (especially in your
     * account) only require the API ID value or ARN of the source API. However, source APIs from other
     * accounts (cross-account use cases) strictly require the full resource ARN of the source API.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-sourceapiidentifier)
     * @param sourceApiIdentifier The identifier of the AppSync Source API. 
     */
    public fun sourceApiIdentifier(sourceApiIdentifier: String)
  }

  private class BuilderImpl(
    scope: SoftwareConstructsConstruct,
    id: String,
  ) : Builder {
    private val cdkBuilder: software.amazon.awscdk.services.appsync.CfnSourceApiAssociation.Builder
        = software.amazon.awscdk.services.appsync.CfnSourceApiAssociation.Builder.create(scope, id)

    /**
     * The description field of the association configuration.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-description)
     * @param description The description field of the association configuration. 
     */
    override fun description(description: String) {
      cdkBuilder.description(description)
    }

    /**
     * The identifier of the AppSync Merged API.
     *
     * This is generated by the AppSync service. In most cases, Merged APIs (especially in your
     * account) only require the API ID value or ARN of the merged API. However, Merged APIs from other
     * accounts (cross-account use cases) strictly require the full resource ARN of the merged API.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-mergedapiidentifier)
     * @param mergedApiIdentifier The identifier of the AppSync Merged API. 
     */
    override fun mergedApiIdentifier(mergedApiIdentifier: String) {
      cdkBuilder.mergedApiIdentifier(mergedApiIdentifier)
    }

    /**
     * The `SourceApiAssociationConfig` object data.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-sourceapiassociationconfig)
     * @param sourceApiAssociationConfig The `SourceApiAssociationConfig` object data. 
     */
    override fun sourceApiAssociationConfig(sourceApiAssociationConfig: IResolvable) {
      cdkBuilder.sourceApiAssociationConfig(sourceApiAssociationConfig.let(IResolvable.Companion::unwrap))
    }

    /**
     * The `SourceApiAssociationConfig` object data.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-sourceapiassociationconfig)
     * @param sourceApiAssociationConfig The `SourceApiAssociationConfig` object data. 
     */
    override
        fun sourceApiAssociationConfig(sourceApiAssociationConfig: SourceApiAssociationConfigProperty) {
      cdkBuilder.sourceApiAssociationConfig(sourceApiAssociationConfig.let(SourceApiAssociationConfigProperty.Companion::unwrap))
    }

    /**
     * The `SourceApiAssociationConfig` object data.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-sourceapiassociationconfig)
     * @param sourceApiAssociationConfig The `SourceApiAssociationConfig` object data. 
     */
    @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
    @JvmName("b83545ef86d3cef4902a53c5fc8e79af6c7e41f53f252afb692d4e978d0745c2")
    override
        fun sourceApiAssociationConfig(sourceApiAssociationConfig: SourceApiAssociationConfigProperty.Builder.() -> Unit):
        Unit =
        sourceApiAssociationConfig(SourceApiAssociationConfigProperty(sourceApiAssociationConfig))

    /**
     * The identifier of the AppSync Source API.
     *
     * This is generated by the AppSync service. In most cases, source APIs (especially in your
     * account) only require the API ID value or ARN of the source API. However, source APIs from other
     * accounts (cross-account use cases) strictly require the full resource ARN of the source API.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-sourceapiassociation.html#cfn-appsync-sourceapiassociation-sourceapiidentifier)
     * @param sourceApiIdentifier The identifier of the AppSync Source API. 
     */
    override fun sourceApiIdentifier(sourceApiIdentifier: String) {
      cdkBuilder.sourceApiIdentifier(sourceApiIdentifier)
    }

    public fun build(): software.amazon.awscdk.services.appsync.CfnSourceApiAssociation =
        cdkBuilder.build()
  }

  public companion object {
    public val CFN_RESOURCE_TYPE_NAME: String =
        software.amazon.awscdk.services.appsync.CfnSourceApiAssociation.CFN_RESOURCE_TYPE_NAME

    public operator fun invoke(
      scope: CloudshiftdevConstructsConstruct,
      id: String,
      block: Builder.() -> Unit = {},
    ): CfnSourceApiAssociation {
      val builderImpl = BuilderImpl(CloudshiftdevConstructsConstruct.unwrap(scope), id)
      return CfnSourceApiAssociation(builderImpl.apply(block).build())
    }

    internal fun wrap(cdkObject: software.amazon.awscdk.services.appsync.CfnSourceApiAssociation):
        CfnSourceApiAssociation = CfnSourceApiAssociation(cdkObject)

    internal fun unwrap(wrapped: CfnSourceApiAssociation):
        software.amazon.awscdk.services.appsync.CfnSourceApiAssociation = wrapped.cdkObject as
        software.amazon.awscdk.services.appsync.CfnSourceApiAssociation
  }

  /**
   * Describes properties used to specify configurations related to a source API.
   *
   * This is a property of the `AWS:AppSync:SourceApiAssociation` type.
   *
   * Example:
   *
   * ```
   * // The code below shows an example of how to instantiate this type.
   * // The values are placeholders you should change.
   * import io.cloudshiftdev.awscdk.services.appsync.*;
   * SourceApiAssociationConfigProperty sourceApiAssociationConfigProperty =
   * SourceApiAssociationConfigProperty.builder()
   * .mergeType("mergeType")
   * .build();
   * ```
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-sourceapiassociation-sourceapiassociationconfig.html)
   */
  public interface SourceApiAssociationConfigProperty {
    /**
     * The property that indicates which merging option is enabled in the source API association.
     *
     * Valid merge types are `MANUAL_MERGE` (default) and `AUTO_MERGE` . Manual merges are the
     * default behavior and require the user to trigger any changes from the source APIs to the merged
     * API manually. Auto merges subscribe the merged API to the changes performed on the source APIs
     * so that any change in the source APIs are also made to the merged API. Auto merges use
     * `MergedApiExecutionRoleArn` to perform merge operations.
     *
     * The following values are valid:
     *
     * `MANUAL_MERGE | AUTO_MERGE`
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-sourceapiassociation-sourceapiassociationconfig.html#cfn-appsync-sourceapiassociation-sourceapiassociationconfig-mergetype)
     */
    public fun mergeType(): String? = unwrap(this).getMergeType()

    /**
     * A builder for [SourceApiAssociationConfigProperty]
     */
    @CdkDslMarker
    public interface Builder {
      /**
       * @param mergeType The property that indicates which merging option is enabled in the source
       * API association.
       * Valid merge types are `MANUAL_MERGE` (default) and `AUTO_MERGE` . Manual merges are the
       * default behavior and require the user to trigger any changes from the source APIs to the
       * merged API manually. Auto merges subscribe the merged API to the changes performed on the
       * source APIs so that any change in the source APIs are also made to the merged API. Auto merges
       * use `MergedApiExecutionRoleArn` to perform merge operations.
       *
       * The following values are valid:
       *
       * `MANUAL_MERGE | AUTO_MERGE`
       */
      public fun mergeType(mergeType: String)
    }

    private class BuilderImpl : Builder {
      private val cdkBuilder:
          software.amazon.awscdk.services.appsync.CfnSourceApiAssociation.SourceApiAssociationConfigProperty.Builder
          =
          software.amazon.awscdk.services.appsync.CfnSourceApiAssociation.SourceApiAssociationConfigProperty.builder()

      /**
       * @param mergeType The property that indicates which merging option is enabled in the source
       * API association.
       * Valid merge types are `MANUAL_MERGE` (default) and `AUTO_MERGE` . Manual merges are the
       * default behavior and require the user to trigger any changes from the source APIs to the
       * merged API manually. Auto merges subscribe the merged API to the changes performed on the
       * source APIs so that any change in the source APIs are also made to the merged API. Auto merges
       * use `MergedApiExecutionRoleArn` to perform merge operations.
       *
       * The following values are valid:
       *
       * `MANUAL_MERGE | AUTO_MERGE`
       */
      override fun mergeType(mergeType: String) {
        cdkBuilder.mergeType(mergeType)
      }

      public fun build():
          software.amazon.awscdk.services.appsync.CfnSourceApiAssociation.SourceApiAssociationConfigProperty
          = cdkBuilder.build()
    }

    private class Wrapper(
      cdkObject: software.amazon.awscdk.services.appsync.CfnSourceApiAssociation.SourceApiAssociationConfigProperty,
    ) : CdkObject(cdkObject),
        SourceApiAssociationConfigProperty {
      /**
       * The property that indicates which merging option is enabled in the source API association.
       *
       * Valid merge types are `MANUAL_MERGE` (default) and `AUTO_MERGE` . Manual merges are the
       * default behavior and require the user to trigger any changes from the source APIs to the
       * merged API manually. Auto merges subscribe the merged API to the changes performed on the
       * source APIs so that any change in the source APIs are also made to the merged API. Auto merges
       * use `MergedApiExecutionRoleArn` to perform merge operations.
       *
       * The following values are valid:
       *
       * `MANUAL_MERGE | AUTO_MERGE`
       *
       * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-sourceapiassociation-sourceapiassociationconfig.html#cfn-appsync-sourceapiassociation-sourceapiassociationconfig-mergetype)
       */
      override fun mergeType(): String? = unwrap(this).getMergeType()
    }

    public companion object {
      public operator fun invoke(block: Builder.() -> Unit = {}):
          SourceApiAssociationConfigProperty {
        val builderImpl = BuilderImpl()
        return Wrapper(builderImpl.apply(block).build())
      }

      internal
          fun wrap(cdkObject: software.amazon.awscdk.services.appsync.CfnSourceApiAssociation.SourceApiAssociationConfigProperty):
          SourceApiAssociationConfigProperty = CdkObjectWrappers.wrap(cdkObject) as?
          SourceApiAssociationConfigProperty ?: Wrapper(cdkObject)

      internal fun unwrap(wrapped: SourceApiAssociationConfigProperty):
          software.amazon.awscdk.services.appsync.CfnSourceApiAssociation.SourceApiAssociationConfigProperty
          = (wrapped as CdkObject).cdkObject as
          software.amazon.awscdk.services.appsync.CfnSourceApiAssociation.SourceApiAssociationConfigProperty
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy