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

zio.aws.workmail.model.ResetPasswordRequest.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.5
Show newest version
package zio.aws.workmail.model
import zio.aws.workmail.model.primitives.{
  Password,
  WorkMailIdentifier,
  OrganizationId
}
import zio.ZIO
import zio.aws.core.BuilderHelper
import scala.jdk.CollectionConverters._
final case class ResetPasswordRequest(
    organizationId: OrganizationId,
    userId: WorkMailIdentifier,
    password: Password
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.workmail.model.ResetPasswordRequest = {
    import ResetPasswordRequest.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.workmail.model.ResetPasswordRequest
      .builder()
      .organizationId(OrganizationId.unwrap(organizationId): java.lang.String)
      .userId(WorkMailIdentifier.unwrap(userId): java.lang.String)
      .password(Password.unwrap(password): java.lang.String)
      .build()
  }
  def asReadOnly: zio.aws.workmail.model.ResetPasswordRequest.ReadOnly =
    zio.aws.workmail.model.ResetPasswordRequest.wrap(buildAwsValue())
}
object ResetPasswordRequest {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.workmail.model.ResetPasswordRequest
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.workmail.model.ResetPasswordRequest =
      zio.aws.workmail.model
        .ResetPasswordRequest(organizationId, userId, password)
    def organizationId: OrganizationId
    def userId: WorkMailIdentifier
    def password: Password
    def getOrganizationId: ZIO[Any, Nothing, OrganizationId] =
      ZIO.succeed(organizationId)
    def getUserId: ZIO[Any, Nothing, WorkMailIdentifier] = ZIO.succeed(userId)
    def getPassword: ZIO[Any, Nothing, Password] = ZIO.succeed(password)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.workmail.model.ResetPasswordRequest
  ) extends zio.aws.workmail.model.ResetPasswordRequest.ReadOnly {
    override val organizationId: OrganizationId =
      zio.aws.workmail.model.primitives.OrganizationId(impl.organizationId())
    override val userId: WorkMailIdentifier =
      zio.aws.workmail.model.primitives.WorkMailIdentifier(impl.userId())
    override val password: Password =
      zio.aws.workmail.model.primitives.Password(impl.password())
  }
  def wrap(
      impl: software.amazon.awssdk.services.workmail.model.ResetPasswordRequest
  ): zio.aws.workmail.model.ResetPasswordRequest.ReadOnly = new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy