// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`GetOAuthToken`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`credential_provider_arn(impl Into<String>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::credential_provider_arn) / [`set_credential_provider_arn(Option<String>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::set_credential_provider_arn):<br>required: **true**<br><p>Amazon Resource Name of the credential provider to obtain the token from. The provider must be an OAuth provider and must be READY.</p><br>
/// - [`grant_type(GrantType)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::grant_type) / [`set_grant_type(Option<GrantType>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::set_grant_type):<br>required: **true**<br><p>How the token is obtained. Must be one of the grant types the provider allows; a grant the provider does not allow is rejected.</p><br>
/// - [`scopes(impl Into<String>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::scopes) / [`set_scopes(Option<Vec::<String>>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::set_scopes):<br>required: **false**<br><p>The OAuth scopes to request from the authorization server.</p><br>
/// - [`resources(impl Into<String>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::resources) / [`set_resources(Option<Vec::<String>>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::set_resources):<br>required: **false**<br><p>Resource indicators (RFC 8707) naming the APIs this token is for. Omit unless the authorization server requires them.</p><br>
/// - [`audiences(impl Into<String>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::audiences) / [`set_audiences(Option<Vec::<String>>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::set_audiences):<br>required: **false**<br><p>Audience values (RFC 8693) naming the intended recipients of this token. Omit unless the authorization server requires them.</p><br>
/// - [`custom_parameters(impl Into<String>, impl Into<String>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::custom_parameters) / [`set_custom_parameters(Option<HashMap::<String, String>>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::set_custom_parameters):<br>required: **false**<br><p>Extra parameters to include in the request to the authorization server, for vendor extensions. Added to the standard OAuth parameters; they never override them.</p><br>
/// - [`force_authentication(bool)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::force_authentication) / [`set_force_authentication(Option<bool>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::set_force_authentication):<br>required: **false**<br><p>Request a new token from the authorization server even when the broker already holds a valid one for this provider. Defaults to false, which returns the held token when one is available.</p><br>
/// - [`session_uri(impl Into<String>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::session_uri) / [`set_session_uri(Option<String>)`](crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::set_session_uri):<br>required: **false**<br><p>Return the token obtained for a consent session that a user has already completed. Supply the handle returned when the session was started.</p><br>
/// - On success, responds with [`GetOAuthTokenOutput`](crate::operation::get_o_auth_token::GetOAuthTokenOutput) with field(s):
/// - [`access_token(Option<String>)`](crate::operation::get_o_auth_token::GetOAuthTokenOutput::access_token): <p>The access token. Present it to the third-party API as a bearer credential.</p>
/// - [`expires_at(Option<DateTime>)`](crate::operation::get_o_auth_token::GetOAuthTokenOutput::expires_at): <p>When the access token expires. Absent when the authorization server does not report an expiry, in which case the token's lifetime is whatever that server applies.</p>
/// - [`session_status(Option<SessionStatus>)`](crate::operation::get_o_auth_token::GetOAuthTokenOutput::session_status): <p>Status of the consent session named in the request, so a repeated call can tell whether the user has finished granting consent.</p>
/// - On failure, responds with [`SdkError<GetOAuthTokenError>`](crate::operation::get_o_auth_token::GetOAuthTokenError)
pub fn get_o_auth_token(&self) -> crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder {
crate::operation::get_o_auth_token::builders::GetOAuthTokenFluentBuilder::new(self.handle.clone())
}
}