scala.googleapis.storage.TestIamPermissionsResponse.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import io.circe._
import io.circe.syntax._
final case class TestIamPermissionsResponse(
/** The kind of item this is.
*/
kind: Option[String] = None,
/** The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows:
* - storage.buckets.delete — Delete bucket.
* - storage.buckets.get — Read bucket metadata.
* - storage.buckets.getIamPolicy — Read bucket IAM policy.
* - storage.buckets.create — Create bucket.
* - storage.buckets.list — List buckets.
* - storage.buckets.setIamPolicy — Update bucket IAM policy.
* - storage.buckets.update — Update bucket metadata.
* - storage.objects.delete — Delete object.
* - storage.objects.get — Read object data and metadata.
* - storage.objects.getIamPolicy — Read object IAM policy.
* - storage.objects.create — Create object.
* - storage.objects.list — List objects.
* - storage.objects.setIamPolicy — Update object IAM policy.
* - storage.objects.update — Update object metadata.
* - storage.managedFolders.delete — Delete managed folder.
* - storage.managedFolders.get — Read managed folder metadata.
* - storage.managedFolders.getIamPolicy — Read managed folder IAM policy.
* - storage.managedFolders.create — Create managed folder.
* - storage.managedFolders.list — List managed folders.
* - storage.managedFolders.setIamPolicy — Update managed folder IAM policy.
*/
permissions: Option[List[String]] = None,
)
object TestIamPermissionsResponse {
implicit val encoder: Encoder[
TestIamPermissionsResponse
] = Encoder.instance { x =>
Json.obj("kind" := x.kind, "permissions" := x.permissions)
}
implicit val decoder: Decoder[
TestIamPermissionsResponse
] = Decoder.instance { c =>
for {
v0 <- c.get[Option[String]]("kind")
v1 <- c.get[Option[List[String]]]("permissions")
} yield TestIamPermissionsResponse(v0, v1)
}
}