![JAR search and dependency download from the Maven repository](/logo.png)
zio.aws.waf.model.IPSetDescriptor.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-waf_2.13 Show documentation
Show all versions of zio-aws-waf_2.13 Show documentation
Low-level AWS wrapper for ZIO
The newest version!
package zio.aws.waf.model
import zio.ZIO
import zio.aws.core.BuilderHelper
import zio.aws.waf.model.primitives.IPSetDescriptorValue
import scala.jdk.CollectionConverters._
final case class IPSetDescriptor(
`type`: zio.aws.waf.model.IPSetDescriptorType,
value: IPSetDescriptorValue
) {
def buildAwsValue()
: software.amazon.awssdk.services.waf.model.IPSetDescriptor = {
import IPSetDescriptor.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.waf.model.IPSetDescriptor
.builder()
.`type`(`type`.unwrap)
.value(IPSetDescriptorValue.unwrap(value): java.lang.String)
.build()
}
def asReadOnly: zio.aws.waf.model.IPSetDescriptor.ReadOnly =
zio.aws.waf.model.IPSetDescriptor.wrap(buildAwsValue())
}
object IPSetDescriptor {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.waf.model.IPSetDescriptor
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.waf.model.IPSetDescriptor =
zio.aws.waf.model.IPSetDescriptor(`type`, value)
def `type`: zio.aws.waf.model.IPSetDescriptorType
def value: IPSetDescriptorValue
def getType: ZIO[Any, Nothing, zio.aws.waf.model.IPSetDescriptorType] =
ZIO.succeed(`type`)
def getValue: ZIO[Any, Nothing, IPSetDescriptorValue] = ZIO.succeed(value)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.waf.model.IPSetDescriptor
) extends zio.aws.waf.model.IPSetDescriptor.ReadOnly {
override val `type`: zio.aws.waf.model.IPSetDescriptorType =
zio.aws.waf.model.IPSetDescriptorType.wrap(impl.`type`())
override val value: IPSetDescriptorValue =
zio.aws.waf.model.primitives.IPSetDescriptorValue(impl.value())
}
def wrap(
impl: software.amazon.awssdk.services.waf.model.IPSetDescriptor
): zio.aws.waf.model.IPSetDescriptor.ReadOnly = new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy