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

io.cloudshiftdev.awscdk.services.guardduty.CfnMalwareProtectionPlan.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.guardduty

import io.cloudshiftdev.awscdk.CfnResource
import io.cloudshiftdev.awscdk.IInspectable
import io.cloudshiftdev.awscdk.IResolvable
import io.cloudshiftdev.awscdk.ITaggableV2
import io.cloudshiftdev.awscdk.TagManager
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.collections.List
import kotlin.jvm.JvmName
import io.cloudshiftdev.constructs.Construct as CloudshiftdevConstructsConstruct
import software.constructs.Construct as SoftwareConstructsConstruct

/**
 * Creates a new Malware Protection plan for the protected resource.
 *
 * When you create a Malware Protection plan, the [AWS service terms for GuardDuty Malware
 * Protection](https://docs.aws.amazon.com/service-terms/#87._Amazon_GuardDuty) will apply.
 *
 * 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.guardduty.*;
 * CfnMalwareProtectionPlan cfnMalwareProtectionPlan = CfnMalwareProtectionPlan.Builder.create(this,
 * "MyCfnMalwareProtectionPlan")
 * .protectedResource(CFNProtectedResourceProperty.builder()
 * .s3Bucket(S3BucketProperty.builder()
 * .bucketName("bucketName")
 * .objectPrefixes(List.of("objectPrefixes"))
 * .build())
 * .build())
 * .role("role")
 * // the properties below are optional
 * .actions(CFNActionsProperty.builder()
 * .tagging(CFNTaggingProperty.builder()
 * .status("status")
 * .build())
 * .build())
 * .tags(List.of(TagItemProperty.builder()
 * .key("key")
 * .value("value")
 * .build()))
 * .build();
 * ```
 *
 * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html)
 */
