scala.googleapis.storage.ProjectsServiceAccountClient.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import cats.effect.Concurrent
import org.http4s._
import org.http4s.implicits._
import org.http4s.client.Client
class ProjectsServiceAccountClient[F[_]: Concurrent](client: Client[F])
extends AbstractClient[F](client) {
val baseUri = uri"https://storage.googleapis.com/storage/v1"
def get(
/** Project ID
*/
projectId: String,
query: ProjectsServiceAccountClient.GetParams = ProjectsServiceAccountClient.GetParams(),
): F[ServiceAccount] = expectJson[ServiceAccount](
request(
method = Method.GET,
uri = (baseUri / "projects" / s"${projectId}" / "serviceAccount")
.copy(query = Query("userProject" -> query.userProject)),
)
)
}
object ProjectsServiceAccountClient {
final case class GetParams(
/** The project to be billed for this request.
*/
userProject: Option[String] = None
)
}