aws_sdk_cloudtrail/operation/cancel_query/
_cancel_query_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 CancelQueryInput {
6    /// <p>The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.</p>
7    #[deprecated(note = "EventDataStore is no longer required by CancelQueryRequest")]
8    pub event_data_store: ::std::option::Option<::std::string::String>,
9    /// <p>The ID of the query that you want to cancel. The <code>QueryId</code> comes from the response of a <code>StartQuery</code> operation.</p>
10    pub query_id: ::std::option::Option<::std::string::String>,
11    /// <p>The account ID of the event data store owner.</p>
12    pub event_data_store_owner_account_id: ::std::option::Option<::std::string::String>,
13}
14impl CancelQueryInput {
15    /// <p>The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.</p>
16    #[deprecated(note = "EventDataStore is no longer required by CancelQueryRequest")]
17    pub fn event_data_store(&self) -> ::std::option::Option<&str> {
18        self.event_data_store.as_deref()
19    }
20    /// <p>The ID of the query that you want to cancel. The <code>QueryId</code> comes from the response of a <code>StartQuery</code> operation.</p>
21    pub fn query_id(&self) -> ::std::option::Option<&str> {
22        self.query_id.as_deref()
23    }
24    /// <p>The account ID of the event data store owner.</p>
25    pub fn event_data_store_owner_account_id(&self) -> ::std::option::Option<&str> {
26        self.event_data_store_owner_account_id.as_deref()
27    }
28}
29impl CancelQueryInput {
30    /// Creates a new builder-style object to manufacture [`CancelQueryInput`](crate::operation::cancel_query::CancelQueryInput).
31    pub fn builder() -> crate::operation::cancel_query::builders::CancelQueryInputBuilder {
32        crate::operation::cancel_query::builders::CancelQueryInputBuilder::default()
33    }
34}
35
36/// A builder for [`CancelQueryInput`](crate::operation::cancel_query::CancelQueryInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct CancelQueryInputBuilder {
40    pub(crate) event_data_store: ::std::option::Option<::std::string::String>,
41    pub(crate) query_id: ::std::option::Option<::std::string::String>,
42    pub(crate) event_data_store_owner_account_id: ::std::option::Option<::std::string::String>,
43}
44impl CancelQueryInputBuilder {
45    /// <p>The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.</p>
46    #[deprecated(note = "EventDataStore is no longer required by CancelQueryRequest")]
47    pub fn event_data_store(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.event_data_store = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.</p>
52    #[deprecated(note = "EventDataStore is no longer required by CancelQueryRequest")]
53    pub fn set_event_data_store(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54        self.event_data_store = input;
55        self
56    }
57    /// <p>The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.</p>
58    #[deprecated(note = "EventDataStore is no longer required by CancelQueryRequest")]
59    pub fn get_event_data_store(&self) -> &::std::option::Option<::std::string::String> {
60        &self.event_data_store
61    }
62    /// <p>The ID of the query that you want to cancel. The <code>QueryId</code> comes from the response of a <code>StartQuery</code> operation.</p>
63    /// This field is required.
64    pub fn query_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65        self.query_id = ::std::option::Option::Some(input.into());
66        self
67    }
68    /// <p>The ID of the query that you want to cancel. The <code>QueryId</code> comes from the response of a <code>StartQuery</code> operation.</p>
69    pub fn set_query_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70        self.query_id = input;
71        self
72    }
73    /// <p>The ID of the query that you want to cancel. The <code>QueryId</code> comes from the response of a <code>StartQuery</code> operation.</p>
74    pub fn get_query_id(&self) -> &::std::option::Option<::std::string::String> {
75        &self.query_id
76    }
77    /// <p>The account ID of the event data store owner.</p>
78    pub fn event_data_store_owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79        self.event_data_store_owner_account_id = ::std::option::Option::Some(input.into());
80        self
81    }
82    /// <p>The account ID of the event data store owner.</p>
83    pub fn set_event_data_store_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84        self.event_data_store_owner_account_id = input;
85        self
86    }
87    /// <p>The account ID of the event data store owner.</p>
88    pub fn get_event_data_store_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
89        &self.event_data_store_owner_account_id
90    }
91    /// Consumes the builder and constructs a [`CancelQueryInput`](crate::operation::cancel_query::CancelQueryInput).
92    pub fn build(self) -> ::std::result::Result<crate::operation::cancel_query::CancelQueryInput, ::aws_smithy_types::error::operation::BuildError> {
93        ::std::result::Result::Ok(crate::operation::cancel_query::CancelQueryInput {
94            event_data_store: self.event_data_store,
95            query_id: self.query_id,
96            event_data_store_owner_account_id: self.event_data_store_owner_account_id,
97        })
98    }
99}