aws-sdk-ecr 1.105.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 UploadLayerPartInput {
    /// <p>The Amazon Web Services account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default registry is assumed.</p>
    pub registry_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the repository to which you are uploading layer parts.</p>
    pub repository_name: ::std::option::Option<::std::string::String>,
    /// <p>The upload ID from a previous <code>InitiateLayerUpload</code> operation to associate with the layer part upload.</p>
    pub upload_id: ::std::option::Option<::std::string::String>,
    /// <p>The position of the first byte of the layer part witin the overall image layer.</p>
    pub part_first_byte: ::std::option::Option<i64>,
    /// <p>The position of the last byte of the layer part within the overall image layer.</p>
    pub part_last_byte: ::std::option::Option<i64>,
    /// <p>The base64-encoded layer part payload.</p>
    pub layer_part_blob: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl UploadLayerPartInput {
    /// <p>The Amazon Web Services account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default registry is assumed.</p>
    pub fn registry_id(&self) -> ::std::option::Option<&str> {
        self.registry_id.as_deref()
    }
    /// <p>The name of the repository to which you are uploading layer parts.</p>
    pub fn repository_name(&self) -> ::std::option::Option<&str> {
        self.repository_name.as_deref()
    }
    /// <p>The upload ID from a previous <code>InitiateLayerUpload</code> operation to associate with the layer part upload.</p>
    pub fn upload_id(&self) -> ::std::option::Option<&str> {
        self.upload_id.as_deref()
    }
    /// <p>The position of the first byte of the layer part witin the overall image layer.</p>
    pub fn part_first_byte(&self) -> ::std::option::Option<i64> {
        self.part_first_byte
    }
    /// <p>The position of the last byte of the layer part within the overall image layer.</p>
    pub fn part_last_byte(&self) -> ::std::option::Option<i64> {
        self.part_last_byte
    }
    /// <p>The base64-encoded layer part payload.</p>
    pub fn layer_part_blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        self.layer_part_blob.as_ref()
    }
}
impl UploadLayerPartInput {
    /// Creates a new builder-style object to manufacture [`UploadLayerPartInput`](crate::operation::upload_layer_part::UploadLayerPartInput).
    pub fn builder() -> crate::operation::upload_layer_part::builders::UploadLayerPartInputBuilder {
        crate::operation::upload_layer_part::builders::UploadLayerPartInputBuilder::default()
    }
}

/// A builder for [`UploadLayerPartInput`](crate::operation::upload_layer_part::UploadLayerPartInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UploadLayerPartInputBuilder {
    pub(crate) registry_id: ::std::option::Option<::std::string::String>,
    pub(crate) repository_name: ::std::option::Option<::std::string::String>,
    pub(crate) upload_id: ::std::option::Option<::std::string::String>,
    pub(crate) part_first_byte: ::std::option::Option<i64>,
    pub(crate) part_last_byte: ::std::option::Option<i64>,
    pub(crate) layer_part_blob: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl UploadLayerPartInputBuilder {
    /// <p>The Amazon Web Services account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default registry is assumed.</p>
    pub fn registry_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.registry_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default registry is assumed.</p>
    pub fn set_registry_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.registry_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default registry is assumed.</p>
    pub fn get_registry_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.registry_id
    }
    /// <p>The name of the repository to which you are uploading layer parts.</p>
    /// This field is required.
    pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.repository_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the repository to which you are uploading layer parts.</p>
    pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.repository_name = input;
        self
    }
    /// <p>The name of the repository to which you are uploading layer parts.</p>
    pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository_name
    }
    /// <p>The upload ID from a previous <code>InitiateLayerUpload</code> operation to associate with the layer part upload.</p>
    /// This field is required.
    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 from a previous <code>InitiateLayerUpload</code> operation to associate with the layer part upload.</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 from a previous <code>InitiateLayerUpload</code> operation to associate with the layer part upload.</p>
    pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.upload_id
    }
    /// <p>The position of the first byte of the layer part witin the overall image layer.</p>
    /// This field is required.
    pub fn part_first_byte(mut self, input: i64) -> Self {
        self.part_first_byte = ::std::option::Option::Some(input);
        self
    }
    /// <p>The position of the first byte of the layer part witin the overall image layer.</p>
    pub fn set_part_first_byte(mut self, input: ::std::option::Option<i64>) -> Self {
        self.part_first_byte = input;
        self
    }
    /// <p>The position of the first byte of the layer part witin the overall image layer.</p>
    pub fn get_part_first_byte(&self) -> &::std::option::Option<i64> {
        &self.part_first_byte
    }
    /// <p>The position of the last byte of the layer part within the overall image layer.</p>
    /// This field is required.
    pub fn part_last_byte(mut self, input: i64) -> Self {
        self.part_last_byte = ::std::option::Option::Some(input);
        self
    }
    /// <p>The position of the last byte of the layer part within the overall image layer.</p>
    pub fn set_part_last_byte(mut self, input: ::std::option::Option<i64>) -> Self {
        self.part_last_byte = input;
        self
    }
    /// <p>The position of the last byte of the layer part within the overall image layer.</p>
    pub fn get_part_last_byte(&self) -> &::std::option::Option<i64> {
        &self.part_last_byte
    }
    /// <p>The base64-encoded layer part payload.</p>
    /// This field is required.
    pub fn layer_part_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.layer_part_blob = ::std::option::Option::Some(input);
        self
    }
    /// <p>The base64-encoded layer part payload.</p>
    pub fn set_layer_part_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.layer_part_blob = input;
        self
    }
    /// <p>The base64-encoded layer part payload.</p>
    pub fn get_layer_part_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        &self.layer_part_blob
    }
    /// Consumes the builder and constructs a [`UploadLayerPartInput`](crate::operation::upload_layer_part::UploadLayerPartInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::upload_layer_part::UploadLayerPartInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::upload_layer_part::UploadLayerPartInput {
            registry_id: self.registry_id,
            repository_name: self.repository_name,
            upload_id: self.upload_id,
            part_first_byte: self.part_first_byte,
            part_last_byte: self.part_last_byte,
            layer_part_blob: self.layer_part_blob,
        })
    }
}