scala.googleapis.storage.BucketIamConfigurationBucketPolicyOnly.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import io.circe._
import io.circe.syntax._
final case class BucketIamConfigurationBucketPolicyOnly(
/** If set, access is controlled only by bucket-level or above IAM policies.
*/
enabled: Option[Boolean] = None,
/** The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable.
*/
lockedTime: Option[String] = None,
)
object BucketIamConfigurationBucketPolicyOnly {
implicit val encoder: Encoder[
BucketIamConfigurationBucketPolicyOnly
] = Encoder.instance { x =>
Json.obj("enabled" := x.enabled, "lockedTime" := x.lockedTime)
}
implicit val decoder: Decoder[
BucketIamConfigurationBucketPolicyOnly
] = Decoder.instance { c =>
for {
v0 <- c.get[Option[Boolean]]("enabled")
v1 <- c.get[Option[String]]("lockedTime")
} yield BucketIamConfigurationBucketPolicyOnly(v0, v1)
}
}