1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Configuration for downloading input data from Amazon S3 into the processing container.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ProcessingS3Input {
/// <p>The URI of the Amazon S3 prefix Amazon SageMaker downloads data required to run a processing job.</p>
pub s3_uri: ::std::option::Option<::std::string::String>,
/// <p>The local path in your container where you want Amazon SageMaker to write input data to. <code>LocalPath</code> is an absolute path to the input data and must begin with <code>/opt/ml/processing/</code>. <code>LocalPath</code> is a required parameter when <code>AppManaged</code> is <code>False</code> (default).</p>
pub local_path: ::std::option::Option<::std::string::String>,
/// <p>Whether you use an <code>S3Prefix</code> or a <code>ManifestFile</code> for the data type. If you choose <code>S3Prefix</code>, <code>S3Uri</code> identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for the processing job. If you choose <code>ManifestFile</code>, <code>S3Uri</code> identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for the processing job.</p>
pub s3_data_type: ::std::option::Option<crate::types::ProcessingS3DataType>,
/// <p>Whether to use <code>File</code> or <code>Pipe</code> input mode. In File mode, Amazon SageMaker copies the data from the input source onto the local ML storage volume before starting your processing container. This is the most commonly used input mode. In <code>Pipe</code> mode, Amazon SageMaker streams input data from the source directly to your processing container into named pipes without using the ML storage volume.</p>
pub s3_input_mode: ::std::option::Option<crate::types::ProcessingS3InputMode>,
/// <p>Whether to distribute the data from Amazon S3 to all processing instances with <code>FullyReplicated</code>, or whether the data from Amazon S3 is shared by Amazon S3 key, downloading one shard of data to each processing instance.</p>
pub s3_data_distribution_type: ::std::option::Option<crate::types::ProcessingS3DataDistributionType>,
/// <p>Whether to GZIP-decompress the data in Amazon S3 as it is streamed into the processing container. <code>Gzip</code> can only be used when <code>Pipe</code> mode is specified as the <code>S3InputMode</code>. In <code>Pipe</code> mode, Amazon SageMaker streams input data from the source directly to your container without using the EBS volume.</p>
pub s3_compression_type: ::std::option::Option<crate::types::ProcessingS3CompressionType>,
}
impl ProcessingS3Input {
/// <p>The URI of the Amazon S3 prefix Amazon SageMaker downloads data required to run a processing job.</p>
pub fn s3_uri(&self) -> ::std::option::Option<&str> {
self.s3_uri.as_deref()
}
/// <p>The local path in your container where you want Amazon SageMaker to write input data to. <code>LocalPath</code> is an absolute path to the input data and must begin with <code>/opt/ml/processing/</code>. <code>LocalPath</code> is a required parameter when <code>AppManaged</code> is <code>False</code> (default).</p>
pub fn local_path(&self) -> ::std::option::Option<&str> {
self.local_path.as_deref()
}
/// <p>Whether you use an <code>S3Prefix</code> or a <code>ManifestFile</code> for the data type. If you choose <code>S3Prefix</code>, <code>S3Uri</code> identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for the processing job. If you choose <code>ManifestFile</code>, <code>S3Uri</code> identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for the processing job.</p>
pub fn s3_data_type(&self) -> ::std::option::Option<&crate::types::ProcessingS3DataType> {
self.s3_data_type.as_ref()
}
/// <p>Whether to use <code>File</code> or <code>Pipe</code> input mode. In File mode, Amazon SageMaker copies the data from the input source onto the local ML storage volume before starting your processing container. This is the most commonly used input mode. In <code>Pipe</code> mode, Amazon SageMaker streams input data from the source directly to your processing container into named pipes without using the ML storage volume.</p>
pub fn s3_input_mode(&self) -> ::std::option::Option<&crate::types::ProcessingS3InputMode> {
self.s3_input_mode.as_ref()
}
/// <p>Whether to distribute the data from Amazon S3 to all processing instances with <code>FullyReplicated</code>, or whether the data from Amazon S3 is shared by Amazon S3 key, downloading one shard of data to each processing instance.</p>
pub fn s3_data_distribution_type(&self) -> ::std::option::Option<&crate::types::ProcessingS3DataDistributionType> {
self.s3_data_distribution_type.as_ref()
}
/// <p>Whether to GZIP-decompress the data in Amazon S3 as it is streamed into the processing container. <code>Gzip</code> can only be used when <code>Pipe</code> mode is specified as the <code>S3InputMode</code>. In <code>Pipe</code> mode, Amazon SageMaker streams input data from the source directly to your container without using the EBS volume.</p>
pub fn s3_compression_type(&self) -> ::std::option::Option<&crate::types::ProcessingS3CompressionType> {
self.s3_compression_type.as_ref()
}
}
impl ProcessingS3Input {
/// Creates a new builder-style object to manufacture [`ProcessingS3Input`](crate::types::ProcessingS3Input).
pub fn builder() -> crate::types::builders::ProcessingS3InputBuilder {
crate::types::builders::ProcessingS3InputBuilder::default()
}
}
/// A builder for [`ProcessingS3Input`](crate::types::ProcessingS3Input).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ProcessingS3InputBuilder {
pub(crate) s3_uri: ::std::option::Option<::std::string::String>,
pub(crate) local_path: ::std::option::Option<::std::string::String>,
pub(crate) s3_data_type: ::std::option::Option<crate::types::ProcessingS3DataType>,
pub(crate) s3_input_mode: ::std::option::Option<crate::types::ProcessingS3InputMode>,
pub(crate) s3_data_distribution_type: ::std::option::Option<crate::types::ProcessingS3DataDistributionType>,
pub(crate) s3_compression_type: ::std::option::Option<crate::types::ProcessingS3CompressionType>,
}
impl ProcessingS3InputBuilder {
/// <p>The URI of the Amazon S3 prefix Amazon SageMaker downloads data required to run a processing job.</p>
/// This field is required.
pub fn s3_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.s3_uri = ::std::option::Option::Some(input.into());
self
}
/// <p>The URI of the Amazon S3 prefix Amazon SageMaker downloads data required to run a processing job.</p>
pub fn set_s3_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.s3_uri = input;
self
}
/// <p>The URI of the Amazon S3 prefix Amazon SageMaker downloads data required to run a processing job.</p>
pub fn get_s3_uri(&self) -> &::std::option::Option<::std::string::String> {
&self.s3_uri
}
/// <p>The local path in your container where you want Amazon SageMaker to write input data to. <code>LocalPath</code> is an absolute path to the input data and must begin with <code>/opt/ml/processing/</code>. <code>LocalPath</code> is a required parameter when <code>AppManaged</code> is <code>False</code> (default).</p>
pub fn local_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.local_path = ::std::option::Option::Some(input.into());
self
}
/// <p>The local path in your container where you want Amazon SageMaker to write input data to. <code>LocalPath</code> is an absolute path to the input data and must begin with <code>/opt/ml/processing/</code>. <code>LocalPath</code> is a required parameter when <code>AppManaged</code> is <code>False</code> (default).</p>
pub fn set_local_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.local_path = input;
self
}
/// <p>The local path in your container where you want Amazon SageMaker to write input data to. <code>LocalPath</code> is an absolute path to the input data and must begin with <code>/opt/ml/processing/</code>. <code>LocalPath</code> is a required parameter when <code>AppManaged</code> is <code>False</code> (default).</p>
pub fn get_local_path(&self) -> &::std::option::Option<::std::string::String> {
&self.local_path
}
/// <p>Whether you use an <code>S3Prefix</code> or a <code>ManifestFile</code> for the data type. If you choose <code>S3Prefix</code>, <code>S3Uri</code> identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for the processing job. If you choose <code>ManifestFile</code>, <code>S3Uri</code> identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for the processing job.</p>
/// This field is required.
pub fn s3_data_type(mut self, input: crate::types::ProcessingS3DataType) -> Self {
self.s3_data_type = ::std::option::Option::Some(input);
self
}
/// <p>Whether you use an <code>S3Prefix</code> or a <code>ManifestFile</code> for the data type. If you choose <code>S3Prefix</code>, <code>S3Uri</code> identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for the processing job. If you choose <code>ManifestFile</code>, <code>S3Uri</code> identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for the processing job.</p>
pub fn set_s3_data_type(mut self, input: ::std::option::Option<crate::types::ProcessingS3DataType>) -> Self {
self.s3_data_type = input;
self
}
/// <p>Whether you use an <code>S3Prefix</code> or a <code>ManifestFile</code> for the data type. If you choose <code>S3Prefix</code>, <code>S3Uri</code> identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for the processing job. If you choose <code>ManifestFile</code>, <code>S3Uri</code> identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for the processing job.</p>
pub fn get_s3_data_type(&self) -> &::std::option::Option<crate::types::ProcessingS3DataType> {
&self.s3_data_type
}
/// <p>Whether to use <code>File</code> or <code>Pipe</code> input mode. In File mode, Amazon SageMaker copies the data from the input source onto the local ML storage volume before starting your processing container. This is the most commonly used input mode. In <code>Pipe</code> mode, Amazon SageMaker streams input data from the source directly to your processing container into named pipes without using the ML storage volume.</p>
pub fn s3_input_mode(mut self, input: crate::types::ProcessingS3InputMode) -> Self {
self.s3_input_mode = ::std::option::Option::Some(input);
self
}
/// <p>Whether to use <code>File</code> or <code>Pipe</code> input mode. In File mode, Amazon SageMaker copies the data from the input source onto the local ML storage volume before starting your processing container. This is the most commonly used input mode. In <code>Pipe</code> mode, Amazon SageMaker streams input data from the source directly to your processing container into named pipes without using the ML storage volume.</p>
pub fn set_s3_input_mode(mut self, input: ::std::option::Option<crate::types::ProcessingS3InputMode>) -> Self {
self.s3_input_mode = input;
self
}
/// <p>Whether to use <code>File</code> or <code>Pipe</code> input mode. In File mode, Amazon SageMaker copies the data from the input source onto the local ML storage volume before starting your processing container. This is the most commonly used input mode. In <code>Pipe</code> mode, Amazon SageMaker streams input data from the source directly to your processing container into named pipes without using the ML storage volume.</p>
pub fn get_s3_input_mode(&self) -> &::std::option::Option<crate::types::ProcessingS3InputMode> {
&self.s3_input_mode
}
/// <p>Whether to distribute the data from Amazon S3 to all processing instances with <code>FullyReplicated</code>, or whether the data from Amazon S3 is shared by Amazon S3 key, downloading one shard of data to each processing instance.</p>
pub fn s3_data_distribution_type(mut self, input: crate::types::ProcessingS3DataDistributionType) -> Self {
self.s3_data_distribution_type = ::std::option::Option::Some(input);
self
}
/// <p>Whether to distribute the data from Amazon S3 to all processing instances with <code>FullyReplicated</code>, or whether the data from Amazon S3 is shared by Amazon S3 key, downloading one shard of data to each processing instance.</p>
pub fn set_s3_data_distribution_type(mut self, input: ::std::option::Option<crate::types::ProcessingS3DataDistributionType>) -> Self {
self.s3_data_distribution_type = input;
self
}
/// <p>Whether to distribute the data from Amazon S3 to all processing instances with <code>FullyReplicated</code>, or whether the data from Amazon S3 is shared by Amazon S3 key, downloading one shard of data to each processing instance.</p>
pub fn get_s3_data_distribution_type(&self) -> &::std::option::Option<crate::types::ProcessingS3DataDistributionType> {
&self.s3_data_distribution_type
}
/// <p>Whether to GZIP-decompress the data in Amazon S3 as it is streamed into the processing container. <code>Gzip</code> can only be used when <code>Pipe</code> mode is specified as the <code>S3InputMode</code>. In <code>Pipe</code> mode, Amazon SageMaker streams input data from the source directly to your container without using the EBS volume.</p>
pub fn s3_compression_type(mut self, input: crate::types::ProcessingS3CompressionType) -> Self {
self.s3_compression_type = ::std::option::Option::Some(input);
self
}
/// <p>Whether to GZIP-decompress the data in Amazon S3 as it is streamed into the processing container. <code>Gzip</code> can only be used when <code>Pipe</code> mode is specified as the <code>S3InputMode</code>. In <code>Pipe</code> mode, Amazon SageMaker streams input data from the source directly to your container without using the EBS volume.</p>
pub fn set_s3_compression_type(mut self, input: ::std::option::Option<crate::types::ProcessingS3CompressionType>) -> Self {
self.s3_compression_type = input;
self
}
/// <p>Whether to GZIP-decompress the data in Amazon S3 as it is streamed into the processing container. <code>Gzip</code> can only be used when <code>Pipe</code> mode is specified as the <code>S3InputMode</code>. In <code>Pipe</code> mode, Amazon SageMaker streams input data from the source directly to your container without using the EBS volume.</p>
pub fn get_s3_compression_type(&self) -> &::std::option::Option<crate::types::ProcessingS3CompressionType> {
&self.s3_compression_type
}
/// Consumes the builder and constructs a [`ProcessingS3Input`](crate::types::ProcessingS3Input).
pub fn build(self) -> crate::types::ProcessingS3Input {
crate::types::ProcessingS3Input {
s3_uri: self.s3_uri,
local_path: self.local_path,
s3_data_type: self.s3_data_type,
s3_input_mode: self.s3_input_mode,
s3_data_distribution_type: self.s3_data_distribution_type,
s3_compression_type: self.s3_compression_type,
}
}
}