aws_sdk_servicediscovery/operation/get_operation/_get_operation_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 GetOperationInput {
6 /// <p>The ID of the operation that you want to get more information about.</p>
7 pub operation_id: ::std::option::Option<::std::string::String>,
8 /// <p>The ID of the Amazon Web Services account that owns the namespace associated with the operation, as specified in the namespace <code>ResourceOwner</code> field. For operations associated with namespaces that are shared with your account, you must specify an <code>OwnerAccount</code>.</p>
9 pub owner_account: ::std::option::Option<::std::string::String>,
10}
11impl GetOperationInput {
12 /// <p>The ID of the operation that you want to get more information about.</p>
13 pub fn operation_id(&self) -> ::std::option::Option<&str> {
14 self.operation_id.as_deref()
15 }
16 /// <p>The ID of the Amazon Web Services account that owns the namespace associated with the operation, as specified in the namespace <code>ResourceOwner</code> field. For operations associated with namespaces that are shared with your account, you must specify an <code>OwnerAccount</code>.</p>
17 pub fn owner_account(&self) -> ::std::option::Option<&str> {
18 self.owner_account.as_deref()
19 }
20}
21impl GetOperationInput {
22 /// Creates a new builder-style object to manufacture [`GetOperationInput`](crate::operation::get_operation::GetOperationInput).
23 pub fn builder() -> crate::operation::get_operation::builders::GetOperationInputBuilder {
24 crate::operation::get_operation::builders::GetOperationInputBuilder::default()
25 }
26}
27
28/// A builder for [`GetOperationInput`](crate::operation::get_operation::GetOperationInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct GetOperationInputBuilder {
32 pub(crate) operation_id: ::std::option::Option<::std::string::String>,
33 pub(crate) owner_account: ::std::option::Option<::std::string::String>,
34}
35impl GetOperationInputBuilder {
36 /// <p>The ID of the operation that you want to get more information about.</p>
37 /// This field is required.
38 pub fn operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.operation_id = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The ID of the operation that you want to get more information about.</p>
43 pub fn set_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.operation_id = input;
45 self
46 }
47 /// <p>The ID of the operation that you want to get more information about.</p>
48 pub fn get_operation_id(&self) -> &::std::option::Option<::std::string::String> {
49 &self.operation_id
50 }
51 /// <p>The ID of the Amazon Web Services account that owns the namespace associated with the operation, as specified in the namespace <code>ResourceOwner</code> field. For operations associated with namespaces that are shared with your account, you must specify an <code>OwnerAccount</code>.</p>
52 pub fn owner_account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.owner_account = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>The ID of the Amazon Web Services account that owns the namespace associated with the operation, as specified in the namespace <code>ResourceOwner</code> field. For operations associated with namespaces that are shared with your account, you must specify an <code>OwnerAccount</code>.</p>
57 pub fn set_owner_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.owner_account = input;
59 self
60 }
61 /// <p>The ID of the Amazon Web Services account that owns the namespace associated with the operation, as specified in the namespace <code>ResourceOwner</code> field. For operations associated with namespaces that are shared with your account, you must specify an <code>OwnerAccount</code>.</p>
62 pub fn get_owner_account(&self) -> &::std::option::Option<::std::string::String> {
63 &self.owner_account
64 }
65 /// Consumes the builder and constructs a [`GetOperationInput`](crate::operation::get_operation::GetOperationInput).
66 pub fn build(
67 self,
68 ) -> ::std::result::Result<crate::operation::get_operation::GetOperationInput, ::aws_smithy_types::error::operation::BuildError> {
69 ::std::result::Result::Ok(crate::operation::get_operation::GetOperationInput {
70 operation_id: self.operation_id,
71 owner_account: self.owner_account,
72 })
73 }
74}