aws_sdk_amp/operation/delete_scraper/
_delete_scraper_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of a <code>DeleteScraper</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteScraperInput {
7    /// <p>The ID of the scraper to delete.</p>
8    pub scraper_id: ::std::option::Option<::std::string::String>,
9    /// <p>(Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request.</p>
10    pub client_token: ::std::option::Option<::std::string::String>,
11}
12impl DeleteScraperInput {
13    /// <p>The ID of the scraper to delete.</p>
14    pub fn scraper_id(&self) -> ::std::option::Option<&str> {
15        self.scraper_id.as_deref()
16    }
17    /// <p>(Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request.</p>
18    pub fn client_token(&self) -> ::std::option::Option<&str> {
19        self.client_token.as_deref()
20    }
21}
22impl DeleteScraperInput {
23    /// Creates a new builder-style object to manufacture [`DeleteScraperInput`](crate::operation::delete_scraper::DeleteScraperInput).
24    pub fn builder() -> crate::operation::delete_scraper::builders::DeleteScraperInputBuilder {
25        crate::operation::delete_scraper::builders::DeleteScraperInputBuilder::default()
26    }
27}
28
29/// A builder for [`DeleteScraperInput`](crate::operation::delete_scraper::DeleteScraperInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DeleteScraperInputBuilder {
33    pub(crate) scraper_id: ::std::option::Option<::std::string::String>,
34    pub(crate) client_token: ::std::option::Option<::std::string::String>,
35}
36impl DeleteScraperInputBuilder {
37    /// <p>The ID of the scraper to delete.</p>
38    /// This field is required.
39    pub fn scraper_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.scraper_id = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>The ID of the scraper to delete.</p>
44    pub fn set_scraper_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.scraper_id = input;
46        self
47    }
48    /// <p>The ID of the scraper to delete.</p>
49    pub fn get_scraper_id(&self) -> &::std::option::Option<::std::string::String> {
50        &self.scraper_id
51    }
52    /// <p>(Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request.</p>
53    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.client_token = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>(Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request.</p>
58    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.client_token = input;
60        self
61    }
62    /// <p>(Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request.</p>
63    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
64        &self.client_token
65    }
66    /// Consumes the builder and constructs a [`DeleteScraperInput`](crate::operation::delete_scraper::DeleteScraperInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::delete_scraper::DeleteScraperInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::delete_scraper::DeleteScraperInput {
71            scraper_id: self.scraper_id,
72            client_token: self.client_token,
73        })
74    }
75}