aws-sdk-ecr 1.119.0

AWS SDK for Amazon Elastic Container Registry
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct InitiateLayerUploadOutput {
    /// <p>The upload ID for the layer upload. This parameter is passed to further <code>UploadLayerPart</code> and <code>CompleteLayerUpload</code> operations.</p>
    pub upload_id: ::std::option::Option<::std::string::String>,
    /// <p>The size, in bytes, that Amazon ECR expects future layer part uploads to be.</p>
    pub part_size: ::std::option::Option<i64>,
    _request_id: Option<String>,
}
impl InitiateLayerUploadOutput {
    /// <p>The upload ID for the layer upload. This parameter is passed to further <code>UploadLayerPart</code> and <code>CompleteLayerUpload</code> operations.</p>
    pub fn upload_id(&self) -> ::std::option::Option<&str> {
        self.upload_id.as_deref()
    }
    /// <p>The size, in bytes, that Amazon ECR expects future layer part uploads to be.</p>
    pub fn part_size(&self) -> ::std::option::Option<i64> {
        self.part_size
    }
}
impl ::aws_types::request_id::RequestId for InitiateLayerUploadOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl InitiateLayerUploadOutput {
    /// Creates a new builder-style object to manufacture [`InitiateLayerUploadOutput`](crate::operation::initiate_layer_upload::InitiateLayerUploadOutput).
    pub fn builder() -> crate::operation::initiate_layer_upload::builders::InitiateLayerUploadOutputBuilder {
        crate::operation::initiate_layer_upload::builders::InitiateLayerUploadOutputBuilder::default()
    }
}

/// A builder for [`InitiateLayerUploadOutput`](crate::operation::initiate_layer_upload::InitiateLayerUploadOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct InitiateLayerUploadOutputBuilder {
    pub(crate) upload_id: ::std::option::Option<::std::string::String>,
    pub(crate) part_size: ::std::option::Option<i64>,
    _request_id: Option<String>,
}
impl InitiateLayerUploadOutputBuilder {
    /// <p>The upload ID for the layer upload. This parameter is passed to further <code>UploadLayerPart</code> and <code>CompleteLayerUpload</code> operations.</p>
    pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.upload_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The upload ID for the layer upload. This parameter is passed to further <code>UploadLayerPart</code> and <code>CompleteLayerUpload</code> operations.</p>
    pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.upload_id = input;
        self
    }
    /// <p>The upload ID for the layer upload. This parameter is passed to further <code>UploadLayerPart</code> and <code>CompleteLayerUpload</code> operations.</p>
    pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.upload_id
    }
    /// <p>The size, in bytes, that Amazon ECR expects future layer part uploads to be.</p>
    pub fn part_size(mut self, input: i64) -> Self {
        self.part_size = ::std::option::Option::Some(input);
        self
    }
    /// <p>The size, in bytes, that Amazon ECR expects future layer part uploads to be.</p>
    pub fn set_part_size(mut self, input: ::std::option::Option<i64>) -> Self {
        self.part_size = input;
        self
    }
    /// <p>The size, in bytes, that Amazon ECR expects future layer part uploads to be.</p>
    pub fn get_part_size(&self) -> &::std::option::Option<i64> {
        &self.part_size
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`InitiateLayerUploadOutput`](crate::operation::initiate_layer_upload::InitiateLayerUploadOutput).
    pub fn build(self) -> crate::operation::initiate_layer_upload::InitiateLayerUploadOutput {
        crate::operation::initiate_layer_upload::InitiateLayerUploadOutput {
            upload_id: self.upload_id,
            part_size: self.part_size,
            _request_id: self._request_id,
        }
    }
}