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
// 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 CreateDatasetInput {
/// <p> The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location of an Amazon Sagemaker format manifest file. If you don't specify <code>datasetSource</code>, an empty dataset is created. To add labeled images to the dataset, You can use the console or call <code>UpdateDatasetEntries</code>. </p>
pub dataset_source: ::std::option::Option<crate::types::DatasetSource>,
/// <p> The type of the dataset. Specify <code>TRAIN</code> to create a training dataset. Specify <code>TEST</code> to create a test dataset. </p>
pub dataset_type: ::std::option::Option<crate::types::DatasetType>,
/// <p> The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset. </p>
pub project_arn: ::std::option::Option<::std::string::String>,
}
impl CreateDatasetInput {
/// <p> The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location of an Amazon Sagemaker format manifest file. If you don't specify <code>datasetSource</code>, an empty dataset is created. To add labeled images to the dataset, You can use the console or call <code>UpdateDatasetEntries</code>. </p>
pub fn dataset_source(&self) -> ::std::option::Option<&crate::types::DatasetSource> {
self.dataset_source.as_ref()
}
/// <p> The type of the dataset. Specify <code>TRAIN</code> to create a training dataset. Specify <code>TEST</code> to create a test dataset. </p>
pub fn dataset_type(&self) -> ::std::option::Option<&crate::types::DatasetType> {
self.dataset_type.as_ref()
}
/// <p> The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset. </p>
pub fn project_arn(&self) -> ::std::option::Option<&str> {
self.project_arn.as_deref()
}
}
impl CreateDatasetInput {
/// Creates a new builder-style object to manufacture [`CreateDatasetInput`](crate::operation::create_dataset::CreateDatasetInput).
pub fn builder() -> crate::operation::create_dataset::builders::CreateDatasetInputBuilder {
crate::operation::create_dataset::builders::CreateDatasetInputBuilder::default()
}
}
/// A builder for [`CreateDatasetInput`](crate::operation::create_dataset::CreateDatasetInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateDatasetInputBuilder {
pub(crate) dataset_source: ::std::option::Option<crate::types::DatasetSource>,
pub(crate) dataset_type: ::std::option::Option<crate::types::DatasetType>,
pub(crate) project_arn: ::std::option::Option<::std::string::String>,
}
impl CreateDatasetInputBuilder {
/// <p> The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location of an Amazon Sagemaker format manifest file. If you don't specify <code>datasetSource</code>, an empty dataset is created. To add labeled images to the dataset, You can use the console or call <code>UpdateDatasetEntries</code>. </p>
pub fn dataset_source(mut self, input: crate::types::DatasetSource) -> Self {
self.dataset_source = ::std::option::Option::Some(input);
self
}
/// <p> The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location of an Amazon Sagemaker format manifest file. If you don't specify <code>datasetSource</code>, an empty dataset is created. To add labeled images to the dataset, You can use the console or call <code>UpdateDatasetEntries</code>. </p>
pub fn set_dataset_source(mut self, input: ::std::option::Option<crate::types::DatasetSource>) -> Self {
self.dataset_source = input;
self
}
/// <p> The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location of an Amazon Sagemaker format manifest file. If you don't specify <code>datasetSource</code>, an empty dataset is created. To add labeled images to the dataset, You can use the console or call <code>UpdateDatasetEntries</code>. </p>
pub fn get_dataset_source(&self) -> &::std::option::Option<crate::types::DatasetSource> {
&self.dataset_source
}
/// <p> The type of the dataset. Specify <code>TRAIN</code> to create a training dataset. Specify <code>TEST</code> to create a test dataset. </p>
/// This field is required.
pub fn dataset_type(mut self, input: crate::types::DatasetType) -> Self {
self.dataset_type = ::std::option::Option::Some(input);
self
}
/// <p> The type of the dataset. Specify <code>TRAIN</code> to create a training dataset. Specify <code>TEST</code> to create a test dataset. </p>
pub fn set_dataset_type(mut self, input: ::std::option::Option<crate::types::DatasetType>) -> Self {
self.dataset_type = input;
self
}
/// <p> The type of the dataset. Specify <code>TRAIN</code> to create a training dataset. Specify <code>TEST</code> to create a test dataset. </p>
pub fn get_dataset_type(&self) -> &::std::option::Option<crate::types::DatasetType> {
&self.dataset_type
}
/// <p> The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset. </p>
/// This field is required.
pub fn project_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_arn = ::std::option::Option::Some(input.into());
self
}
/// <p> The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset. </p>
pub fn set_project_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_arn = input;
self
}
/// <p> The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset. </p>
pub fn get_project_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.project_arn
}
/// Consumes the builder and constructs a [`CreateDatasetInput`](crate::operation::create_dataset::CreateDatasetInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_dataset::CreateDatasetInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_dataset::CreateDatasetInput {
dataset_source: self.dataset_source,
dataset_type: self.dataset_type,
project_arn: self.project_arn,
})
}
}