#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DockerImage {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, tag = "4")]
pub image_size_bytes: i64,
#[prost(message, optional, tag = "5")]
pub upload_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "6")]
pub media_type: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub build_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDockerImagesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDockerImagesResponse {
#[prost(message, repeated, tag = "1")]
pub docker_images: ::prost::alloc::vec::Vec<DockerImage>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Repository {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "repository::Format", tag = "2")]
pub format: i32,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "4")]
pub labels:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "8")]
pub kms_key_name: ::prost::alloc::string::String,
}
pub mod repository {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Format {
Unspecified = 0,
Docker = 1,
Maven = 2,
Npm = 3,
Apt = 5,
Yum = 6,
Python = 8,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRepositoriesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRepositoriesResponse {
#[prost(message, repeated, tag = "1")]
pub repositories: ::prost::alloc::vec::Vec<Repository>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRepositoryRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod artifact_registry_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " The Artifact Registry API service."]
#[doc = ""]
#[doc = " Artifact Registry is an artifact management system for storing artifacts"]
#[doc = " from different package management systems."]
#[doc = ""]
#[doc = " The resources managed by this API are:"]
#[doc = ""]
#[doc = " * Repositories, which group packages and their data."]
#[doc = " * Packages, which group versions and their tags."]
#[doc = " * Versions, which are specific forms of a package."]
#[doc = " * Tags, which represent alternative names for versions."]
#[doc = " * Files, which contain content and are optionally associated with a Package"]
#[doc = " or Version."]
#[derive(Debug, Clone)]
pub struct ArtifactRegistryClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ArtifactRegistryClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ArtifactRegistryClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ArtifactRegistryClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Lists docker images."]
pub async fn list_docker_images(
&mut self,
request: impl tonic::IntoRequest<super::ListDockerImagesRequest>,
) -> Result<tonic::Response<super::ListDockerImagesResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.artifactregistry.v1.ArtifactRegistry/ListDockerImages",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists repositories."]
pub async fn list_repositories(
&mut self,
request: impl tonic::IntoRequest<super::ListRepositoriesRequest>,
) -> Result<tonic::Response<super::ListRepositoriesResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.artifactregistry.v1.ArtifactRegistry/ListRepositories",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a repository."]
pub async fn get_repository(
&mut self,
request: impl tonic::IntoRequest<super::GetRepositoryRequest>,
) -> Result<tonic::Response<super::Repository>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.devtools.artifactregistry.v1.ArtifactRegistry/GetRepository",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}