aws_sdk_glue/operation/create_classifier/
_create_classifier_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateClassifierInput {
6    /// <p>A <code>GrokClassifier</code> object specifying the classifier to create.</p>
7    pub grok_classifier: ::std::option::Option<crate::types::CreateGrokClassifierRequest>,
8    /// <p>An <code>XMLClassifier</code> object specifying the classifier to create.</p>
9    pub xml_classifier: ::std::option::Option<crate::types::CreateXmlClassifierRequest>,
10    /// <p>A <code>JsonClassifier</code> object specifying the classifier to create.</p>
11    pub json_classifier: ::std::option::Option<crate::types::CreateJsonClassifierRequest>,
12    /// <p>A <code>CsvClassifier</code> object specifying the classifier to create.</p>
13    pub csv_classifier: ::std::option::Option<crate::types::CreateCsvClassifierRequest>,
14}
15impl CreateClassifierInput {
16    /// <p>A <code>GrokClassifier</code> object specifying the classifier to create.</p>
17    pub fn grok_classifier(&self) -> ::std::option::Option<&crate::types::CreateGrokClassifierRequest> {
18        self.grok_classifier.as_ref()
19    }
20    /// <p>An <code>XMLClassifier</code> object specifying the classifier to create.</p>
21    pub fn xml_classifier(&self) -> ::std::option::Option<&crate::types::CreateXmlClassifierRequest> {
22        self.xml_classifier.as_ref()
23    }
24    /// <p>A <code>JsonClassifier</code> object specifying the classifier to create.</p>
25    pub fn json_classifier(&self) -> ::std::option::Option<&crate::types::CreateJsonClassifierRequest> {
26        self.json_classifier.as_ref()
27    }
28    /// <p>A <code>CsvClassifier</code> object specifying the classifier to create.</p>
29    pub fn csv_classifier(&self) -> ::std::option::Option<&crate::types::CreateCsvClassifierRequest> {
30        self.csv_classifier.as_ref()
31    }
32}
33impl CreateClassifierInput {
34    /// Creates a new builder-style object to manufacture [`CreateClassifierInput`](crate::operation::create_classifier::CreateClassifierInput).
35    pub fn builder() -> crate::operation::create_classifier::builders::CreateClassifierInputBuilder {
36        crate::operation::create_classifier::builders::CreateClassifierInputBuilder::default()
37    }
38}
39
40/// A builder for [`CreateClassifierInput`](crate::operation::create_classifier::CreateClassifierInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreateClassifierInputBuilder {
44    pub(crate) grok_classifier: ::std::option::Option<crate::types::CreateGrokClassifierRequest>,
45    pub(crate) xml_classifier: ::std::option::Option<crate::types::CreateXmlClassifierRequest>,
46    pub(crate) json_classifier: ::std::option::Option<crate::types::CreateJsonClassifierRequest>,
47    pub(crate) csv_classifier: ::std::option::Option<crate::types::CreateCsvClassifierRequest>,
48}
49impl CreateClassifierInputBuilder {
50    /// <p>A <code>GrokClassifier</code> object specifying the classifier to create.</p>
51    pub fn grok_classifier(mut self, input: crate::types::CreateGrokClassifierRequest) -> Self {
52        self.grok_classifier = ::std::option::Option::Some(input);
53        self
54    }
55    /// <p>A <code>GrokClassifier</code> object specifying the classifier to create.</p>
56    pub fn set_grok_classifier(mut self, input: ::std::option::Option<crate::types::CreateGrokClassifierRequest>) -> Self {
57        self.grok_classifier = input;
58        self
59    }
60    /// <p>A <code>GrokClassifier</code> object specifying the classifier to create.</p>
61    pub fn get_grok_classifier(&self) -> &::std::option::Option<crate::types::CreateGrokClassifierRequest> {
62        &self.grok_classifier
63    }
64    /// <p>An <code>XMLClassifier</code> object specifying the classifier to create.</p>
65    pub fn xml_classifier(mut self, input: crate::types::CreateXmlClassifierRequest) -> Self {
66        self.xml_classifier = ::std::option::Option::Some(input);
67        self
68    }
69    /// <p>An <code>XMLClassifier</code> object specifying the classifier to create.</p>
70    pub fn set_xml_classifier(mut self, input: ::std::option::Option<crate::types::CreateXmlClassifierRequest>) -> Self {
71        self.xml_classifier = input;
72        self
73    }
74    /// <p>An <code>XMLClassifier</code> object specifying the classifier to create.</p>
75    pub fn get_xml_classifier(&self) -> &::std::option::Option<crate::types::CreateXmlClassifierRequest> {
76        &self.xml_classifier
77    }
78    /// <p>A <code>JsonClassifier</code> object specifying the classifier to create.</p>
79    pub fn json_classifier(mut self, input: crate::types::CreateJsonClassifierRequest) -> Self {
80        self.json_classifier = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>A <code>JsonClassifier</code> object specifying the classifier to create.</p>
84    pub fn set_json_classifier(mut self, input: ::std::option::Option<crate::types::CreateJsonClassifierRequest>) -> Self {
85        self.json_classifier = input;
86        self
87    }
88    /// <p>A <code>JsonClassifier</code> object specifying the classifier to create.</p>
89    pub fn get_json_classifier(&self) -> &::std::option::Option<crate::types::CreateJsonClassifierRequest> {
90        &self.json_classifier
91    }
92    /// <p>A <code>CsvClassifier</code> object specifying the classifier to create.</p>
93    pub fn csv_classifier(mut self, input: crate::types::CreateCsvClassifierRequest) -> Self {
94        self.csv_classifier = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>A <code>CsvClassifier</code> object specifying the classifier to create.</p>
98    pub fn set_csv_classifier(mut self, input: ::std::option::Option<crate::types::CreateCsvClassifierRequest>) -> Self {
99        self.csv_classifier = input;
100        self
101    }
102    /// <p>A <code>CsvClassifier</code> object specifying the classifier to create.</p>
103    pub fn get_csv_classifier(&self) -> &::std::option::Option<crate::types::CreateCsvClassifierRequest> {
104        &self.csv_classifier
105    }
106    /// Consumes the builder and constructs a [`CreateClassifierInput`](crate::operation::create_classifier::CreateClassifierInput).
107    pub fn build(
108        self,
109    ) -> ::std::result::Result<crate::operation::create_classifier::CreateClassifierInput, ::aws_smithy_types::error::operation::BuildError> {
110        ::std::result::Result::Ok(crate::operation::create_classifier::CreateClassifierInput {
111            grok_classifier: self.grok_classifier,
112            xml_classifier: self.xml_classifier,
113            json_classifier: self.json_classifier,
114            csv_classifier: self.csv_classifier,
115        })
116    }
117}