public open class CfnMalwareProtectionPlan(
  cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan,
) : CfnResource(cdkObject),
    IInspectable,
    ITaggableV2 {
  public constructor(
    scope: CloudshiftdevConstructsConstruct,
    id: String,
    props: CfnMalwareProtectionPlanProps,
  ) :
      this(software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan(scope.let(CloudshiftdevConstructsConstruct.Companion::unwrap),
      id, props.let(CfnMalwareProtectionPlanProps.Companion::unwrap))
  )

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

  /**
   * Specifies the action that is to be applied to the Malware Protection plan resource.
   */
  public open fun actions(): Any? = unwrap(this).getActions()

  /**
   * Specifies the action that is to be applied to the Malware Protection plan resource.
   */
  public open fun actions(`value`: IResolvable) {
    unwrap(this).setActions(`value`.let(IResolvable.Companion::unwrap))
  }

  /**
   * Specifies the action that is to be applied to the Malware Protection plan resource.
   */
  public open fun actions(`value`: CFNActionsProperty) {
    unwrap(this).setActions(`value`.let(CFNActionsProperty.Companion::unwrap))
  }

  /**
   * Specifies the action that is to be applied to the Malware Protection plan resource.
   */
  @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
  @JvmName("e8c0f7354ca66ef473e6c2b11034c2402d7741907cc40b003aac91789e03e51f")
  public open fun actions(`value`: CFNActionsProperty.Builder.() -> Unit): Unit =
      actions(CFNActionsProperty(`value`))

  /**
   * Amazon Resource Name (ARN) associated with this Malware Protection plan.
   */
  public open fun attrArn(): String = unwrap(this).getAttrArn()

  /**
   * The timestamp when the Malware Protection plan resource was created.
   */
  public open fun attrCreatedAt(): String = unwrap(this).getAttrCreatedAt()

  /**
   * A unique identifier associated with Malware Protection plan.
   */
  public open fun attrMalwareProtectionPlanId(): String =
      unwrap(this).getAttrMalwareProtectionPlanId()

  /**
   * Status of the Malware Protection plan resource.
   */
  public open fun attrStatus(): String = unwrap(this).getAttrStatus()

  /**
   * Status details associated with the Malware Protection plan resource status.
   */
  public open fun attrStatusReasons(): IResolvable =
      unwrap(this).getAttrStatusReasons().let(IResolvable::wrap)

  /**
   * Tag Manager which manages the tags for this resource.
   */
  public override fun cdkTagManager(): TagManager =
      unwrap(this).getCdkTagManager().let(TagManager::wrap)

  /**
   * 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))
  }

  /**
   * Information about the protected resource.
   */
  public open fun protectedResource(): Any = unwrap(this).getProtectedResource()

  /**
   * Information about the protected resource.
   */
  public open fun protectedResource(`value`: IResolvable) {
    unwrap(this).setProtectedResource(`value`.let(IResolvable.Companion::unwrap))
  }

  /**
   * Information about the protected resource.
   */
  public open fun protectedResource(`value`: CFNProtectedResourceProperty) {
    unwrap(this).setProtectedResource(`value`.let(CFNProtectedResourceProperty.Companion::unwrap))
  }

  /**
   * Information about the protected resource.
   */
  @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
  @JvmName("02d9ca2ecde150f650f4f14afddbe283cde885aadc27a8a166101610633f04ff")
  public open fun protectedResource(`value`: CFNProtectedResourceProperty.Builder.() -> Unit): Unit
      = protectedResource(CFNProtectedResourceProperty(`value`))

  /**
   * Amazon Resource Name (ARN) of the IAM role that includes the permissions required to scan and
   * (optionally) add tags to the associated protected resource.
   */
  public open fun role(): String = unwrap(this).getRole()

  /**
   * Amazon Resource Name (ARN) of the IAM role that includes the permissions required to scan and
   * (optionally) add tags to the associated protected resource.
   */
  public open fun role(`value`: String) {
    unwrap(this).setRole(`value`)
  }

  /**
   * The tags to be added to the created Malware Protection plan resource.
   */
  public open fun tags(): List = unwrap(this).getTags()?.map(TagItemProperty::wrap)
      ?: emptyList()

  /**
   * The tags to be added to the created Malware Protection plan resource.
   */
  public open fun tags(`value`: List) {
    unwrap(this).setTags(`value`.map(TagItemProperty.Companion::unwrap))
  }

  /**
   * The tags to be added to the created Malware Protection plan resource.
   */
  public open fun tags(vararg `value`: TagItemProperty): Unit = tags(`value`.toList())

  /**
   * A fluent builder for [io.cloudshiftdev.awscdk.services.guardduty.CfnMalwareProtectionPlan].
   */
  @CdkDslMarker
  public interface Builder {
    /**
     * Specifies the action that is to be applied to the Malware Protection plan resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-actions)
     * @param actions Specifies the action that is to be applied to the Malware Protection plan
     * resource. 
     */
    public fun actions(actions: IResolvable)

    /**
     * Specifies the action that is to be applied to the Malware Protection plan resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-actions)
     * @param actions Specifies the action that is to be applied to the Malware Protection plan
     * resource. 
     */
    public fun actions(actions: CFNActionsProperty)

    /**
     * Specifies the action that is to be applied to the Malware Protection plan resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-actions)
     * @param actions Specifies the action that is to be applied to the Malware Protection plan
     * resource. 
     */
    @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
    @JvmName("bd4189b419b8da58656eb1e11e86874cec3ad5b5bcc445a43930d8b49acb4084")
    public fun actions(actions: CFNActionsProperty.Builder.() -> Unit)

    /**
     * Information about the protected resource.
     *
     * Presently, `S3Bucket` is the only supported protected resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-protectedresource)
     * @param protectedResource Information about the protected resource. 
     */
    public fun protectedResource(protectedResource: IResolvable)

    /**
     * Information about the protected resource.
     *
     * Presently, `S3Bucket` is the only supported protected resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-protectedresource)
     * @param protectedResource Information about the protected resource. 
     */
    public fun protectedResource(protectedResource: CFNProtectedResourceProperty)

    /**
     * Information about the protected resource.
     *
     * Presently, `S3Bucket` is the only supported protected resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-protectedresource)
     * @param protectedResource Information about the protected resource. 
     */
    @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
    @JvmName("f037aad4bdfa558449e7b1bfc45d20485a525054d49c48d47d45d72f33c5b804")
    public fun protectedResource(protectedResource: CFNProtectedResourceProperty.Builder.() -> Unit)

    /**
     * Amazon Resource Name (ARN) of the IAM role that includes the permissions required to scan and
     * (optionally) add tags to the associated protected resource.
     *
     * To find the ARN of your IAM role, go to the IAM console, and select the role name for
     * details.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-role)
     * @param role Amazon Resource Name (ARN) of the IAM role that includes the permissions required
     * to scan and (optionally) add tags to the associated protected resource. 
     */
    public fun role(role: String)

    /**
     * The tags to be added to the created Malware Protection plan resource.
     *
     * Each tag consists of a key and an optional value, both of which you need to specify.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-tags)
     * @param tags The tags to be added to the created Malware Protection plan resource. 
     */
    public fun tags(tags: List)

    /**
     * The tags to be added to the created Malware Protection plan resource.
     *
     * Each tag consists of a key and an optional value, both of which you need to specify.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-tags)
     * @param tags The tags to be added to the created Malware Protection plan resource. 
     */
    public fun tags(vararg tags: TagItemProperty)
  }

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

    /**
     * Specifies the action that is to be applied to the Malware Protection plan resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-actions)
     * @param actions Specifies the action that is to be applied to the Malware Protection plan
     * resource. 
     */
    override fun actions(actions: IResolvable) {
      cdkBuilder.actions(actions.let(IResolvable.Companion::unwrap))
    }

    /**
     * Specifies the action that is to be applied to the Malware Protection plan resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-actions)
     * @param actions Specifies the action that is to be applied to the Malware Protection plan
     * resource. 
     */
    override fun actions(actions: CFNActionsProperty) {
      cdkBuilder.actions(actions.let(CFNActionsProperty.Companion::unwrap))
    }

    /**
     * Specifies the action that is to be applied to the Malware Protection plan resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-actions)
     * @param actions Specifies the action that is to be applied to the Malware Protection plan
     * resource. 
     */
    @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
    @JvmName("bd4189b419b8da58656eb1e11e86874cec3ad5b5bcc445a43930d8b49acb4084")
    override fun actions(actions: CFNActionsProperty.Builder.() -> Unit): Unit =
        actions(CFNActionsProperty(actions))

    /**
     * Information about the protected resource.
     *
     * Presently, `S3Bucket` is the only supported protected resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-protectedresource)
     * @param protectedResource Information about the protected resource. 
     */
    override fun protectedResource(protectedResource: IResolvable) {
      cdkBuilder.protectedResource(protectedResource.let(IResolvable.Companion::unwrap))
    }

    /**
     * Information about the protected resource.
     *
     * Presently, `S3Bucket` is the only supported protected resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-protectedresource)
     * @param protectedResource Information about the protected resource. 
     */
    override fun protectedResource(protectedResource: CFNProtectedResourceProperty) {
      cdkBuilder.protectedResource(protectedResource.let(CFNProtectedResourceProperty.Companion::unwrap))
    }

    /**
     * Information about the protected resource.
     *
     * Presently, `S3Bucket` is the only supported protected resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-protectedresource)
     * @param protectedResource Information about the protected resource. 
     */
    @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
    @JvmName("f037aad4bdfa558449e7b1bfc45d20485a525054d49c48d47d45d72f33c5b804")
    override
        fun protectedResource(protectedResource: CFNProtectedResourceProperty.Builder.() -> Unit):
        Unit = protectedResource(CFNProtectedResourceProperty(protectedResource))

    /**
     * Amazon Resource Name (ARN) of the IAM role that includes the permissions required to scan and
     * (optionally) add tags to the associated protected resource.
     *
     * To find the ARN of your IAM role, go to the IAM console, and select the role name for
     * details.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-role)
     * @param role Amazon Resource Name (ARN) of the IAM role that includes the permissions required
     * to scan and (optionally) add tags to the associated protected resource. 
     */
    override fun role(role: String) {
      cdkBuilder.role(role)
    }

    /**
     * The tags to be added to the created Malware Protection plan resource.
     *
     * Each tag consists of a key and an optional value, both of which you need to specify.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-tags)
     * @param tags The tags to be added to the created Malware Protection plan resource. 
     */
    override fun tags(tags: List) {
      cdkBuilder.tags(tags.map(TagItemProperty.Companion::unwrap))
    }

    /**
     * The tags to be added to the created Malware Protection plan resource.
     *
     * Each tag consists of a key and an optional value, both of which you need to specify.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-malwareprotectionplan.html#cfn-guardduty-malwareprotectionplan-tags)
     * @param tags The tags to be added to the created Malware Protection plan resource. 
     */
    override fun tags(vararg tags: TagItemProperty): Unit = tags(tags.toList())

    public fun build(): software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan =
        cdkBuilder.build()
  }

  public companion object {
    public val CFN_RESOURCE_TYPE_NAME: String =
        software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFN_RESOURCE_TYPE_NAME

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

    internal
        fun wrap(cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan):
        CfnMalwareProtectionPlan = CfnMalwareProtectionPlan(cdkObject)

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

  /**
   * Specifies the action that is to be applied to the Malware Protection plan resource.
   *
   * 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.guardduty.*;
   * CFNActionsProperty cFNActionsProperty = CFNActionsProperty.builder()
   * .tagging(CFNTaggingProperty.builder()
   * .status("status")
   * .build())
   * .build();
   * ```
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnactions.html)
   */
  public interface CFNActionsProperty {
    /**
     * Contains information about tagging status of the Malware Protection plan resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnactions.html#cfn-guardduty-malwareprotectionplan-cfnactions-tagging)
     */
    public fun tagging(): Any? = unwrap(this).getTagging()

    /**
     * A builder for [CFNActionsProperty]
     */
    @CdkDslMarker
    public interface Builder {
      /**
       * @param tagging Contains information about tagging status of the Malware Protection plan
       * resource.
       */
      public fun tagging(tagging: IResolvable)

      /**
       * @param tagging Contains information about tagging status of the Malware Protection plan
       * resource.
       */
      public fun tagging(tagging: CFNTaggingProperty)

      /**
       * @param tagging Contains information about tagging status of the Malware Protection plan
       * resource.
       */
      @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
      @JvmName("4c281def9bbb6496c4b813b7d710e2589cf14a4d4e5dda41796adc68a96c61a0")
      public fun tagging(tagging: CFNTaggingProperty.Builder.() -> Unit)
    }

    private class BuilderImpl : Builder {
      private val cdkBuilder:
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNActionsProperty.Builder
          =
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNActionsProperty.builder()

      /**
       * @param tagging Contains information about tagging status of the Malware Protection plan
       * resource.
       */
      override fun tagging(tagging: IResolvable) {
        cdkBuilder.tagging(tagging.let(IResolvable.Companion::unwrap))
      }

      /**
       * @param tagging Contains information about tagging status of the Malware Protection plan
       * resource.
       */
      override fun tagging(tagging: CFNTaggingProperty) {
        cdkBuilder.tagging(tagging.let(CFNTaggingProperty.Companion::unwrap))
      }

      /**
       * @param tagging Contains information about tagging status of the Malware Protection plan
       * resource.
       */
      @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
      @JvmName("4c281def9bbb6496c4b813b7d710e2589cf14a4d4e5dda41796adc68a96c61a0")
      override fun tagging(tagging: CFNTaggingProperty.Builder.() -> Unit): Unit =
          tagging(CFNTaggingProperty(tagging))

      public fun build():
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNActionsProperty =
          cdkBuilder.build()
    }

    private class Wrapper(
      cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNActionsProperty,
    ) : CdkObject(cdkObject),
        CFNActionsProperty {
      /**
       * Contains information about tagging status of the Malware Protection plan resource.
       *
       * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnactions.html#cfn-guardduty-malwareprotectionplan-cfnactions-tagging)
       */
      override fun tagging(): Any? = unwrap(this).getTagging()
    }

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

      internal
          fun wrap(cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNActionsProperty):
          CFNActionsProperty = CdkObjectWrappers.wrap(cdkObject) as? CFNActionsProperty ?:
          Wrapper(cdkObject)

      internal fun unwrap(wrapped: CFNActionsProperty):
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNActionsProperty =
          (wrapped as CdkObject).cdkObject as
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNActionsProperty
    }
  }

  /**
   * Information about the protected resource.
   *
   * Presently, `S3Bucket` is the only supported protected resource.
   *
   * 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.guardduty.*;
   * CFNProtectedResourceProperty cFNProtectedResourceProperty =
   * CFNProtectedResourceProperty.builder()
   * .s3Bucket(S3BucketProperty.builder()
   * .bucketName("bucketName")
   * .objectPrefixes(List.of("objectPrefixes"))
   * .build())
   * .build();
   * ```
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnprotectedresource.html)
   */
  public interface CFNProtectedResourceProperty {
    /**
     * Information about the protected S3 bucket resource.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnprotectedresource.html#cfn-guardduty-malwareprotectionplan-cfnprotectedresource-s3bucket)
     */
    public fun s3Bucket(): Any

    /**
     * A builder for [CFNProtectedResourceProperty]
     */
    @CdkDslMarker
    public interface Builder {
      /**
       * @param s3Bucket Information about the protected S3 bucket resource. 
       */
      public fun s3Bucket(s3Bucket: IResolvable)

      /**
       * @param s3Bucket Information about the protected S3 bucket resource. 
       */
      public fun s3Bucket(s3Bucket: S3BucketProperty)

      /**
       * @param s3Bucket Information about the protected S3 bucket resource. 
       */
      @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
      @JvmName("fdeb8b153499c2946cfb0a83ce4891dc7b0e7aedfc8eaa2d311acc4b22575b69")
      public fun s3Bucket(s3Bucket: S3BucketProperty.Builder.() -> Unit)
    }

    private class BuilderImpl : Builder {
      private val cdkBuilder:
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNProtectedResourceProperty.Builder
          =
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNProtectedResourceProperty.builder()

      /**
       * @param s3Bucket Information about the protected S3 bucket resource. 
       */
      override fun s3Bucket(s3Bucket: IResolvable) {
        cdkBuilder.s3Bucket(s3Bucket.let(IResolvable.Companion::unwrap))
      }

      /**
       * @param s3Bucket Information about the protected S3 bucket resource. 
       */
      override fun s3Bucket(s3Bucket: S3BucketProperty) {
        cdkBuilder.s3Bucket(s3Bucket.let(S3BucketProperty.Companion::unwrap))
      }

      /**
       * @param s3Bucket Information about the protected S3 bucket resource. 
       */
      @kotlin.Suppress("INAPPLICABLE_JVM_NAME")
      @JvmName("fdeb8b153499c2946cfb0a83ce4891dc7b0e7aedfc8eaa2d311acc4b22575b69")
      override fun s3Bucket(s3Bucket: S3BucketProperty.Builder.() -> Unit): Unit =
          s3Bucket(S3BucketProperty(s3Bucket))

      public fun build():
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNProtectedResourceProperty
          = cdkBuilder.build()
    }

    private class Wrapper(
      cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNProtectedResourceProperty,
    ) : CdkObject(cdkObject),
        CFNProtectedResourceProperty {
      /**
       * Information about the protected S3 bucket resource.
       *
       * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnprotectedresource.html#cfn-guardduty-malwareprotectionplan-cfnprotectedresource-s3bucket)
       */
      override fun s3Bucket(): Any = unwrap(this).getS3Bucket()
    }

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

      internal
          fun wrap(cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNProtectedResourceProperty):
          CFNProtectedResourceProperty = CdkObjectWrappers.wrap(cdkObject) as?
          CFNProtectedResourceProperty ?: Wrapper(cdkObject)

      internal fun unwrap(wrapped: CFNProtectedResourceProperty):
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNProtectedResourceProperty
          = (wrapped as CdkObject).cdkObject as
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNProtectedResourceProperty
    }
  }

  /**
   * Information about the status code and status details associated with the status of the Malware
   * Protection plan.
   *
   * 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.guardduty.*;
   * CFNStatusReasonsProperty cFNStatusReasonsProperty = CFNStatusReasonsProperty.builder()
   * .code("code")
   * .message("message")
   * .build();
   * ```
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnstatusreasons.html)
   */
  public interface CFNStatusReasonsProperty {
    /**
     * The status code of the Malware Protection plan.
     *
     * For more information, see [Malware Protection plan resource
     * status](https://docs.aws.amazon.com/guardduty/latest/ug/malware-protection-s3-bucket-status-gdu.html)
     * in the *GuardDuty User Guide* .
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnstatusreasons.html#cfn-guardduty-malwareprotectionplan-cfnstatusreasons-code)
     */
    public fun code(): String? = unwrap(this).getCode()

    /**
     * Issue message that specifies the reason.
     *
     * For information about potential troubleshooting steps, see [Troubleshooting Malware
     * Protection for S3 status
     * issues](https://docs.aws.amazon.com/guardduty/latest/ug/troubleshoot-s3-malware-protection-status-errors.html)
     * in the *GuardDuty User Guide* .
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnstatusreasons.html#cfn-guardduty-malwareprotectionplan-cfnstatusreasons-message)
     */
    public fun message(): String? = unwrap(this).getMessage()

    /**
     * A builder for [CFNStatusReasonsProperty]
     */
    @CdkDslMarker
    public interface Builder {
      /**
       * @param code The status code of the Malware Protection plan.
       * For more information, see [Malware Protection plan resource
       * status](https://docs.aws.amazon.com/guardduty/latest/ug/malware-protection-s3-bucket-status-gdu.html)
       * in the *GuardDuty User Guide* .
       */
      public fun code(code: String)

      /**
       * @param message Issue message that specifies the reason.
       * For information about potential troubleshooting steps, see [Troubleshooting Malware
       * Protection for S3 status
       * issues](https://docs.aws.amazon.com/guardduty/latest/ug/troubleshoot-s3-malware-protection-status-errors.html)
       * in the *GuardDuty User Guide* .
       */
      public fun message(message: String)
    }

    private class BuilderImpl : Builder {
      private val cdkBuilder:
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNStatusReasonsProperty.Builder
          =
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNStatusReasonsProperty.builder()

      /**
       * @param code The status code of the Malware Protection plan.
       * For more information, see [Malware Protection plan resource
       * status](https://docs.aws.amazon.com/guardduty/latest/ug/malware-protection-s3-bucket-status-gdu.html)
       * in the *GuardDuty User Guide* .
       */
      override fun code(code: String) {
        cdkBuilder.code(code)
      }

      /**
       * @param message Issue message that specifies the reason.
       * For information about potential troubleshooting steps, see [Troubleshooting Malware
       * Protection for S3 status
       * issues](https://docs.aws.amazon.com/guardduty/latest/ug/troubleshoot-s3-malware-protection-status-errors.html)
       * in the *GuardDuty User Guide* .
       */
      override fun message(message: String) {
        cdkBuilder.message(message)
      }

      public fun build():
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNStatusReasonsProperty
          = cdkBuilder.build()
    }

    private class Wrapper(
      cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNStatusReasonsProperty,
    ) : CdkObject(cdkObject),
        CFNStatusReasonsProperty {
      /**
       * The status code of the Malware Protection plan.
       *
       * For more information, see [Malware Protection plan resource
       * status](https://docs.aws.amazon.com/guardduty/latest/ug/malware-protection-s3-bucket-status-gdu.html)
       * in the *GuardDuty User Guide* .
       *
       * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnstatusreasons.html#cfn-guardduty-malwareprotectionplan-cfnstatusreasons-code)
       */
      override fun code(): String? = unwrap(this).getCode()

      /**
       * Issue message that specifies the reason.
       *
       * For information about potential troubleshooting steps, see [Troubleshooting Malware
       * Protection for S3 status
       * issues](https://docs.aws.amazon.com/guardduty/latest/ug/troubleshoot-s3-malware-protection-status-errors.html)
       * in the *GuardDuty User Guide* .
       *
       * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfnstatusreasons.html#cfn-guardduty-malwareprotectionplan-cfnstatusreasons-message)
       */
      override fun message(): String? = unwrap(this).getMessage()
    }

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

      internal
          fun wrap(cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNStatusReasonsProperty):
          CFNStatusReasonsProperty = CdkObjectWrappers.wrap(cdkObject) as? CFNStatusReasonsProperty
          ?: Wrapper(cdkObject)

      internal fun unwrap(wrapped: CFNStatusReasonsProperty):
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNStatusReasonsProperty
          = (wrapped as CdkObject).cdkObject as
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNStatusReasonsProperty
    }
  }

  /**
   * Contains information about tagging status of the Malware Protection plan resource.
   *
   * 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.guardduty.*;
   * CFNTaggingProperty cFNTaggingProperty = CFNTaggingProperty.builder()
   * .status("status")
   * .build();
   * ```
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfntagging.html)
   */
  public interface CFNTaggingProperty {
    /**
     * Indicates whether or not you chose GuardDuty to add a predefined tag to the scanned S3
     * object.
     *
     * Potential values include `ENABLED` and `DISABLED` . These values are case-sensitive.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfntagging.html#cfn-guardduty-malwareprotectionplan-cfntagging-status)
     */
    public fun status(): String? = unwrap(this).getStatus()

    /**
     * A builder for [CFNTaggingProperty]
     */
    @CdkDslMarker
    public interface Builder {
      /**
       * @param status Indicates whether or not you chose GuardDuty to add a predefined tag to the
       * scanned S3 object.
       * Potential values include `ENABLED` and `DISABLED` . These values are case-sensitive.
       */
      public fun status(status: String)
    }

    private class BuilderImpl : Builder {
      private val cdkBuilder:
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNTaggingProperty.Builder
          =
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNTaggingProperty.builder()

      /**
       * @param status Indicates whether or not you chose GuardDuty to add a predefined tag to the
       * scanned S3 object.
       * Potential values include `ENABLED` and `DISABLED` . These values are case-sensitive.
       */
      override fun status(status: String) {
        cdkBuilder.status(status)
      }

      public fun build():
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNTaggingProperty =
          cdkBuilder.build()
    }

    private class Wrapper(
      cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNTaggingProperty,
    ) : CdkObject(cdkObject),
        CFNTaggingProperty {
      /**
       * Indicates whether or not you chose GuardDuty to add a predefined tag to the scanned S3
       * object.
       *
       * Potential values include `ENABLED` and `DISABLED` . These values are case-sensitive.
       *
       * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-cfntagging.html#cfn-guardduty-malwareprotectionplan-cfntagging-status)
       */
      override fun status(): String? = unwrap(this).getStatus()
    }

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

      internal
          fun wrap(cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNTaggingProperty):
          CFNTaggingProperty = CdkObjectWrappers.wrap(cdkObject) as? CFNTaggingProperty ?:
          Wrapper(cdkObject)

      internal fun unwrap(wrapped: CFNTaggingProperty):
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNTaggingProperty =
          (wrapped as CdkObject).cdkObject as
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.CFNTaggingProperty
    }
  }

  /**
   * Information about the protected S3 bucket resource.
   *
   * 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.guardduty.*;
   * S3BucketProperty s3BucketProperty = S3BucketProperty.builder()
   * .bucketName("bucketName")
   * .objectPrefixes(List.of("objectPrefixes"))
   * .build();
   * ```
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-s3bucket.html)
   */
  public interface S3BucketProperty {
    /**
     * Name of the S3 bucket.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-s3bucket.html#cfn-guardduty-malwareprotectionplan-s3bucket-bucketname)
     */
    public fun bucketName(): String? = unwrap(this).getBucketName()

    /**
     * Information about the specified object prefixes.
     *
     * An S3 object will be scanned only if it belongs to any of the specified object prefixes.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-s3bucket.html#cfn-guardduty-malwareprotectionplan-s3bucket-objectprefixes)
     */
    public fun objectPrefixes(): List = unwrap(this).getObjectPrefixes() ?: emptyList()

    /**
     * A builder for [S3BucketProperty]
     */
    @CdkDslMarker
    public interface Builder {
      /**
       * @param bucketName Name of the S3 bucket.
       */
      public fun bucketName(bucketName: String)

      /**
       * @param objectPrefixes Information about the specified object prefixes.
       * An S3 object will be scanned only if it belongs to any of the specified object prefixes.
       */
      public fun objectPrefixes(objectPrefixes: List)

      /**
       * @param objectPrefixes Information about the specified object prefixes.
       * An S3 object will be scanned only if it belongs to any of the specified object prefixes.
       */
      public fun objectPrefixes(vararg objectPrefixes: String)
    }

    private class BuilderImpl : Builder {
      private val cdkBuilder:
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.S3BucketProperty.Builder
          =
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.S3BucketProperty.builder()

      /**
       * @param bucketName Name of the S3 bucket.
       */
      override fun bucketName(bucketName: String) {
        cdkBuilder.bucketName(bucketName)
      }

      /**
       * @param objectPrefixes Information about the specified object prefixes.
       * An S3 object will be scanned only if it belongs to any of the specified object prefixes.
       */
      override fun objectPrefixes(objectPrefixes: List) {
        cdkBuilder.objectPrefixes(objectPrefixes)
      }

      /**
       * @param objectPrefixes Information about the specified object prefixes.
       * An S3 object will be scanned only if it belongs to any of the specified object prefixes.
       */
      override fun objectPrefixes(vararg objectPrefixes: String): Unit =
          objectPrefixes(objectPrefixes.toList())

      public fun build():
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.S3BucketProperty =
          cdkBuilder.build()
    }

    private class Wrapper(
      cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.S3BucketProperty,
    ) : CdkObject(cdkObject),
        S3BucketProperty {
      /**
       * Name of the S3 bucket.
       *
       * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-s3bucket.html#cfn-guardduty-malwareprotectionplan-s3bucket-bucketname)
       */
      override fun bucketName(): String? = unwrap(this).getBucketName()

      /**
       * Information about the specified object prefixes.
       *
       * An S3 object will be scanned only if it belongs to any of the specified object prefixes.
       *
       * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-s3bucket.html#cfn-guardduty-malwareprotectionplan-s3bucket-objectprefixes)
       */
      override fun objectPrefixes(): List = unwrap(this).getObjectPrefixes() ?: emptyList()
    }

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

      internal
          fun wrap(cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.S3BucketProperty):
          S3BucketProperty = CdkObjectWrappers.wrap(cdkObject) as? S3BucketProperty ?:
          Wrapper(cdkObject)

      internal fun unwrap(wrapped: S3BucketProperty):
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.S3BucketProperty =
          (wrapped as CdkObject).cdkObject as
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.S3BucketProperty
    }
  }

  /**
   * Contains information about a tag.
   *
   * 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.guardduty.*;
   * TagItemProperty tagItemProperty = TagItemProperty.builder()
   * .key("key")
   * .value("value")
   * .build();
   * ```
   *
   * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-tagitem.html)
   */
  public interface TagItemProperty {
    /**
     * The tag key.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-tagitem.html#cfn-guardduty-malwareprotectionplan-tagitem-key)
     */
    public fun key(): String

    /**
     * The tag value.
     *
     * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-tagitem.html#cfn-guardduty-malwareprotectionplan-tagitem-value)
     */
    public fun `value`(): String

    /**
     * A builder for [TagItemProperty]
     */
    @CdkDslMarker
    public interface Builder {
      /**
       * @param key The tag key. 
       */
      public fun key(key: String)

      /**
       * @param value The tag value. 
       */
      public fun `value`(`value`: String)
    }

    private class BuilderImpl : Builder {
      private val cdkBuilder:
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.TagItemProperty.Builder
          =
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.TagItemProperty.builder()

      /**
       * @param key The tag key. 
       */
      override fun key(key: String) {
        cdkBuilder.key(key)
      }

      /**
       * @param value The tag value. 
       */
      override fun `value`(`value`: String) {
        cdkBuilder.`value`(`value`)
      }

      public fun build():
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.TagItemProperty =
          cdkBuilder.build()
    }

    private class Wrapper(
      cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.TagItemProperty,
    ) : CdkObject(cdkObject),
        TagItemProperty {
      /**
       * The tag key.
       *
       * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-tagitem.html#cfn-guardduty-malwareprotectionplan-tagitem-key)
       */
      override fun key(): String = unwrap(this).getKey()

      /**
       * The tag value.
       *
       * [Documentation](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-malwareprotectionplan-tagitem.html#cfn-guardduty-malwareprotectionplan-tagitem-value)
       */
      override fun `value`(): String = unwrap(this).getValue()
    }

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

      internal
          fun wrap(cdkObject: software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.TagItemProperty):
          TagItemProperty = CdkObjectWrappers.wrap(cdkObject) as? TagItemProperty ?:
          Wrapper(cdkObject)

      internal fun unwrap(wrapped: TagItemProperty):
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.TagItemProperty =
          (wrapped as CdkObject).cdkObject as
          software.amazon.awscdk.services.guardduty.CfnMalwareProtectionPlan.TagItemProperty
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy