azure_svc_containerregistry 0.9.0

generated REST API bindings
Documentation
#![allow(unused_mut)]
#![allow(unused_variables)]
#![allow(unused_imports)]
#![allow(clippy::redundant_clone)]
pub mod models;
#[derive(Clone)]
pub struct Client {
    endpoint: String,
    credential: std::sync::Arc<dyn azure_core::auth::TokenCredential>,
    scopes: Vec<String>,
    pipeline: azure_core::Pipeline,
}
#[derive(Clone)]
pub struct ClientBuilder {
    credential: std::sync::Arc<dyn azure_core::auth::TokenCredential>,
    endpoint: Option<String>,
    scopes: Option<Vec<String>>,
    options: azure_core::ClientOptions,
}
pub const DEFAULT_ENDPOINT: &str = azure_core::resource_manager_endpoint::AZURE_PUBLIC_CLOUD;
impl ClientBuilder {
    #[doc = "Create a new instance of `ClientBuilder`."]
    #[must_use]
    pub fn new(credential: std::sync::Arc<dyn azure_core::auth::TokenCredential>) -> Self {
        Self {
            credential,
            endpoint: None,
            scopes: None,
            options: azure_core::ClientOptions::default(),
        }
    }
    #[doc = "Set the endpoint."]
    #[must_use]
    pub fn endpoint(mut self, endpoint: impl Into<String>) -> Self {
        self.endpoint = Some(endpoint.into());
        self
    }
    #[doc = "Set the scopes."]
    #[must_use]
    pub fn scopes(mut self, scopes: &[&str]) -> Self {
        self.scopes = Some(scopes.iter().map(|scope| (*scope).to_owned()).collect());
        self
    }
    #[doc = "Set the retry options."]
    #[must_use]
    pub fn retry(mut self, retry: impl Into<azure_core::RetryOptions>) -> Self {
        self.options = self.options.retry(retry);
        self
    }
    #[doc = "Set the transport options."]
    #[must_use]
    pub fn transport(mut self, transport: impl Into<azure_core::TransportOptions>) -> Self {
        self.options = self.options.transport(transport);
        self
    }
    #[doc = "Convert the builder into a `Client` instance."]
    #[must_use]
    pub fn build(self) -> Client {
        let endpoint = self.endpoint.unwrap_or_else(|| DEFAULT_ENDPOINT.to_owned());
        let scopes = self.scopes.unwrap_or_else(|| vec![format!("{}/", endpoint)]);
        Client::new(endpoint, self.credential, scopes, self.options)
    }
}
impl Client {
    pub(crate) fn endpoint(&self) -> &str {
        self.endpoint.as_str()
    }
    pub(crate) fn token_credential(&self) -> &dyn azure_core::auth::TokenCredential {
        self.credential.as_ref()
    }
    pub(crate) fn scopes(&self) -> Vec<&str> {
        self.scopes.iter().map(String::as_str).collect()
    }
    pub(crate) async fn send(&self, request: &mut azure_core::Request) -> azure_core::Result<azure_core::Response> {
        let mut context = azure_core::Context::default();
        self.pipeline.send(&mut context, request).await
    }
    #[doc = "Create a new `ClientBuilder`."]
    #[must_use]
    pub fn builder(credential: std::sync::Arc<dyn azure_core::auth::TokenCredential>) -> ClientBuilder {
        ClientBuilder::new(credential)
    }
    #[doc = "Create a new `Client`."]
    #[must_use]
    pub fn new(
        endpoint: impl Into<String>,
        credential: std::sync::Arc<dyn azure_core::auth::TokenCredential>,
        scopes: Vec<String>,
        options: azure_core::ClientOptions,
    ) -> Self {
        let endpoint = endpoint.into();
        let pipeline = azure_core::Pipeline::new(
            option_env!("CARGO_PKG_NAME"),
            option_env!("CARGO_PKG_VERSION"),
            options,
            Vec::new(),
            Vec::new(),
        );
        Self {
            endpoint,
            credential,
            scopes,
            pipeline,
        }
    }
}
impl Client {
    #[doc = "Tells whether this Docker Registry instance supports Docker Registry HTTP API v2"]
    pub fn get_docker_registry_v2_support(&self) -> get_docker_registry_v2_support::RequestBuilder {
        get_docker_registry_v2_support::RequestBuilder { client: self.clone() }
    }
    #[doc = "Fetch the tags under the repository identified by name"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    pub fn get_tag_list(&self, name: impl Into<String>) -> get_tag_list::RequestBuilder {
        get_tag_list::RequestBuilder {
            client: self.clone(),
            name: name.into(),
        }
    }
    #[doc = "Pulls the image manifest file associated with the specified name and reference. Reference may be a tag or a digest"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    #[doc = "* `reference`: A tag or a digest, pointing to a specific image"]
    pub fn get_manifest(&self, name: impl Into<String>, reference: impl Into<String>) -> get_manifest::RequestBuilder {
        get_manifest::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            reference: reference.into(),
            accept: None,
        }
    }
    #[doc = "Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest."]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    #[doc = "* `reference`: A tag or a digest, pointing to a specific image"]
    #[doc = "* `payload`: Manifest body, can take v1 or v2 values depending on accept header"]
    pub fn create_manifest(
        &self,
        name: impl Into<String>,
        reference: impl Into<String>,
        payload: impl Into<models::Manifest>,
    ) -> create_manifest::RequestBuilder {
        create_manifest::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            reference: reference.into(),
            payload: payload.into(),
        }
    }
    #[doc = "Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`."]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    #[doc = "* `reference`: A tag or a digest, pointing to a specific image"]
    pub fn delete_manifest(&self, name: impl Into<String>, reference: impl Into<String>) -> delete_manifest::RequestBuilder {
        delete_manifest::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            reference: reference.into(),
        }
    }
    #[doc = "List repositories"]
    pub fn get_repositories(&self) -> get_repositories::RequestBuilder {
        get_repositories::RequestBuilder {
            client: self.clone(),
            last: None,
            n: None,
        }
    }
    #[doc = "List repositories"]
    pub fn get_acr_repositories(&self) -> get_acr_repositories::RequestBuilder {
        get_acr_repositories::RequestBuilder {
            client: self.clone(),
            last: None,
            n: None,
        }
    }
    #[doc = "Get repository attributes"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    pub fn get_acr_repository_attributes(&self, name: impl Into<String>) -> get_acr_repository_attributes::RequestBuilder {
        get_acr_repository_attributes::RequestBuilder {
            client: self.clone(),
            name: name.into(),
        }
    }
    #[doc = "Update the attribute identified by `name` where `reference` is the name of the repository."]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    pub fn update_acr_repository_attributes(&self, name: impl Into<String>) -> update_acr_repository_attributes::RequestBuilder {
        update_acr_repository_attributes::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            value: None,
        }
    }
    #[doc = "Delete the repository identified by `name`"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    pub fn delete_acr_repository(&self, name: impl Into<String>) -> delete_acr_repository::RequestBuilder {
        delete_acr_repository::RequestBuilder {
            client: self.clone(),
            name: name.into(),
        }
    }
    #[doc = "List tags of a repository"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    pub fn get_acr_tags(&self, name: impl Into<String>) -> get_acr_tags::RequestBuilder {
        get_acr_tags::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            last: None,
            n: None,
            orderby: None,
            digest: None,
        }
    }
    #[doc = "Get tag attributes by tag"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    #[doc = "* `reference`: Tag or digest of the target manifest"]
    pub fn get_acr_tag_attributes(&self, name: impl Into<String>, reference: impl Into<String>) -> get_acr_tag_attributes::RequestBuilder {
        get_acr_tag_attributes::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            reference: reference.into(),
        }
    }
    #[doc = "Update tag attributes"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    #[doc = "* `reference`: Tag or digest of the target manifest"]
    pub fn update_acr_tag_attributes(
        &self,
        name: impl Into<String>,
        reference: impl Into<String>,
    ) -> update_acr_tag_attributes::RequestBuilder {
        update_acr_tag_attributes::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            reference: reference.into(),
            value: None,
        }
    }
    #[doc = "Delete tag"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    #[doc = "* `reference`: Tag or digest of the target manifest"]
    pub fn delete_acr_tag(&self, name: impl Into<String>, reference: impl Into<String>) -> delete_acr_tag::RequestBuilder {
        delete_acr_tag::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            reference: reference.into(),
        }
    }
    #[doc = "List manifests of a repository"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    pub fn get_acr_manifests(&self, name: impl Into<String>) -> get_acr_manifests::RequestBuilder {
        get_acr_manifests::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            last: None,
            n: None,
            orderby: None,
        }
    }
    #[doc = "Get manifest attributes"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    #[doc = "* `reference`: A tag or a digest, pointing to a specific image"]
    pub fn get_acr_manifest_attributes(
        &self,
        name: impl Into<String>,
        reference: impl Into<String>,
    ) -> get_acr_manifest_attributes::RequestBuilder {
        get_acr_manifest_attributes::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            reference: reference.into(),
        }
    }
    #[doc = "Update attributes of a manifest"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `name`: Name of the image (including the namespace)"]
    #[doc = "* `reference`: A tag or a digest, pointing to a specific image"]
    pub fn update_acr_manifest_attributes(
        &self,
        name: impl Into<String>,
        reference: impl Into<String>,
    ) -> update_acr_manifest_attributes::RequestBuilder {
        update_acr_manifest_attributes::RequestBuilder {
            client: self.clone(),
            name: name.into(),
            reference: reference.into(),
            value: None,
        }
    }
    #[doc = "Exchange AAD tokens for an ACR refresh Token"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `grant_type`: Can take a value of access_token_refresh_token, or access_token, or refresh_token"]
    #[doc = "* `service`: Indicates the name of your Azure container registry."]
    pub fn get_acr_refresh_token_from_exchange(
        &self,
        grant_type: impl Into<String>,
        service: impl Into<String>,
    ) -> get_acr_refresh_token_from_exchange::RequestBuilder {
        get_acr_refresh_token_from_exchange::RequestBuilder {
            client: self.clone(),
            grant_type: grant_type.into(),
            service: service.into(),
            tenant: None,
            refresh_token: None,
            access_token: None,
        }
    }
    #[doc = "Exchange Username, Password and Scope an ACR Access Token"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `service`: Indicates the name of your Azure container registry."]
    #[doc = "* `scope`: Expected to be a valid scope, and can be specified more than once for multiple scope requests. You can obtain this from the Www-Authenticate response header from the challenge."]
    pub fn get_acr_access_token_from_login(
        &self,
        service: impl Into<String>,
        scope: impl Into<String>,
    ) -> get_acr_access_token_from_login::RequestBuilder {
        get_acr_access_token_from_login::RequestBuilder {
            client: self.clone(),
            service: service.into(),
            scope: scope.into(),
        }
    }
    #[doc = "Exchange ACR Refresh token for an ACR Access Token"]
    #[doc = ""]
    #[doc = "Arguments:"]
    #[doc = "* `grant_type`: Grant type is expected to be refresh_token"]
    #[doc = "* `service`: Indicates the name of your Azure container registry."]
    #[doc = "* `scope`: Which is expected to be a valid scope, and can be specified more than once for multiple scope requests. You obtained this from the Www-Authenticate response header from the challenge."]
    #[doc = "* `refresh_token`: Must be a valid ACR refresh token"]
    pub fn get_acr_access_token(
        &self,
        grant_type: impl Into<String>,
        service: impl Into<String>,
        scope: impl Into<String>,
        refresh_token: impl Into<String>,
    ) -> get_acr_access_token::RequestBuilder {
        get_acr_access_token::RequestBuilder {
            client: self.clone(),
            grant_type: grant_type.into(),
            service: service.into(),
            scope: scope.into(),
            refresh_token: refresh_token.into(),
        }
    }
}
pub mod get_docker_registry_v2_support {
    use super::models;
    pub struct Response(azure_core::Response);
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/v2/", this.client.endpoint(),))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
    }
}
pub mod get_tag_list {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::RepositoryTags> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::RepositoryTags = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
        pub fn headers(&self) -> Headers {
            Headers(self.0.headers())
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    pub struct Headers<'a>(&'a azure_core::headers::Headers);
    impl<'a> Headers<'a> {
        #[doc = "next paginated result"]
        pub fn link(&self) -> azure_core::Result<&str> {
            self.0.get_str(&azure_core::headers::HeaderName::from_static("link"))
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/v2/{}/tags/list", this.client.endpoint(), &this.name))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::RepositoryTags>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod get_manifest {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::Manifest> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::Manifest = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) reference: String,
        pub(crate) accept: Option<String>,
    }
    impl RequestBuilder {
        #[doc = "Accept header string delimited by comma. For example, application/vnd.docker.distribution.manifest.v2+json"]
        pub fn accept(mut self, accept: impl Into<String>) -> Self {
            self.accept = Some(accept.into());
            self
        }
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!(
                        "{}/v2/{}/manifests/{}",
                        this.client.endpoint(),
                        &this.name,
                        &this.reference
                    ))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    if let Some(accept) = &this.accept {
                        req.insert_header("accept", accept);
                    }
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::Manifest>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod create_manifest {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<serde_json::Value> {
            let bytes = self.0.into_body().collect().await?;
            let body: serde_json::Value = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
        pub fn headers(&self) -> Headers {
            Headers(self.0.headers())
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    pub struct Headers<'a>(&'a azure_core::headers::Headers);
    impl<'a> Headers<'a> {
        #[doc = "Identifies the docker upload uuid for the current request."]
        pub fn docker_content_digest(&self) -> azure_core::Result<&str> {
            self.0
                .get_str(&azure_core::headers::HeaderName::from_static("docker-content-digest"))
        }
        #[doc = "The canonical location url of the uploaded manifest."]
        pub fn location(&self) -> azure_core::Result<&str> {
            self.0.get_str(&azure_core::headers::HeaderName::from_static("location"))
        }
        #[doc = "The canonical location url of the uploaded manifest."]
        pub fn content_length(&self) -> azure_core::Result<i32> {
            self.0.get_as(&azure_core::headers::HeaderName::from_static("content-length"))
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) reference: String,
        pub(crate) payload: models::Manifest,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!(
                        "{}/v2/{}/manifests/{}",
                        this.client.endpoint(),
                        &this.name,
                        &this.reference
                    ))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Put);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    req.insert_header("content-type", "application/vnd.docker.distribution.manifest.v2+json");
                    let req_body = azure_core::to_json(&this.payload)?;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<serde_json::Value>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod delete_manifest {
    use super::models;
    pub struct Response(azure_core::Response);
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) reference: String,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!(
                        "{}/v2/{}/manifests/{}",
                        this.client.endpoint(),
                        &this.name,
                        &this.reference
                    ))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
    }
}
pub mod get_repositories {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::Repositories> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::Repositories = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
        pub fn headers(&self) -> Headers {
            Headers(self.0.headers())
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    pub struct Headers<'a>(&'a azure_core::headers::Headers);
    impl<'a> Headers<'a> {
        #[doc = "next paginated result"]
        pub fn link(&self) -> azure_core::Result<&str> {
            self.0.get_str(&azure_core::headers::HeaderName::from_static("link"))
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) last: Option<String>,
        pub(crate) n: Option<i64>,
    }
    impl RequestBuilder {
        #[doc = "Query parameter for the last item in previous query. Result set will include values lexically after last."]
        pub fn last(mut self, last: impl Into<String>) -> Self {
            self.last = Some(last.into());
            self
        }
        #[doc = "query parameter for max number of items"]
        pub fn n(mut self, n: i64) -> Self {
            self.n = Some(n);
            self
        }
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/v2/_catalog", this.client.endpoint(),))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    if let Some(last) = &this.last {
                        req.url_mut().query_pairs_mut().append_pair("last", last);
                    }
                    if let Some(n) = &this.n {
                        req.url_mut().query_pairs_mut().append_pair("n", &n.to_string());
                    }
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::Repositories>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod get_acr_repositories {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::Repositories> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::Repositories = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) last: Option<String>,
        pub(crate) n: Option<i64>,
    }
    impl RequestBuilder {
        #[doc = "Query parameter for the last item in previous query. Result set will include values lexically after last."]
        pub fn last(mut self, last: impl Into<String>) -> Self {
            self.last = Some(last.into());
            self
        }
        #[doc = "query parameter for max number of items"]
        pub fn n(mut self, n: i64) -> Self {
            self.n = Some(n);
            self
        }
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/acr/v1/_catalog", this.client.endpoint(),))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    if let Some(last) = &this.last {
                        req.url_mut().query_pairs_mut().append_pair("last", last);
                    }
                    if let Some(n) = &this.n {
                        req.url_mut().query_pairs_mut().append_pair("n", &n.to_string());
                    }
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::Repositories>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod get_acr_repository_attributes {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::RepositoryAttributes> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::RepositoryAttributes = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/acr/v1/{}", this.client.endpoint(), &this.name))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::RepositoryAttributes>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod update_acr_repository_attributes {
    use super::models;
    pub struct Response(azure_core::Response);
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) value: Option<models::ChangeableAttributes>,
    }
    impl RequestBuilder {
        #[doc = "Repository attribute value"]
        pub fn value(mut self, value: impl Into<models::ChangeableAttributes>) -> Self {
            self.value = Some(value.into());
            self
        }
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/acr/v1/{}", this.client.endpoint(), &this.name))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = if let Some(value) = &this.value {
                        req.insert_header("content-type", "application/json");
                        azure_core::to_json(value)?
                    } else {
                        azure_core::EMPTY_BODY
                    };
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
    }
}
pub mod delete_acr_repository {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::DeletedRepository> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::DeletedRepository = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/acr/v1/{}", this.client.endpoint(), &this.name))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::DeletedRepository>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod get_acr_tags {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::AcrRepositoryTags> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::AcrRepositoryTags = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) last: Option<String>,
        pub(crate) n: Option<i64>,
        pub(crate) orderby: Option<String>,
        pub(crate) digest: Option<String>,
    }
    impl RequestBuilder {
        #[doc = "Query parameter for the last item in previous query. Result set will include values lexically after last."]
        pub fn last(mut self, last: impl Into<String>) -> Self {
            self.last = Some(last.into());
            self
        }
        #[doc = "query parameter for max number of items"]
        pub fn n(mut self, n: i64) -> Self {
            self.n = Some(n);
            self
        }
        #[doc = "orderby query parameter"]
        pub fn orderby(mut self, orderby: impl Into<String>) -> Self {
            self.orderby = Some(orderby.into());
            self
        }
        #[doc = "filter by digest"]
        pub fn digest(mut self, digest: impl Into<String>) -> Self {
            self.digest = Some(digest.into());
            self
        }
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/acr/v1/{}/_tags", this.client.endpoint(), &this.name))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    if let Some(last) = &this.last {
                        req.url_mut().query_pairs_mut().append_pair("last", last);
                    }
                    if let Some(n) = &this.n {
                        req.url_mut().query_pairs_mut().append_pair("n", &n.to_string());
                    }
                    if let Some(orderby) = &this.orderby {
                        req.url_mut().query_pairs_mut().append_pair("orderby", orderby);
                    }
                    if let Some(digest) = &this.digest {
                        req.url_mut().query_pairs_mut().append_pair("digest", digest);
                    }
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::AcrRepositoryTags>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod get_acr_tag_attributes {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::AcrTagAttributes> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::AcrTagAttributes = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) reference: String,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!(
                        "{}/acr/v1/{}/_tags/{}",
                        this.client.endpoint(),
                        &this.name,
                        &this.reference
                    ))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::AcrTagAttributes>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod update_acr_tag_attributes {
    use super::models;
    pub struct Response(azure_core::Response);
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) reference: String,
        pub(crate) value: Option<models::ChangeableAttributes>,
    }
    impl RequestBuilder {
        #[doc = "Repository attribute value"]
        pub fn value(mut self, value: impl Into<models::ChangeableAttributes>) -> Self {
            self.value = Some(value.into());
            self
        }
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!(
                        "{}/acr/v1/{}/_tags/{}",
                        this.client.endpoint(),
                        &this.name,
                        &this.reference
                    ))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = if let Some(value) = &this.value {
                        req.insert_header("content-type", "application/json");
                        azure_core::to_json(value)?
                    } else {
                        azure_core::EMPTY_BODY
                    };
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
    }
}
pub mod delete_acr_tag {
    use super::models;
    pub struct Response(azure_core::Response);
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) reference: String,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!(
                        "{}/acr/v1/{}/_tags/{}",
                        this.client.endpoint(),
                        &this.name,
                        &this.reference
                    ))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
    }
}
pub mod get_acr_manifests {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::AcrManifests> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::AcrManifests = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) last: Option<String>,
        pub(crate) n: Option<i64>,
        pub(crate) orderby: Option<String>,
    }
    impl RequestBuilder {
        #[doc = "Query parameter for the last item in previous query. Result set will include values lexically after last."]
        pub fn last(mut self, last: impl Into<String>) -> Self {
            self.last = Some(last.into());
            self
        }
        #[doc = "query parameter for max number of items"]
        pub fn n(mut self, n: i64) -> Self {
            self.n = Some(n);
            self
        }
        #[doc = "orderby query parameter"]
        pub fn orderby(mut self, orderby: impl Into<String>) -> Self {
            self.orderby = Some(orderby.into());
            self
        }
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/acr/v1/{}/_manifests", this.client.endpoint(), &this.name))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    if let Some(last) = &this.last {
                        req.url_mut().query_pairs_mut().append_pair("last", last);
                    }
                    if let Some(n) = &this.n {
                        req.url_mut().query_pairs_mut().append_pair("n", &n.to_string());
                    }
                    if let Some(orderby) = &this.orderby {
                        req.url_mut().query_pairs_mut().append_pair("orderby", orderby);
                    }
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::AcrManifests>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod get_acr_manifest_attributes {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::AcrManifestAttributes> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::AcrManifestAttributes = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) reference: String,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!(
                        "{}/acr/v1/{}/_manifests/{}",
                        this.client.endpoint(),
                        &this.name,
                        &this.reference
                    ))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::AcrManifestAttributes>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod update_acr_manifest_attributes {
    use super::models;
    pub struct Response(azure_core::Response);
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) name: String,
        pub(crate) reference: String,
        pub(crate) value: Option<models::ChangeableAttributes>,
    }
    impl RequestBuilder {
        #[doc = "Repository attribute value"]
        pub fn value(mut self, value: impl Into<models::ChangeableAttributes>) -> Self {
            self.value = Some(value.into());
            self
        }
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!(
                        "{}/acr/v1/{}/_manifests/{}",
                        this.client.endpoint(),
                        &this.name,
                        &this.reference
                    ))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let req_body = if let Some(value) = &this.value {
                        req.insert_header("content-type", "application/json");
                        azure_core::to_json(value)?
                    } else {
                        azure_core::EMPTY_BODY
                    };
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
    }
}
pub mod get_acr_refresh_token_from_exchange {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::RefreshToken> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::RefreshToken = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) grant_type: String,
        pub(crate) service: String,
        pub(crate) tenant: Option<String>,
        pub(crate) refresh_token: Option<String>,
        pub(crate) access_token: Option<String>,
    }
    impl RequestBuilder {
        #[doc = "AAD tenant associated to the AAD credentials."]
        pub fn tenant(mut self, tenant: impl Into<String>) -> Self {
            self.tenant = Some(tenant.into());
            self
        }
        #[doc = "AAD refresh token, mandatory when grant_type is access_token_refresh_token or refresh_token"]
        pub fn refresh_token(mut self, refresh_token: impl Into<String>) -> Self {
            self.refresh_token = Some(refresh_token.into());
            self
        }
        #[doc = "AAD access token, mandatory when grant_type is access_token_refresh_token or access_token."]
        pub fn access_token(mut self, access_token: impl Into<String>) -> Self {
            self.access_token = Some(access_token.into());
            self
        }
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/oauth2/exchange", this.client.endpoint(),))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Post);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    unimplemented!("form data not yet supported");
                    unimplemented!("form data not yet supported");
                    unimplemented!("form data not yet supported");
                    unimplemented!("form data not yet supported");
                    unimplemented!("form data not yet supported");
                    let req_body = azure_core::EMPTY_BODY;
                    req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::RefreshToken>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod get_acr_access_token_from_login {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::AccessToken> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::AccessToken = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) service: String,
        pub(crate) scope: String,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/oauth2/token", this.client.endpoint(),))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Get);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    let service = &this.service;
                    req.url_mut().query_pairs_mut().append_pair("service", service);
                    let scope = &this.scope;
                    req.url_mut().query_pairs_mut().append_pair("scope", scope);
                    let req_body = azure_core::EMPTY_BODY;
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::AccessToken>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}
pub mod get_acr_access_token {
    use super::models;
    pub struct Response(azure_core::Response);
    impl Response {
        pub async fn into_body(self) -> azure_core::Result<models::AccessToken> {
            let bytes = self.0.into_body().collect().await?;
            let body: models::AccessToken = serde_json::from_slice(&bytes)?;
            Ok(body)
        }
        pub fn into_raw_response(self) -> azure_core::Response {
            self.0
        }
        pub fn as_raw_response(&self) -> &azure_core::Response {
            &self.0
        }
    }
    impl From<Response> for azure_core::Response {
        fn from(rsp: Response) -> Self {
            rsp.into_raw_response()
        }
    }
    impl AsRef<azure_core::Response> for Response {
        fn as_ref(&self) -> &azure_core::Response {
            self.as_raw_response()
        }
    }
    #[derive(Clone)]
    pub struct RequestBuilder {
        pub(crate) client: super::Client,
        pub(crate) grant_type: String,
        pub(crate) service: String,
        pub(crate) scope: String,
        pub(crate) refresh_token: String,
    }
    impl RequestBuilder {
        #[doc = "Send the request and returns the response."]
        pub fn send(self) -> futures::future::BoxFuture<'static, azure_core::Result<Response>> {
            Box::pin({
                let this = self.clone();
                async move {
                    let url = azure_core::Url::parse(&format!("{}/oauth2/token", this.client.endpoint(),))?;
                    let mut req = azure_core::Request::new(url, azure_core::Method::Post);
                    let credential = this.client.token_credential();
                    let token_response = credential.get_token(&this.client.scopes().join(" ")).await?;
                    req.insert_header(
                        azure_core::headers::AUTHORIZATION,
                        format!("Bearer {}", token_response.token.secret()),
                    );
                    unimplemented!("form data not yet supported");
                    unimplemented!("form data not yet supported");
                    unimplemented!("form data not yet supported");
                    unimplemented!("form data not yet supported");
                    let req_body = azure_core::EMPTY_BODY;
                    req.insert_header(azure_core::headers::CONTENT_LENGTH, "0");
                    req.set_body(req_body);
                    Ok(Response(this.client.send(&mut req).await?))
                }
            })
        }
        #[doc = "Send the request and return the response body."]
        pub fn into_future(self) -> futures::future::BoxFuture<'static, azure_core::Result<models::AccessToken>> {
            Box::pin(async move { self.send().await?.into_body().await })
        }
    }
}