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

io.github.vigoo.zioaws.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest.scala Maven / Gradle / Ivy

package io.github.vigoo.zioaws.route53resolver.model
import java.lang.Integer
import zio.ZIO
import io.github.vigoo.zioaws.route53resolver.model.primitives.{
  Name,
  Priority,
  ResourceId
}
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters._
final case class UpdateFirewallRuleGroupAssociationRequest(
    firewallRuleGroupAssociationId: ResourceId,
    priority: Option[Priority] = None,
    mutationProtection: Option[
      io.github.vigoo.zioaws.route53resolver.model.MutationProtectionStatus
    ] = None,
    name: Option[Name] = None
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest = {
    import UpdateFirewallRuleGroupAssociationRequest.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest
      .builder()
      .firewallRuleGroupAssociationId(
        firewallRuleGroupAssociationId: java.lang.String
      )
      .optionallyWith(priority.map(value => value: Integer))(_.priority)
      .optionallyWith(mutationProtection.map(value => value.unwrap))(
        _.mutationProtection
      )
      .optionallyWith(name.map(value => value: java.lang.String))(_.name)
      .build()
  }
  def asReadOnly
      : io.github.vigoo.zioaws.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest.ReadOnly =
    io.github.vigoo.zioaws.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest
      .wrap(buildAwsValue())
}
object UpdateFirewallRuleGroupAssociationRequest {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest
  ] = BuilderHelper.apply
  trait ReadOnly {
    def editable
        : io.github.vigoo.zioaws.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest =
      io.github.vigoo.zioaws.route53resolver.model
        .UpdateFirewallRuleGroupAssociationRequest(
          firewallRuleGroupAssociationIdValue,
          priorityValue.map(value => value),
          mutationProtectionValue.map(value => value),
          nameValue.map(value => value)
        )
    def firewallRuleGroupAssociationIdValue: ResourceId
    def priorityValue: Option[Priority]
    def mutationProtectionValue: Option[
      io.github.vigoo.zioaws.route53resolver.model.MutationProtectionStatus
    ]
    def nameValue: Option[Name]
    def firewallRuleGroupAssociationId: ZIO[Any, Nothing, ResourceId] =
      ZIO.succeed(firewallRuleGroupAssociationIdValue)
    def priority: ZIO[Any, AwsError, Priority] =
      AwsError.unwrapOptionField("priority", priorityValue)
    def mutationProtection: ZIO[
      Any,
      AwsError,
      io.github.vigoo.zioaws.route53resolver.model.MutationProtectionStatus
    ] =
      AwsError.unwrapOptionField("mutationProtection", mutationProtectionValue)
    def name: ZIO[Any, AwsError, Name] =
      AwsError.unwrapOptionField("name", nameValue)
  }
  private class Wrapper(
      impl: software.amazon.awssdk.services.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest
  ) extends io.github.vigoo.zioaws.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest.ReadOnly {
    override def firewallRuleGroupAssociationIdValue: ResourceId =
      impl.firewallRuleGroupAssociationId(): ResourceId
    override def priorityValue: Option[Priority] =
      scala.Option(impl.priority()).map(value => value: Priority)
    override def mutationProtectionValue: Option[
      io.github.vigoo.zioaws.route53resolver.model.MutationProtectionStatus
    ] = scala
      .Option(impl.mutationProtection())
      .map(value =>
        io.github.vigoo.zioaws.route53resolver.model.MutationProtectionStatus
          .wrap(value)
      )
    override def nameValue: Option[Name] =
      scala.Option(impl.name()).map(value => value: Name)
  }
  def wrap(
      impl: software.amazon.awssdk.services.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest
  ): io.github.vigoo.zioaws.route53resolver.model.UpdateFirewallRuleGroupAssociationRequest.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy