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

io.cloudshiftdev.awscdk.services.codestarnotifications.INotificationRuleTarget.kt Maven / Gradle / Ivy

There is a newer version: 0.10.0
Show newest version
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")

package io.cloudshiftdev.awscdk.services.codestarnotifications

import io.cloudshiftdev.awscdk.common.CdkObject
import io.cloudshiftdev.awscdk.common.CdkObjectWrappers
import io.cloudshiftdev.constructs.Construct

/**
 * Represents a notification target That allows AWS Chatbot and SNS topic to associate with this
 * rule target.
 */
public interface INotificationRuleTarget {
  /**
   * Returns a target configuration for notification rule.
   *
   * @param scope 
   */
  public fun bindAsNotificationRuleTarget(scope: Construct): NotificationRuleTargetConfig

  private class Wrapper(
    cdkObject: software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget,
  ) : CdkObject(cdkObject),
      INotificationRuleTarget {
    /**
     * Returns a target configuration for notification rule.
     *
     * @param scope 
     */
    override fun bindAsNotificationRuleTarget(scope: Construct): NotificationRuleTargetConfig =
        unwrap(this).bindAsNotificationRuleTarget(scope.let(Construct.Companion::unwrap)).let(NotificationRuleTargetConfig::wrap)
  }

  public companion object {
    internal
        fun wrap(cdkObject: software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget):
        INotificationRuleTarget = CdkObjectWrappers.wrap(cdkObject) as? INotificationRuleTarget ?:
        Wrapper(cdkObject)

    internal fun unwrap(wrapped: INotificationRuleTarget):
        software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget = (wrapped as
        CdkObject).cdkObject as
        software.amazon.awscdk.services.codestarnotifications.INotificationRuleTarget
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy