zio.aws.nimble.model.LaunchProfileMembership.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-nimble_3 Show documentation
Show all versions of zio-aws-nimble_3 Show documentation
Low-level AWS wrapper for ZIO
package zio.aws.nimble.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class LaunchProfileMembership(
identityStoreId: Optional[String] = Optional.Absent,
persona: Optional[zio.aws.nimble.model.LaunchProfilePersona] =
Optional.Absent,
principalId: Optional[String] = Optional.Absent,
sid: Optional[String] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.nimble.model.LaunchProfileMembership = {
import LaunchProfileMembership.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.nimble.model.LaunchProfileMembership
.builder()
.optionallyWith(identityStoreId.map(value => value: java.lang.String))(
_.identityStoreId
)
.optionallyWith(persona.map(value => value.unwrap))(_.persona)
.optionallyWith(principalId.map(value => value: java.lang.String))(
_.principalId
)
.optionallyWith(sid.map(value => value: java.lang.String))(_.sid)
.build()
}
def asReadOnly: zio.aws.nimble.model.LaunchProfileMembership.ReadOnly =
zio.aws.nimble.model.LaunchProfileMembership.wrap(buildAwsValue())
}
object LaunchProfileMembership {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.nimble.model.LaunchProfileMembership
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.nimble.model.LaunchProfileMembership =
zio.aws.nimble.model.LaunchProfileMembership(
identityStoreId.map(value => value),
persona.map(value => value),
principalId.map(value => value),
sid.map(value => value)
)
def identityStoreId: Optional[String]
def persona: Optional[zio.aws.nimble.model.LaunchProfilePersona]
def principalId: Optional[String]
def sid: Optional[String]
def getIdentityStoreId: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("identityStoreId", identityStoreId)
def getPersona
: ZIO[Any, AwsError, zio.aws.nimble.model.LaunchProfilePersona] =
AwsError.unwrapOptionField("persona", persona)
def getPrincipalId: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("principalId", principalId)
def getSid: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("sid", sid)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.nimble.model.LaunchProfileMembership
) extends zio.aws.nimble.model.LaunchProfileMembership.ReadOnly {
override val identityStoreId: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.identityStoreId())
.map(value => value: String)
override val persona: Optional[zio.aws.nimble.model.LaunchProfilePersona] =
zio.aws.core.internal
.optionalFromNullable(impl.persona())
.map(value => zio.aws.nimble.model.LaunchProfilePersona.wrap(value))
override val principalId: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.principalId())
.map(value => value: String)
override val sid: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.sid())
.map(value => value: String)
}
def wrap(
impl: software.amazon.awssdk.services.nimble.model.LaunchProfileMembership
): zio.aws.nimble.model.LaunchProfileMembership.ReadOnly = new Wrapper(impl)
}