aws_sdk_amplifyuibuilder/operation/refresh_token/
_refresh_token_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 RefreshTokenInput {
6    /// <p>The third-party provider for the token. The only valid value is <code>figma</code>.</p>
7    pub provider: ::std::option::Option<crate::types::TokenProviders>,
8    /// <p>Information about the refresh token request.</p>
9    pub refresh_token_body: ::std::option::Option<crate::types::RefreshTokenRequestBody>,
10}
11impl RefreshTokenInput {
12    /// <p>The third-party provider for the token. The only valid value is <code>figma</code>.</p>
13    pub fn provider(&self) -> ::std::option::Option<&crate::types::TokenProviders> {
14        self.provider.as_ref()
15    }
16    /// <p>Information about the refresh token request.</p>
17    pub fn refresh_token_body(&self) -> ::std::option::Option<&crate::types::RefreshTokenRequestBody> {
18        self.refresh_token_body.as_ref()
19    }
20}
21impl RefreshTokenInput {
22    /// Creates a new builder-style object to manufacture [`RefreshTokenInput`](crate::operation::refresh_token::RefreshTokenInput).
23    pub fn builder() -> crate::operation::refresh_token::builders::RefreshTokenInputBuilder {
24        crate::operation::refresh_token::builders::RefreshTokenInputBuilder::default()
25    }
26}
27
28/// A builder for [`RefreshTokenInput`](crate::operation::refresh_token::RefreshTokenInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct RefreshTokenInputBuilder {
32    pub(crate) provider: ::std::option::Option<crate::types::TokenProviders>,
33    pub(crate) refresh_token_body: ::std::option::Option<crate::types::RefreshTokenRequestBody>,
34}
35impl RefreshTokenInputBuilder {
36    /// <p>The third-party provider for the token. The only valid value is <code>figma</code>.</p>
37    /// This field is required.
38    pub fn provider(mut self, input: crate::types::TokenProviders) -> Self {
39        self.provider = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>The third-party provider for the token. The only valid value is <code>figma</code>.</p>
43    pub fn set_provider(mut self, input: ::std::option::Option<crate::types::TokenProviders>) -> Self {
44        self.provider = input;
45        self
46    }
47    /// <p>The third-party provider for the token. The only valid value is <code>figma</code>.</p>
48    pub fn get_provider(&self) -> &::std::option::Option<crate::types::TokenProviders> {
49        &self.provider
50    }
51    /// <p>Information about the refresh token request.</p>
52    /// This field is required.
53    pub fn refresh_token_body(mut self, input: crate::types::RefreshTokenRequestBody) -> Self {
54        self.refresh_token_body = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>Information about the refresh token request.</p>
58    pub fn set_refresh_token_body(mut self, input: ::std::option::Option<crate::types::RefreshTokenRequestBody>) -> Self {
59        self.refresh_token_body = input;
60        self
61    }
62    /// <p>Information about the refresh token request.</p>
63    pub fn get_refresh_token_body(&self) -> &::std::option::Option<crate::types::RefreshTokenRequestBody> {
64        &self.refresh_token_body
65    }
66    /// Consumes the builder and constructs a [`RefreshTokenInput`](crate::operation::refresh_token::RefreshTokenInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::refresh_token::RefreshTokenInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::refresh_token::RefreshTokenInput {
71            provider: self.provider,
72            refresh_token_body: self.refresh_token_body,
73        })
74    }
75}