// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(Debug)]
pub(crate) struct Handle<C, M, R = aws_smithy_client::retry::Standard> {
pub(crate) client: aws_smithy_client::Client<C, M, R>,
pub(crate) conf: crate::Config,
}
/// An ergonomic service client for `IdentityService`.
///
/// This client allows ergonomic access to a `IdentityService`-shaped service.
/// Each method corresponds to an endpoint defined in the service's Smithy model,
/// and the request and response shapes are auto-generated from that same model.
///
/// # Constructing a Client
///
/// To construct a client, you need a few different things:
///
/// - A [`Config`](crate::Config) that specifies additional configuration
/// required by the service.
/// - A connector (`C`) that specifies how HTTP requests are translated
/// into HTTP responses. This will typically be an HTTP client (like
/// `hyper`), though you can also substitute in your own, like a mock
/// mock connector for testing.
/// - A "middleware" (`M`) that modifies requests prior to them being
/// sent to the request. Most commonly, middleware will decide what
/// endpoint the requests should be sent to, as well as perform
/// authentication and authorization of requests (such as SigV4).
/// You can also have middleware that performs request/response
/// tracing, throttling, or other middleware-like tasks.
/// - A retry policy (`R`) that dictates the behavior for requests that
/// fail and should (potentially) be retried. The default type is
/// generally what you want, as it implements a well-vetted retry
/// policy implemented in [`RetryMode::Standard`](aws_smithy_types::retry::RetryMode::Standard).
///
/// To construct a client, you will generally want to call
/// [`Client::with_config`], which takes a [`aws_smithy_client::Client`] (a
/// Smithy client that isn't specialized to a particular service),
/// and a [`Config`](crate::Config). Both of these are constructed using
/// the [builder pattern] where you first construct a `Builder` type,
/// then configure it with the necessary parameters, and then call
/// `build` to construct the finalized output type. The
/// [`aws_smithy_client::Client`] builder is re-exported in this crate as
/// [`Builder`] for convenience.
///
/// In _most_ circumstances, you will want to use the following pattern
/// to construct a client:
///
/// ```
/// use rivet_identity::{Builder, Client, Config};
/// let raw_client =
/// Builder::dyn_https()
/// # /*
/// .middleware(/* discussed below */)
/// # */
/// # .middleware_fn(|r| r)
/// .build();
/// let config = Config::builder().build();
/// let client = Client::with_config(raw_client, config);
/// ```
///
/// For the middleware, you'll want to use whatever matches the
/// routing, authentication and authorization required by the target
/// service. For example, for the standard AWS SDK which uses
/// [SigV4-signed requests], the middleware looks like this:
///
// Ignored as otherwise we'd need to pull in all these dev-dependencies.
/// ```rust,ignore
/// use aws_endpoint::AwsEndpointStage;
/// use aws_http::auth::CredentialsStage;
/// use aws_http::recursion_detection::RecursionDetectionStage;
/// use aws_http::user_agent::UserAgentStage;
/// use aws_sig_auth::middleware::SigV4SigningStage;
/// use aws_sig_auth::signer::SigV4Signer;
/// use aws_smithy_client::retry::Config as RetryConfig;
/// use aws_smithy_http_tower::map_request::{AsyncMapRequestLayer, MapRequestLayer};
/// use std::fmt::Debug;
/// use tower::layer::util::{Identity, Stack};
/// use tower::ServiceBuilder;
///
/// type AwsMiddlewareStack = Stack<
/// MapRequestLayer<RecursionDetectionStage>,
/// Stack<
/// MapRequestLayer<SigV4SigningStage>,
/// Stack<
/// AsyncMapRequestLayer<CredentialsStage>,
/// Stack<
/// MapRequestLayer<UserAgentStage>,
/// Stack<MapRequestLayer<AwsEndpointStage>, Identity>,
/// >,
/// >,
/// >,
/// >;
///
/// /// AWS Middleware Stack
/// ///
/// /// This implements the middleware stack for this service. It will:
/// /// 1. Load credentials asynchronously into the property bag
/// /// 2. Sign the request with SigV4
/// /// 3. Resolve an Endpoint for the request
/// /// 4. Add a user agent to the request
/// #[derive(Debug, Default, Clone)]
/// #[non_exhaustive]
/// pub struct AwsMiddleware;
///
/// impl AwsMiddleware {
/// /// Create a new `AwsMiddleware` stack
/// ///
/// /// Note: `AwsMiddleware` holds no state.
/// pub fn new() -> Self {
/// AwsMiddleware::default()
/// }
/// }
///
/// // define the middleware stack in a non-generic location to reduce code bloat.
/// fn base() -> ServiceBuilder<AwsMiddlewareStack> {
/// let credential_provider = AsyncMapRequestLayer::for_mapper(CredentialsStage::new());
/// let signer = MapRequestLayer::for_mapper(SigV4SigningStage::new(SigV4Signer::new()));
/// let endpoint_resolver = MapRequestLayer::for_mapper(AwsEndpointStage);
/// let user_agent = MapRequestLayer::for_mapper(UserAgentStage::new());
/// let recursion_detection = MapRequestLayer::for_mapper(RecursionDetectionStage::new());
/// // These layers can be considered as occurring in order, that is:
/// // 1. Resolve an endpoint
/// // 2. Add a user agent
/// // 3. Acquire credentials
/// // 4. Sign with credentials
/// // (5. Dispatch over the wire)
/// ServiceBuilder::new()
/// .layer(endpoint_resolver)
/// .layer(user_agent)
/// .layer(credential_provider)
/// .layer(signer)
/// .layer(recursion_detection)
/// }
///
/// impl<S> tower::Layer<S> for AwsMiddleware {
/// type Service = <AwsMiddlewareStack as tower::Layer<S>>::Service;
///
/// fn layer(&self, inner: S) -> Self::Service {
/// base().service(inner)
/// }
/// }
/// ```
///
/// # Using a Client
///
/// Once you have a client set up, you can access the service's endpoints
/// by calling the appropriate method on [`Client`]. Each such method
/// returns a request builder for that endpoint, with methods for setting
/// the various fields of the request. Once your request is complete, use
/// the `send` method to send the request. `send` returns a future, which
/// you then have to `.await` to get the service's response.
///
/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#c-builder
/// [SigV4-signed requests]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
#[derive(std::fmt::Debug)]
pub struct Client<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<Handle<C, M, R>>,
}
impl<C, M, R> std::clone::Clone for Client<C, M, R> {
fn clone(&self) -> Self {
Self {
handle: self.handle.clone(),
}
}
}
#[doc(inline)]
pub use aws_smithy_client::Builder;
impl<C, M, R> From<aws_smithy_client::Client<C, M, R>> for Client<C, M, R> {
fn from(client: aws_smithy_client::Client<C, M, R>) -> Self {
Self::with_config(client, crate::Config::builder().build())
}
}
impl<C, M, R> Client<C, M, R> {
/// Creates a client with the given service configuration.
pub fn with_config(client: aws_smithy_client::Client<C, M, R>, conf: crate::Config) -> Self {
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
/// Returns the client's configuration.
pub fn conf(&self) -> &crate::Config {
&self.handle.conf
}
}
impl<C, M, R> Client<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Constructs a fluent builder for the [`CancelGameLink`](crate::client::fluent_builders::CancelGameLink) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_link_token(impl Into<String>)`](crate::client::fluent_builders::CancelGameLink::identity_link_token) / [`set_identity_link_token(Option<String>)`](crate::client::fluent_builders::CancelGameLink::set_identity_link_token): A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON.
/// - On success, responds with [`CancelGameLinkOutput`](crate::output::CancelGameLinkOutput)
/// - On failure, responds with [`SdkError<CancelGameLinkError>`](crate::error::CancelGameLinkError)
pub fn cancel_game_link(&self) -> fluent_builders::CancelGameLink<C, M, R> {
fluent_builders::CancelGameLink::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CompleteGameLink`](crate::client::fluent_builders::CompleteGameLink) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_link_token(impl Into<String>)`](crate::client::fluent_builders::CompleteGameLink::identity_link_token) / [`set_identity_link_token(Option<String>)`](crate::client::fluent_builders::CompleteGameLink::set_identity_link_token): A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON.
/// - On success, responds with [`CompleteGameLinkOutput`](crate::output::CompleteGameLinkOutput)
/// - On failure, responds with [`SdkError<CompleteGameLinkError>`](crate::error::CompleteGameLinkError)
pub fn complete_game_link(&self) -> fluent_builders::CompleteGameLink<C, M, R> {
fluent_builders::CompleteGameLink::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CompleteIdentityAvatarUpload`](crate::client::fluent_builders::CompleteIdentityAvatarUpload) operation.
///
/// - The fluent builder is configurable:
/// - [`upload_id(impl Into<String>)`](crate::client::fluent_builders::CompleteIdentityAvatarUpload::upload_id) / [`set_upload_id(Option<String>)`](crate::client::fluent_builders::CompleteIdentityAvatarUpload::set_upload_id): A universally unique identifier.
/// - On success, responds with [`CompleteIdentityAvatarUploadOutput`](crate::output::CompleteIdentityAvatarUploadOutput)
/// - On failure, responds with [`SdkError<CompleteIdentityAvatarUploadError>`](crate::error::CompleteIdentityAvatarUploadError)
pub fn complete_identity_avatar_upload(
&self,
) -> fluent_builders::CompleteIdentityAvatarUpload<C, M, R> {
fluent_builders::CompleteIdentityAvatarUpload::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`FollowIdentity`](crate::client::fluent_builders::FollowIdentity) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_id(impl Into<String>)`](crate::client::fluent_builders::FollowIdentity::identity_id) / [`set_identity_id(Option<String>)`](crate::client::fluent_builders::FollowIdentity::set_identity_id): A universally unique identifier.
/// - On success, responds with [`FollowIdentityOutput`](crate::output::FollowIdentityOutput)
/// - On failure, responds with [`SdkError<FollowIdentityError>`](crate::error::FollowIdentityError)
pub fn follow_identity(&self) -> fluent_builders::FollowIdentity<C, M, R> {
fluent_builders::FollowIdentity::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetGameLink`](crate::client::fluent_builders::GetGameLink) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_link_token(impl Into<String>)`](crate::client::fluent_builders::GetGameLink::identity_link_token) / [`set_identity_link_token(Option<String>)`](crate::client::fluent_builders::GetGameLink::set_identity_link_token): `identity_link_token` returned by `PrepareGameLink`.
/// - [`watch_index(impl Into<String>)`](crate::client::fluent_builders::GetGameLink::watch_index) / [`set_watch_index(Option<String>)`](crate::client::fluent_builders::GetGameLink::set_watch_index): A query parameter denoting the requests watch index.
/// - On success, responds with [`GetGameLinkOutput`](crate::output::GetGameLinkOutput) with field(s):
/// - [`status(Option<GameLinkStatus>)`](crate::output::GetGameLinkOutput::status): The link status between an identity and a game user.
/// - [`game(Option<GameHandle>)`](crate::output::GetGameLinkOutput::game): A game handle.
/// - [`current_identity(Option<IdentityHandle>)`](crate::output::GetGameLinkOutput::current_identity): The current game user identity which created this game link.
/// - [`new_identity(Option<GetGameLinkNewIdentity>)`](crate::output::GetGameLinkOutput::new_identity): If `status` is `GameLinkStatus$COMPLETE`, this will return the new identity and identity token to use for all future requests.
/// - [`watch(Option<WatchResponse>)`](crate::output::GetGameLinkOutput::watch): Provided by watchable endpoints used in blocking loops.
/// - On failure, responds with [`SdkError<GetGameLinkError>`](crate::error::GetGameLinkError)
pub fn get_game_link(&self) -> fluent_builders::GetGameLink<C, M, R> {
fluent_builders::GetGameLink::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetIdentityHandles`](crate::client::fluent_builders::GetIdentityHandles) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_ids(Vec<String>)`](crate::client::fluent_builders::GetIdentityHandles::identity_ids) / [`set_identity_ids(Option<Vec<String>>)`](crate::client::fluent_builders::GetIdentityHandles::set_identity_ids): A list of identity IDs.
/// - On success, responds with [`GetIdentityHandlesOutput`](crate::output::GetIdentityHandlesOutput) with field(s):
/// - [`identities(Option<Vec<IdentityHandle>>)`](crate::output::GetIdentityHandlesOutput::identities): A list of identity handles.
/// - On failure, responds with [`SdkError<GetIdentityHandlesError>`](crate::error::GetIdentityHandlesError)
pub fn get_identity_handles(&self) -> fluent_builders::GetIdentityHandles<C, M, R> {
fluent_builders::GetIdentityHandles::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetIdentityProfile`](crate::client::fluent_builders::GetIdentityProfile) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_id(impl Into<String>)`](crate::client::fluent_builders::GetIdentityProfile::identity_id) / [`set_identity_id(Option<String>)`](crate::client::fluent_builders::GetIdentityProfile::set_identity_id): A universally unique identifier.
/// - [`watch_index(impl Into<String>)`](crate::client::fluent_builders::GetIdentityProfile::watch_index) / [`set_watch_index(Option<String>)`](crate::client::fluent_builders::GetIdentityProfile::set_watch_index): A query parameter denoting the requests watch index.
/// - On success, responds with [`GetIdentityProfileOutput`](crate::output::GetIdentityProfileOutput) with field(s):
/// - [`identity(Option<IdentityProfile>)`](crate::output::GetIdentityProfileOutput::identity): An identity profile.
/// - [`watch(Option<WatchResponse>)`](crate::output::GetIdentityProfileOutput::watch): Provided by watchable endpoints used in blocking loops.
/// - On failure, responds with [`SdkError<GetIdentityProfileError>`](crate::error::GetIdentityProfileError)
pub fn get_identity_profile(&self) -> fluent_builders::GetIdentityProfile<C, M, R> {
fluent_builders::GetIdentityProfile::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetIdentitySelfProfile`](crate::client::fluent_builders::GetIdentitySelfProfile) operation.
///
/// - The fluent builder is configurable:
/// - [`watch_index(impl Into<String>)`](crate::client::fluent_builders::GetIdentitySelfProfile::watch_index) / [`set_watch_index(Option<String>)`](crate::client::fluent_builders::GetIdentitySelfProfile::set_watch_index): A query parameter denoting the requests watch index.
/// - On success, responds with [`GetIdentitySelfProfileOutput`](crate::output::GetIdentitySelfProfileOutput) with field(s):
/// - [`identity(Option<IdentityProfile>)`](crate::output::GetIdentitySelfProfileOutput::identity): An identity profile.
/// - [`watch(Option<WatchResponse>)`](crate::output::GetIdentitySelfProfileOutput::watch): Provided by watchable endpoints used in blocking loops.
/// - On failure, responds with [`SdkError<GetIdentitySelfProfileError>`](crate::error::GetIdentitySelfProfileError)
pub fn get_identity_self_profile(&self) -> fluent_builders::GetIdentitySelfProfile<C, M, R> {
fluent_builders::GetIdentitySelfProfile::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetIdentitySummaries`](crate::client::fluent_builders::GetIdentitySummaries) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_ids(Vec<String>)`](crate::client::fluent_builders::GetIdentitySummaries::identity_ids) / [`set_identity_ids(Option<Vec<String>>)`](crate::client::fluent_builders::GetIdentitySummaries::set_identity_ids): A list of identity IDs.
/// - On success, responds with [`GetIdentitySummariesOutput`](crate::output::GetIdentitySummariesOutput) with field(s):
/// - [`identities(Option<Vec<IdentitySummary>>)`](crate::output::GetIdentitySummariesOutput::identities): A list of identity summaries.
/// - On failure, responds with [`SdkError<GetIdentitySummariesError>`](crate::error::GetIdentitySummariesError)
pub fn get_identity_summaries(&self) -> fluent_builders::GetIdentitySummaries<C, M, R> {
fluent_builders::GetIdentitySummaries::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListActivities`](crate::client::fluent_builders::ListActivities) operation.
///
/// - The fluent builder is configurable:
/// - [`watch_index(impl Into<String>)`](crate::client::fluent_builders::ListActivities::watch_index) / [`set_watch_index(Option<String>)`](crate::client::fluent_builders::ListActivities::set_watch_index): A query parameter denoting the requests watch index.
/// - On success, responds with [`ListActivitiesOutput`](crate::output::ListActivitiesOutput) with field(s):
/// - [`identities(Option<Vec<IdentityHandle>>)`](crate::output::ListActivitiesOutput::identities): A list of identity handles.
/// - [`games(Option<Vec<GameHandle>>)`](crate::output::ListActivitiesOutput::games): A list of game handles.
/// - [`parties(Option<Vec<PartySummary>>)`](crate::output::ListActivitiesOutput::parties): A list of party summaries.
/// - [`suggested_groups(Option<Vec<GroupSummary>>)`](crate::output::ListActivitiesOutput::suggested_groups): A list of group summaries.
/// - [`suggested_players(Option<Vec<IdentityHandle>>)`](crate::output::ListActivitiesOutput::suggested_players): A list of identity handles.
/// - [`watch(Option<WatchResponse>)`](crate::output::ListActivitiesOutput::watch): Provided by watchable endpoints used in blocking loops.
/// - On failure, responds with [`SdkError<ListActivitiesError>`](crate::error::ListActivitiesError)
pub fn list_activities(&self) -> fluent_builders::ListActivities<C, M, R> {
fluent_builders::ListActivities::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListFollowers`](crate::client::fluent_builders::ListFollowers) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_id(impl Into<String>)`](crate::client::fluent_builders::ListFollowers::identity_id) / [`set_identity_id(Option<String>)`](crate::client::fluent_builders::ListFollowers::set_identity_id): A universally unique identifier.
/// - [`anchor(impl Into<String>)`](crate::client::fluent_builders::ListFollowers::anchor) / [`set_anchor(Option<String>)`](crate::client::fluent_builders::ListFollowers::set_anchor): (undocumented)
/// - [`limit(i32)`](crate::client::fluent_builders::ListFollowers::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::ListFollowers::set_limit): Unsigned 32 bit integer.
/// - On success, responds with [`ListFollowersOutput`](crate::output::ListFollowersOutput) with field(s):
/// - [`identities(Option<Vec<IdentityHandle>>)`](crate::output::ListFollowersOutput::identities): A list of identity handles.
/// - [`anchor(Option<String>)`](crate::output::ListFollowersOutput::anchor): (undocumented)
/// - On failure, responds with [`SdkError<ListFollowersError>`](crate::error::ListFollowersError)
pub fn list_followers(&self) -> fluent_builders::ListFollowers<C, M, R> {
fluent_builders::ListFollowers::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListFollowing`](crate::client::fluent_builders::ListFollowing) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_id(impl Into<String>)`](crate::client::fluent_builders::ListFollowing::identity_id) / [`set_identity_id(Option<String>)`](crate::client::fluent_builders::ListFollowing::set_identity_id): A universally unique identifier.
/// - [`anchor(impl Into<String>)`](crate::client::fluent_builders::ListFollowing::anchor) / [`set_anchor(Option<String>)`](crate::client::fluent_builders::ListFollowing::set_anchor): (undocumented)
/// - [`limit(i32)`](crate::client::fluent_builders::ListFollowing::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::ListFollowing::set_limit): Unsigned 32 bit integer.
/// - On success, responds with [`ListFollowingOutput`](crate::output::ListFollowingOutput) with field(s):
/// - [`identities(Option<Vec<IdentityHandle>>)`](crate::output::ListFollowingOutput::identities): A list of identity handles.
/// - [`anchor(Option<String>)`](crate::output::ListFollowingOutput::anchor): (undocumented)
/// - On failure, responds with [`SdkError<ListFollowingError>`](crate::error::ListFollowingError)
pub fn list_following(&self) -> fluent_builders::ListFollowing<C, M, R> {
fluent_builders::ListFollowing::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListFriends`](crate::client::fluent_builders::ListFriends) operation.
///
/// - The fluent builder is configurable:
/// - [`anchor(impl Into<String>)`](crate::client::fluent_builders::ListFriends::anchor) / [`set_anchor(Option<String>)`](crate::client::fluent_builders::ListFriends::set_anchor): (undocumented)
/// - [`limit(i32)`](crate::client::fluent_builders::ListFriends::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::ListFriends::set_limit): Unsigned 32 bit integer.
/// - On success, responds with [`ListFriendsOutput`](crate::output::ListFriendsOutput) with field(s):
/// - [`identities(Option<Vec<IdentityHandle>>)`](crate::output::ListFriendsOutput::identities): A list of identity handles.
/// - [`anchor(Option<String>)`](crate::output::ListFriendsOutput::anchor): (undocumented)
/// - On failure, responds with [`SdkError<ListFriendsError>`](crate::error::ListFriendsError)
pub fn list_friends(&self) -> fluent_builders::ListFriends<C, M, R> {
fluent_builders::ListFriends::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListMutualFriends`](crate::client::fluent_builders::ListMutualFriends) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_id(impl Into<String>)`](crate::client::fluent_builders::ListMutualFriends::identity_id) / [`set_identity_id(Option<String>)`](crate::client::fluent_builders::ListMutualFriends::set_identity_id): A universally unique identifier.
/// - [`anchor(impl Into<String>)`](crate::client::fluent_builders::ListMutualFriends::anchor) / [`set_anchor(Option<String>)`](crate::client::fluent_builders::ListMutualFriends::set_anchor): (undocumented)
/// - [`limit(i32)`](crate::client::fluent_builders::ListMutualFriends::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::ListMutualFriends::set_limit): Unsigned 32 bit integer.
/// - On success, responds with [`ListMutualFriendsOutput`](crate::output::ListMutualFriendsOutput) with field(s):
/// - [`identities(Option<Vec<IdentityHandle>>)`](crate::output::ListMutualFriendsOutput::identities): A list of identity handles.
/// - [`anchor(Option<String>)`](crate::output::ListMutualFriendsOutput::anchor): (undocumented)
/// - On failure, responds with [`SdkError<ListMutualFriendsError>`](crate::error::ListMutualFriendsError)
pub fn list_mutual_friends(&self) -> fluent_builders::ListMutualFriends<C, M, R> {
fluent_builders::ListMutualFriends::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`PrepareGameLink`](crate::client::fluent_builders::PrepareGameLink) operation.
///
/// - The fluent builder takes no input, just [`send`](crate::client::fluent_builders::PrepareGameLink::send) it.
/// - On success, responds with [`PrepareGameLinkOutput`](crate::output::PrepareGameLinkOutput) with field(s):
/// - [`identity_link_token(Option<String>)`](crate::output::PrepareGameLinkOutput::identity_link_token): Pass this to `rivet.api.identity#GetGameLink` to get the linking status. Valid for 15 minutes.
/// - [`identity_link_url(Option<String>)`](crate::output::PrepareGameLinkOutput::identity_link_url): The URL that the user should visit to link their Rivet account.
/// - [`expire_ts(Option<DateTime>)`](crate::output::PrepareGameLinkOutput::expire_ts): Timestamp (in milliseconds) at which the link will expire.
/// - On failure, responds with [`SdkError<PrepareGameLinkError>`](crate::error::PrepareGameLinkError)
pub fn prepare_game_link(&self) -> fluent_builders::PrepareGameLink<C, M, R> {
fluent_builders::PrepareGameLink::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`PrepareIdentityAvatarUpload`](crate::client::fluent_builders::PrepareIdentityAvatarUpload) operation.
///
/// - The fluent builder is configurable:
/// - [`path(impl Into<String>)`](crate::client::fluent_builders::PrepareIdentityAvatarUpload::path) / [`set_path(Option<String>)`](crate::client::fluent_builders::PrepareIdentityAvatarUpload::set_path): The path/filename of the identity avatar.
/// - [`mime(impl Into<String>)`](crate::client::fluent_builders::PrepareIdentityAvatarUpload::mime) / [`set_mime(Option<String>)`](crate::client::fluent_builders::PrepareIdentityAvatarUpload::set_mime): The MIME type of the identity avatar.
/// - [`content_length(i64)`](crate::client::fluent_builders::PrepareIdentityAvatarUpload::content_length) / [`set_content_length(Option<i64>)`](crate::client::fluent_builders::PrepareIdentityAvatarUpload::set_content_length): Unsigned 64 bit integer.
/// - On success, responds with [`PrepareIdentityAvatarUploadOutput`](crate::output::PrepareIdentityAvatarUploadOutput) with field(s):
/// - [`upload_id(Option<String>)`](crate::output::PrepareIdentityAvatarUploadOutput::upload_id): A universally unique identifier.
/// - [`presigned_request(Option<UploadPresignedRequest>)`](crate::output::PrepareIdentityAvatarUploadOutput::presigned_request): A presigned request used to upload files. Upload your file to the given URL via a PUT request.
/// - On failure, responds with [`SdkError<PrepareIdentityAvatarUploadError>`](crate::error::PrepareIdentityAvatarUploadError)
pub fn prepare_identity_avatar_upload(
&self,
) -> fluent_builders::PrepareIdentityAvatarUpload<C, M, R> {
fluent_builders::PrepareIdentityAvatarUpload::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`RemoveIdentityGameActivity`](crate::client::fluent_builders::RemoveIdentityGameActivity) operation.
///
/// - The fluent builder takes no input, just [`send`](crate::client::fluent_builders::RemoveIdentityGameActivity::send) it.
/// - On success, responds with [`RemoveIdentityGameActivityOutput`](crate::output::RemoveIdentityGameActivityOutput)
/// - On failure, responds with [`SdkError<RemoveIdentityGameActivityError>`](crate::error::RemoveIdentityGameActivityError)
pub fn remove_identity_game_activity(
&self,
) -> fluent_builders::RemoveIdentityGameActivity<C, M, R> {
fluent_builders::RemoveIdentityGameActivity::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ReportIdentity`](crate::client::fluent_builders::ReportIdentity) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_id(impl Into<String>)`](crate::client::fluent_builders::ReportIdentity::identity_id) / [`set_identity_id(Option<String>)`](crate::client::fluent_builders::ReportIdentity::set_identity_id): A universally unique identifier.
/// - [`reason(impl Into<String>)`](crate::client::fluent_builders::ReportIdentity::reason) / [`set_reason(Option<String>)`](crate::client::fluent_builders::ReportIdentity::set_reason): (undocumented)
/// - On success, responds with [`ReportIdentityOutput`](crate::output::ReportIdentityOutput)
/// - On failure, responds with [`SdkError<ReportIdentityError>`](crate::error::ReportIdentityError)
pub fn report_identity(&self) -> fluent_builders::ReportIdentity<C, M, R> {
fluent_builders::ReportIdentity::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`SearchIdentities`](crate::client::fluent_builders::SearchIdentities) operation.
///
/// - The fluent builder is configurable:
/// - [`query(impl Into<String>)`](crate::client::fluent_builders::SearchIdentities::query) / [`set_query(Option<String>)`](crate::client::fluent_builders::SearchIdentities::set_query): The query to match identity display names and account numbers against.
/// - [`anchor(impl Into<String>)`](crate::client::fluent_builders::SearchIdentities::anchor) / [`set_anchor(Option<String>)`](crate::client::fluent_builders::SearchIdentities::set_anchor): How many identities to offset the search by.
/// - [`limit(i32)`](crate::client::fluent_builders::SearchIdentities::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::SearchIdentities::set_limit): Amount of identities to return.
/// - On success, responds with [`SearchIdentitiesOutput`](crate::output::SearchIdentitiesOutput) with field(s):
/// - [`identities(Option<Vec<IdentityHandle>>)`](crate::output::SearchIdentitiesOutput::identities): A list of identity handles.
/// - [`anchor(Option<String>)`](crate::output::SearchIdentitiesOutput::anchor): The pagination anchor.
/// - On failure, responds with [`SdkError<SearchIdentitiesError>`](crate::error::SearchIdentitiesError)
pub fn search_identities(&self) -> fluent_builders::SearchIdentities<C, M, R> {
fluent_builders::SearchIdentities::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`SetIdentityGameActivity`](crate::client::fluent_builders::SetIdentityGameActivity) operation.
///
/// - The fluent builder is configurable:
/// - [`game_activity(UpdateIdentityGameActivity)`](crate::client::fluent_builders::SetIdentityGameActivity::game_activity) / [`set_game_activity(Option<UpdateIdentityGameActivity>)`](crate::client::fluent_builders::SetIdentityGameActivity::set_game_activity): Information about the identity's current game. This is information that all other identities can see about what the current identity is doing.
/// - On success, responds with [`SetIdentityGameActivityOutput`](crate::output::SetIdentityGameActivityOutput)
/// - On failure, responds with [`SdkError<SetIdentityGameActivityError>`](crate::error::SetIdentityGameActivityError)
pub fn set_identity_game_activity(&self) -> fluent_builders::SetIdentityGameActivity<C, M, R> {
fluent_builders::SetIdentityGameActivity::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`SetupIdentity`](crate::client::fluent_builders::SetupIdentity) operation.
///
/// - The fluent builder is configurable:
/// - [`existing_identity_token(impl Into<String>)`](crate::client::fluent_builders::SetupIdentity::existing_identity_token) / [`set_existing_identity_token(Option<String>)`](crate::client::fluent_builders::SetupIdentity::set_existing_identity_token): Token returned from previous call to `rivet.api.identity#SetupIdentity`. If this token is invalid, a new identity will be returned.
/// - On success, responds with [`SetupIdentityOutput`](crate::output::SetupIdentityOutput) with field(s):
/// - [`identity_token(Option<String>)`](crate::output::SetupIdentityOutput::identity_token): Token used to authenticate the identity. Should be stored somewhere permanent. Pass this to `rivet.api.identity#SetupIdentity$existing_identity_token` next time `rivet.api.identity#SetupIdentity` is called. Token has a 90 day TTL. This means that if `rivet.api.identity#SetupIdentity` is not called again within 90 days, the token will no longer be valid. If this happens, the user can recover their account through the linking process (see `rivet.api.identity#PrepareGameLink`). This token should be stored locally and never sent to a server or another device. If this token is comprimised, anyone with access to this token has control of the identity.
/// - [`identity_token_expire_ts(Option<DateTime>)`](crate::output::SetupIdentityOutput::identity_token_expire_ts): Timestamp (in milliseconds) at which the token expires.
/// - [`identity(Option<IdentityProfile>)`](crate::output::SetupIdentityOutput::identity): Information about the identity that was just authenticated.
/// - [`game_id(Option<String>)`](crate::output::SetupIdentityOutput::game_id): A universally unique identifier.
/// - On failure, responds with [`SdkError<SetupIdentityError>`](crate::error::SetupIdentityError)
pub fn setup_identity(&self) -> fluent_builders::SetupIdentity<C, M, R> {
fluent_builders::SetupIdentity::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`SignupForBeta`](crate::client::fluent_builders::SignupForBeta) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::SignupForBeta::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::SignupForBeta::set_name): (undocumented)
/// - [`company_name(impl Into<String>)`](crate::client::fluent_builders::SignupForBeta::company_name) / [`set_company_name(Option<String>)`](crate::client::fluent_builders::SignupForBeta::set_company_name): (undocumented)
/// - [`company_size(impl Into<String>)`](crate::client::fluent_builders::SignupForBeta::company_size) / [`set_company_size(Option<String>)`](crate::client::fluent_builders::SignupForBeta::set_company_size): (undocumented)
/// - [`preferred_tools(impl Into<String>)`](crate::client::fluent_builders::SignupForBeta::preferred_tools) / [`set_preferred_tools(Option<String>)`](crate::client::fluent_builders::SignupForBeta::set_preferred_tools): (undocumented)
/// - [`goals(impl Into<String>)`](crate::client::fluent_builders::SignupForBeta::goals) / [`set_goals(Option<String>)`](crate::client::fluent_builders::SignupForBeta::set_goals): (undocumented)
/// - On success, responds with [`SignupForBetaOutput`](crate::output::SignupForBetaOutput)
/// - On failure, responds with [`SdkError<SignupForBetaError>`](crate::error::SignupForBetaError)
pub fn signup_for_beta(&self) -> fluent_builders::SignupForBeta<C, M, R> {
fluent_builders::SignupForBeta::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UnfollowIdentity`](crate::client::fluent_builders::UnfollowIdentity) operation.
///
/// - The fluent builder is configurable:
/// - [`identity_id(impl Into<String>)`](crate::client::fluent_builders::UnfollowIdentity::identity_id) / [`set_identity_id(Option<String>)`](crate::client::fluent_builders::UnfollowIdentity::set_identity_id): A universally unique identifier.
/// - On success, responds with [`UnfollowIdentityOutput`](crate::output::UnfollowIdentityOutput)
/// - On failure, responds with [`SdkError<UnfollowIdentityError>`](crate::error::UnfollowIdentityError)
pub fn unfollow_identity(&self) -> fluent_builders::UnfollowIdentity<C, M, R> {
fluent_builders::UnfollowIdentity::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateIdentityProfile`](crate::client::fluent_builders::UpdateIdentityProfile) operation.
///
/// - The fluent builder is configurable:
/// - [`display_name(impl Into<String>)`](crate::client::fluent_builders::UpdateIdentityProfile::display_name) / [`set_display_name(Option<String>)`](crate::client::fluent_builders::UpdateIdentityProfile::set_display_name): Represent a resource's readable display name.
/// - [`account_number(i32)`](crate::client::fluent_builders::UpdateIdentityProfile::account_number) / [`set_account_number(Option<i32>)`](crate::client::fluent_builders::UpdateIdentityProfile::set_account_number): Identity profile account number (#1234). These are assigned in addition to an identity's display name in order to allow multiple identities to have the same display name while still providing a unique handle. These are unique to each display name; you can have multiple accounts with different display names and the same account number.
/// - [`bio(impl Into<String>)`](crate::client::fluent_builders::UpdateIdentityProfile::bio) / [`set_bio(Option<String>)`](crate::client::fluent_builders::UpdateIdentityProfile::set_bio): Detailed information about a profile.
/// - On success, responds with [`UpdateIdentityProfileOutput`](crate::output::UpdateIdentityProfileOutput)
/// - On failure, responds with [`SdkError<UpdateIdentityProfileError>`](crate::error::UpdateIdentityProfileError)
pub fn update_identity_profile(&self) -> fluent_builders::UpdateIdentityProfile<C, M, R> {
fluent_builders::UpdateIdentityProfile::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateIdentityStatus`](crate::client::fluent_builders::UpdateIdentityStatus) operation.
///
/// - The fluent builder is configurable:
/// - [`status(IdentityStatus)`](crate::client::fluent_builders::UpdateIdentityStatus::status) / [`set_status(Option<IdentityStatus>)`](crate::client::fluent_builders::UpdateIdentityStatus::set_status): The current status of an identity. This helps players understand if another player is currently playing or has their game in the background.
/// - On success, responds with [`UpdateIdentityStatusOutput`](crate::output::UpdateIdentityStatusOutput)
/// - On failure, responds with [`SdkError<UpdateIdentityStatusError>`](crate::error::UpdateIdentityStatusError)
pub fn update_identity_status(&self) -> fluent_builders::UpdateIdentityStatus<C, M, R> {
fluent_builders::UpdateIdentityStatus::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ValidateIdentityProfile`](crate::client::fluent_builders::ValidateIdentityProfile) operation.
///
/// - The fluent builder is configurable:
/// - [`display_name(impl Into<String>)`](crate::client::fluent_builders::ValidateIdentityProfile::display_name) / [`set_display_name(Option<String>)`](crate::client::fluent_builders::ValidateIdentityProfile::set_display_name): Represent a resource's readable display name.
/// - [`account_number(i32)`](crate::client::fluent_builders::ValidateIdentityProfile::account_number) / [`set_account_number(Option<i32>)`](crate::client::fluent_builders::ValidateIdentityProfile::set_account_number): Identity profile account number (#1234). These are assigned in addition to an identity's display name in order to allow multiple identities to have the same display name while still providing a unique handle. These are unique to each display name; you can have multiple accounts with different display names and the same account number.
/// - [`bio(impl Into<String>)`](crate::client::fluent_builders::ValidateIdentityProfile::bio) / [`set_bio(Option<String>)`](crate::client::fluent_builders::ValidateIdentityProfile::set_bio): Detailed information about a profile.
/// - On success, responds with [`ValidateIdentityProfileOutput`](crate::output::ValidateIdentityProfileOutput) with field(s):
/// - [`errors(Option<Vec<ValidationError>>)`](crate::output::ValidateIdentityProfileOutput::errors): A list of validation errors.
/// - On failure, responds with [`SdkError<ValidateIdentityProfileError>`](crate::error::ValidateIdentityProfileError)
pub fn validate_identity_profile(&self) -> fluent_builders::ValidateIdentityProfile<C, M, R> {
fluent_builders::ValidateIdentityProfile::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`WatchEvents`](crate::client::fluent_builders::WatchEvents) operation.
///
/// - The fluent builder is configurable:
/// - [`watch_index(impl Into<String>)`](crate::client::fluent_builders::WatchEvents::watch_index) / [`set_watch_index(Option<String>)`](crate::client::fluent_builders::WatchEvents::set_watch_index): A query parameter denoting the requests watch index.
/// - On success, responds with [`WatchEventsOutput`](crate::output::WatchEventsOutput) with field(s):
/// - [`events(Option<Vec<GlobalEvent>>)`](crate::output::WatchEventsOutput::events): A list of global events. Ordered old to new.
/// - [`watch(Option<WatchResponse>)`](crate::output::WatchEventsOutput::watch): Provided by watchable endpoints used in blocking loops.
/// - On failure, responds with [`SdkError<WatchEventsError>`](crate::error::WatchEventsError)
pub fn watch_events(&self) -> fluent_builders::WatchEvents<C, M, R> {
fluent_builders::WatchEvents::new(self.handle.clone())
}
}
pub mod fluent_builders {
//!
//! Utilities to ergonomically construct a request to the service.
//!
//! Fluent builders are created through the [`Client`](crate::client::Client) by calling
//! one if its operation methods. After parameters are set using the builder methods,
//! the `send` method can be called to initiate the request.
//!
/// Fluent builder constructing a request to `CancelGameLink`.
///
/// Cancels a game link. It can no longer be used to link after cancellation.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CancelGameLink<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::cancel_game_link_input::Builder,
}
impl<C, M, R> CancelGameLink<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CancelGameLink`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CancelGameLinkOutput,
aws_smithy_http::result::SdkError<crate::error::CancelGameLinkError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CancelGameLinkInputOperationOutputAlias,
crate::output::CancelGameLinkOutput,
crate::error::CancelGameLinkError,
crate::input::CancelGameLinkInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON.
pub fn identity_link_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_link_token(input.into());
self
}
/// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON.
pub fn set_identity_link_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_identity_link_token(input);
self
}
}
/// Fluent builder constructing a request to `CompleteGameLink`.
///
/// Completes a game link process and returns whether or not the link is valid.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CompleteGameLink<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::complete_game_link_input::Builder,
}
impl<C, M, R> CompleteGameLink<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CompleteGameLink`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CompleteGameLinkOutput,
aws_smithy_http::result::SdkError<crate::error::CompleteGameLinkError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CompleteGameLinkInputOperationOutputAlias,
crate::output::CompleteGameLinkOutput,
crate::error::CompleteGameLinkError,
crate::input::CompleteGameLinkInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON.
pub fn identity_link_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_link_token(input.into());
self
}
/// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON.
pub fn set_identity_link_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_identity_link_token(input);
self
}
}
/// Fluent builder constructing a request to `CompleteIdentityAvatarUpload`.
///
/// Completes an avatar image upload. Must be called after the file upload process completes.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CompleteIdentityAvatarUpload<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::complete_identity_avatar_upload_input::Builder,
}
impl<C, M, R> CompleteIdentityAvatarUpload<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CompleteIdentityAvatarUpload`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CompleteIdentityAvatarUploadOutput,
aws_smithy_http::result::SdkError<crate::error::CompleteIdentityAvatarUploadError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CompleteIdentityAvatarUploadInputOperationOutputAlias,
crate::output::CompleteIdentityAvatarUploadOutput,
crate::error::CompleteIdentityAvatarUploadError,
crate::input::CompleteIdentityAvatarUploadInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A universally unique identifier.
pub fn upload_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.upload_id(input.into());
self
}
/// A universally unique identifier.
pub fn set_upload_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_upload_id(input);
self
}
}
/// Fluent builder constructing a request to `FollowIdentity`.
///
/// Follows the given identity. In order for identities to be "friends", the other identity has to also follow this identity.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct FollowIdentity<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::follow_identity_input::Builder,
}
impl<C, M, R> FollowIdentity<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `FollowIdentity`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::FollowIdentityOutput,
aws_smithy_http::result::SdkError<crate::error::FollowIdentityError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::FollowIdentityInputOperationOutputAlias,
crate::output::FollowIdentityOutput,
crate::error::FollowIdentityError,
crate::input::FollowIdentityInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A universally unique identifier.
pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_id(input.into());
self
}
/// A universally unique identifier.
pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_identity_id(input);
self
}
}
/// Fluent builder constructing a request to `GetGameLink`.
///
/// Returns the current status of a linking process. Once `status` is `complete`, the identity's profile should be fetched again since they may have switched accounts.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetGameLink<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_game_link_input::Builder,
}
impl<C, M, R> GetGameLink<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetGameLink`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetGameLinkOutput,
aws_smithy_http::result::SdkError<crate::error::GetGameLinkError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetGameLinkInputOperationOutputAlias,
crate::output::GetGameLinkOutput,
crate::error::GetGameLinkError,
crate::input::GetGameLinkInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// `identity_link_token` returned by `PrepareGameLink`.
pub fn identity_link_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_link_token(input.into());
self
}
/// `identity_link_token` returned by `PrepareGameLink`.
pub fn set_identity_link_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_identity_link_token(input);
self
}
/// A query parameter denoting the requests watch index.
pub fn watch_index(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.watch_index(input.into());
self
}
/// A query parameter denoting the requests watch index.
pub fn set_watch_index(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_watch_index(input);
self
}
}
/// Fluent builder constructing a request to `GetIdentityHandles`.
///
/// Fetches a list of identity handles.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetIdentityHandles<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_identity_handles_input::Builder,
}
impl<C, M, R> GetIdentityHandles<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetIdentityHandles`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetIdentityHandlesOutput,
aws_smithy_http::result::SdkError<crate::error::GetIdentityHandlesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetIdentityHandlesInputOperationOutputAlias,
crate::output::GetIdentityHandlesOutput,
crate::error::GetIdentityHandlesError,
crate::input::GetIdentityHandlesInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `identity_ids`.
///
/// To override the contents of this collection use [`set_identity_ids`](Self::set_identity_ids).
///
/// A list of identity IDs.
pub fn identity_ids(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_ids(input.into());
self
}
/// A list of identity IDs.
pub fn set_identity_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_identity_ids(input);
self
}
}
/// Fluent builder constructing a request to `GetIdentityProfile`.
///
/// Fetches an identity profile.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetIdentityProfile<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_identity_profile_input::Builder,
}
impl<C, M, R> GetIdentityProfile<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetIdentityProfile`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetIdentityProfileOutput,
aws_smithy_http::result::SdkError<crate::error::GetIdentityProfileError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetIdentityProfileInputOperationOutputAlias,
crate::output::GetIdentityProfileOutput,
crate::error::GetIdentityProfileError,
crate::input::GetIdentityProfileInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A universally unique identifier.
pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_id(input.into());
self
}
/// A universally unique identifier.
pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_identity_id(input);
self
}
/// A query parameter denoting the requests watch index.
pub fn watch_index(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.watch_index(input.into());
self
}
/// A query parameter denoting the requests watch index.
pub fn set_watch_index(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_watch_index(input);
self
}
}
/// Fluent builder constructing a request to `GetIdentitySelfProfile`.
///
/// Fetches the current identity's profile.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetIdentitySelfProfile<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_identity_self_profile_input::Builder,
}
impl<C, M, R> GetIdentitySelfProfile<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetIdentitySelfProfile`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetIdentitySelfProfileOutput,
aws_smithy_http::result::SdkError<crate::error::GetIdentitySelfProfileError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetIdentitySelfProfileInputOperationOutputAlias,
crate::output::GetIdentitySelfProfileOutput,
crate::error::GetIdentitySelfProfileError,
crate::input::GetIdentitySelfProfileInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A query parameter denoting the requests watch index.
pub fn watch_index(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.watch_index(input.into());
self
}
/// A query parameter denoting the requests watch index.
pub fn set_watch_index(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_watch_index(input);
self
}
}
/// Fluent builder constructing a request to `GetIdentitySummaries`.
///
/// Fetches a list of identity summaries.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetIdentitySummaries<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::get_identity_summaries_input::Builder,
}
impl<C, M, R> GetIdentitySummaries<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `GetIdentitySummaries`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetIdentitySummariesOutput,
aws_smithy_http::result::SdkError<crate::error::GetIdentitySummariesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::GetIdentitySummariesInputOperationOutputAlias,
crate::output::GetIdentitySummariesOutput,
crate::error::GetIdentitySummariesError,
crate::input::GetIdentitySummariesInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `identity_ids`.
///
/// To override the contents of this collection use [`set_identity_ids`](Self::set_identity_ids).
///
/// A list of identity IDs.
pub fn identity_ids(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_ids(input.into());
self
}
/// A list of identity IDs.
pub fn set_identity_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_identity_ids(input);
self
}
}
/// Fluent builder constructing a request to `ListActivities`.
///
/// Returns an overview of all players currently online or in game.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListActivities<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::list_activities_input::Builder,
}
impl<C, M, R> ListActivities<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ListActivities`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListActivitiesOutput,
aws_smithy_http::result::SdkError<crate::error::ListActivitiesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListActivitiesInputOperationOutputAlias,
crate::output::ListActivitiesOutput,
crate::error::ListActivitiesError,
crate::input::ListActivitiesInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A query parameter denoting the requests watch index.
pub fn watch_index(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.watch_index(input.into());
self
}
/// A query parameter denoting the requests watch index.
pub fn set_watch_index(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_watch_index(input);
self
}
}
/// Fluent builder constructing a request to `ListFollowers`.
///
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListFollowers<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::list_followers_input::Builder,
}
impl<C, M, R> ListFollowers<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ListFollowers`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListFollowersOutput,
aws_smithy_http::result::SdkError<crate::error::ListFollowersError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListFollowersInputOperationOutputAlias,
crate::output::ListFollowersOutput,
crate::error::ListFollowersError,
crate::input::ListFollowersInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A universally unique identifier.
pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_id(input.into());
self
}
/// A universally unique identifier.
pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_identity_id(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn anchor(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.anchor(input.into());
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_anchor(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_anchor(input);
self
}
/// Unsigned 32 bit integer.
pub fn limit(mut self, input: i32) -> Self {
self.inner = self.inner.limit(input);
self
}
/// Unsigned 32 bit integer.
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_limit(input);
self
}
}
/// Fluent builder constructing a request to `ListFollowing`.
///
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListFollowing<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::list_following_input::Builder,
}
impl<C, M, R> ListFollowing<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ListFollowing`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListFollowingOutput,
aws_smithy_http::result::SdkError<crate::error::ListFollowingError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListFollowingInputOperationOutputAlias,
crate::output::ListFollowingOutput,
crate::error::ListFollowingError,
crate::input::ListFollowingInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A universally unique identifier.
pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_id(input.into());
self
}
/// A universally unique identifier.
pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_identity_id(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn anchor(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.anchor(input.into());
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_anchor(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_anchor(input);
self
}
/// Unsigned 32 bit integer.
pub fn limit(mut self, input: i32) -> Self {
self.inner = self.inner.limit(input);
self
}
/// Unsigned 32 bit integer.
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_limit(input);
self
}
}
/// Fluent builder constructing a request to `ListFriends`.
///
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListFriends<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::list_friends_input::Builder,
}
impl<C, M, R> ListFriends<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ListFriends`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListFriendsOutput,
aws_smithy_http::result::SdkError<crate::error::ListFriendsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListFriendsInputOperationOutputAlias,
crate::output::ListFriendsOutput,
crate::error::ListFriendsError,
crate::input::ListFriendsInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
#[allow(missing_docs)] // documentation missing in model
pub fn anchor(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.anchor(input.into());
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_anchor(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_anchor(input);
self
}
/// Unsigned 32 bit integer.
pub fn limit(mut self, input: i32) -> Self {
self.inner = self.inner.limit(input);
self
}
/// Unsigned 32 bit integer.
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_limit(input);
self
}
}
/// Fluent builder constructing a request to `ListMutualFriends`.
///
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListMutualFriends<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::list_mutual_friends_input::Builder,
}
impl<C, M, R> ListMutualFriends<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ListMutualFriends`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListMutualFriendsOutput,
aws_smithy_http::result::SdkError<crate::error::ListMutualFriendsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListMutualFriendsInputOperationOutputAlias,
crate::output::ListMutualFriendsOutput,
crate::error::ListMutualFriendsError,
crate::input::ListMutualFriendsInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A universally unique identifier.
pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_id(input.into());
self
}
/// A universally unique identifier.
pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_identity_id(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn anchor(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.anchor(input.into());
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_anchor(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_anchor(input);
self
}
/// Unsigned 32 bit integer.
pub fn limit(mut self, input: i32) -> Self {
self.inner = self.inner.limit(input);
self
}
/// Unsigned 32 bit integer.
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_limit(input);
self
}
}
/// Fluent builder constructing a request to `PrepareGameLink`.
///
/// Begins the process for linking an identity with the Rivet Hub. # Importance of Linking Identities When an identity is created via `rivet.api.identity#SetupIdentity`, the identity is temporary and is not shared with other games the user plays. In order to make the identity permanent and synchronize the identity with other games, the identity must be linked with the hub. # Linking Process The linking process works by opening `identity_link_url` in a browser then polling `rivet.api.identity#GetGameLink` to wait for it to complete. This is designed to be as flexible as possible so `identity_link_url` can be opened on any device. For example, when playing a console game, the user can scan a QR code for `identity_link_url` to authenticate on their phone.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct PrepareGameLink<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::prepare_game_link_input::Builder,
}
impl<C, M, R> PrepareGameLink<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `PrepareGameLink`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PrepareGameLinkOutput,
aws_smithy_http::result::SdkError<crate::error::PrepareGameLinkError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::PrepareGameLinkInputOperationOutputAlias,
crate::output::PrepareGameLinkOutput,
crate::error::PrepareGameLinkError,
crate::input::PrepareGameLinkInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
}
/// Fluent builder constructing a request to `PrepareIdentityAvatarUpload`.
///
/// Prepares an avatar image upload. Complete upload with `rivet.api.identity#CompleteIdentityAvatarUpload`.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct PrepareIdentityAvatarUpload<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::prepare_identity_avatar_upload_input::Builder,
}
impl<C, M, R> PrepareIdentityAvatarUpload<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `PrepareIdentityAvatarUpload`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PrepareIdentityAvatarUploadOutput,
aws_smithy_http::result::SdkError<crate::error::PrepareIdentityAvatarUploadError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::PrepareIdentityAvatarUploadInputOperationOutputAlias,
crate::output::PrepareIdentityAvatarUploadOutput,
crate::error::PrepareIdentityAvatarUploadError,
crate::input::PrepareIdentityAvatarUploadInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// The path/filename of the identity avatar.
pub fn path(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.path(input.into());
self
}
/// The path/filename of the identity avatar.
pub fn set_path(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_path(input);
self
}
/// The MIME type of the identity avatar.
pub fn mime(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.mime(input.into());
self
}
/// The MIME type of the identity avatar.
pub fn set_mime(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_mime(input);
self
}
/// Unsigned 64 bit integer.
pub fn content_length(mut self, input: i64) -> Self {
self.inner = self.inner.content_length(input);
self
}
/// Unsigned 64 bit integer.
pub fn set_content_length(mut self, input: std::option::Option<i64>) -> Self {
self.inner = self.inner.set_content_length(input);
self
}
}
/// Fluent builder constructing a request to `RemoveIdentityGameActivity`.
///
/// Removes the current identity's game activity.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct RemoveIdentityGameActivity<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::remove_identity_game_activity_input::Builder,
}
impl<C, M, R> RemoveIdentityGameActivity<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `RemoveIdentityGameActivity`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RemoveIdentityGameActivityOutput,
aws_smithy_http::result::SdkError<crate::error::RemoveIdentityGameActivityError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::RemoveIdentityGameActivityInputOperationOutputAlias,
crate::output::RemoveIdentityGameActivityOutput,
crate::error::RemoveIdentityGameActivityError,
crate::input::RemoveIdentityGameActivityInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
}
/// Fluent builder constructing a request to `ReportIdentity`.
///
/// Creates an abuse report for an identity.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ReportIdentity<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::report_identity_input::Builder,
}
impl<C, M, R> ReportIdentity<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ReportIdentity`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ReportIdentityOutput,
aws_smithy_http::result::SdkError<crate::error::ReportIdentityError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ReportIdentityInputOperationOutputAlias,
crate::output::ReportIdentityOutput,
crate::error::ReportIdentityError,
crate::input::ReportIdentityInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A universally unique identifier.
pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_id(input.into());
self
}
/// A universally unique identifier.
pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_identity_id(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn reason(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.reason(input.into());
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_reason(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_reason(input);
self
}
}
/// Fluent builder constructing a request to `SearchIdentities`.
///
/// Fuzzy search for identities.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct SearchIdentities<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::search_identities_input::Builder,
}
impl<C, M, R> SearchIdentities<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `SearchIdentities`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SearchIdentitiesOutput,
aws_smithy_http::result::SdkError<crate::error::SearchIdentitiesError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::SearchIdentitiesInputOperationOutputAlias,
crate::output::SearchIdentitiesOutput,
crate::error::SearchIdentitiesError,
crate::input::SearchIdentitiesInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// The query to match identity display names and account numbers against.
pub fn query(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.query(input.into());
self
}
/// The query to match identity display names and account numbers against.
pub fn set_query(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_query(input);
self
}
/// How many identities to offset the search by.
pub fn anchor(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.anchor(input.into());
self
}
/// How many identities to offset the search by.
pub fn set_anchor(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_anchor(input);
self
}
/// Amount of identities to return.
pub fn limit(mut self, input: i32) -> Self {
self.inner = self.inner.limit(input);
self
}
/// Amount of identities to return.
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_limit(input);
self
}
}
/// Fluent builder constructing a request to `SetIdentityGameActivity`.
///
/// Sets the current identity's game activity. This activity will automatically be removed when the identity goes offline.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct SetIdentityGameActivity<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::set_identity_game_activity_input::Builder,
}
impl<C, M, R> SetIdentityGameActivity<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `SetIdentityGameActivity`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SetIdentityGameActivityOutput,
aws_smithy_http::result::SdkError<crate::error::SetIdentityGameActivityError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::SetIdentityGameActivityInputOperationOutputAlias,
crate::output::SetIdentityGameActivityOutput,
crate::error::SetIdentityGameActivityError,
crate::input::SetIdentityGameActivityInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Information about the identity's current game. This is information that all other identities can see about what the current identity is doing.
pub fn game_activity(mut self, input: crate::model::UpdateIdentityGameActivity) -> Self {
self.inner = self.inner.game_activity(input);
self
}
/// Information about the identity's current game. This is information that all other identities can see about what the current identity is doing.
pub fn set_game_activity(
mut self,
input: std::option::Option<crate::model::UpdateIdentityGameActivity>,
) -> Self {
self.inner = self.inner.set_game_activity(input);
self
}
}
/// Fluent builder constructing a request to `SetupIdentity`.
///
/// Gets or creates an identity. Passing an existing identity token in the body refreshes the token. # Temporary Accounts Until the identity is linked with the Rivet Hub (see `rivet.api.identity#PrepareGameLink`), this identity will be temporary but still behave like all other identities. This is intended to allow users to play the game without signing up while still having the benefits of having an account. When they are ready to save their account, they should be instructed to link their account (see `rivet.api.identity#PrepareGameLink`). # Storing Token `identity_token` should be stored in some form of persistent storage. The token should be read from storage and passed to `rivet.api.identity#SetupIdentity` every time the client starts.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct SetupIdentity<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::setup_identity_input::Builder,
}
impl<C, M, R> SetupIdentity<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `SetupIdentity`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SetupIdentityOutput,
aws_smithy_http::result::SdkError<crate::error::SetupIdentityError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::SetupIdentityInputOperationOutputAlias,
crate::output::SetupIdentityOutput,
crate::error::SetupIdentityError,
crate::input::SetupIdentityInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Token returned from previous call to `rivet.api.identity#SetupIdentity`. If this token is invalid, a new identity will be returned.
pub fn existing_identity_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.existing_identity_token(input.into());
self
}
/// Token returned from previous call to `rivet.api.identity#SetupIdentity`. If this token is invalid, a new identity will be returned.
pub fn set_existing_identity_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_existing_identity_token(input);
self
}
}
/// Fluent builder constructing a request to `SignupForBeta`.
///
/// Submits a beta signup form.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct SignupForBeta<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::signup_for_beta_input::Builder,
}
impl<C, M, R> SignupForBeta<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `SignupForBeta`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SignupForBetaOutput,
aws_smithy_http::result::SdkError<crate::error::SignupForBetaError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::SignupForBetaInputOperationOutputAlias,
crate::output::SignupForBetaOutput,
crate::error::SignupForBetaError,
crate::input::SignupForBetaInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
#[allow(missing_docs)] // documentation missing in model
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn company_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.company_name(input.into());
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_company_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_company_name(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn company_size(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.company_size(input.into());
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_company_size(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_company_size(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn preferred_tools(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.preferred_tools(input.into());
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_preferred_tools(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_preferred_tools(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn goals(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.goals(input.into());
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_goals(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_goals(input);
self
}
}
/// Fluent builder constructing a request to `UnfollowIdentity`.
///
/// Unfollows the given identity.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UnfollowIdentity<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::unfollow_identity_input::Builder,
}
impl<C, M, R> UnfollowIdentity<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `UnfollowIdentity`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UnfollowIdentityOutput,
aws_smithy_http::result::SdkError<crate::error::UnfollowIdentityError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::UnfollowIdentityInputOperationOutputAlias,
crate::output::UnfollowIdentityOutput,
crate::error::UnfollowIdentityError,
crate::input::UnfollowIdentityInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A universally unique identifier.
pub fn identity_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.identity_id(input.into());
self
}
/// A universally unique identifier.
pub fn set_identity_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_identity_id(input);
self
}
}
/// Fluent builder constructing a request to `UpdateIdentityProfile`.
///
/// Updates profile of the current identity.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateIdentityProfile<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::update_identity_profile_input::Builder,
}
impl<C, M, R> UpdateIdentityProfile<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `UpdateIdentityProfile`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UpdateIdentityProfileOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateIdentityProfileError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::UpdateIdentityProfileInputOperationOutputAlias,
crate::output::UpdateIdentityProfileOutput,
crate::error::UpdateIdentityProfileError,
crate::input::UpdateIdentityProfileInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Represent a resource's readable display name.
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.display_name(input.into());
self
}
/// Represent a resource's readable display name.
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_display_name(input);
self
}
/// Identity profile account number (#1234). These are assigned in addition to an identity's display name in order to allow multiple identities to have the same display name while still providing a unique handle. These are unique to each display name; you can have multiple accounts with different display names and the same account number.
pub fn account_number(mut self, input: i32) -> Self {
self.inner = self.inner.account_number(input);
self
}
/// Identity profile account number (#1234). These are assigned in addition to an identity's display name in order to allow multiple identities to have the same display name while still providing a unique handle. These are unique to each display name; you can have multiple accounts with different display names and the same account number.
pub fn set_account_number(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_account_number(input);
self
}
/// Detailed information about a profile.
pub fn bio(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.bio(input.into());
self
}
/// Detailed information about a profile.
pub fn set_bio(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_bio(input);
self
}
}
/// Fluent builder constructing a request to `UpdateIdentityStatus`.
///
/// Updates the current identity's status.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateIdentityStatus<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::update_identity_status_input::Builder,
}
impl<C, M, R> UpdateIdentityStatus<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `UpdateIdentityStatus`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UpdateIdentityStatusOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateIdentityStatusError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::UpdateIdentityStatusInputOperationOutputAlias,
crate::output::UpdateIdentityStatusOutput,
crate::error::UpdateIdentityStatusError,
crate::input::UpdateIdentityStatusInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// The current status of an identity. This helps players understand if another player is currently playing or has their game in the background.
pub fn status(mut self, input: crate::model::IdentityStatus) -> Self {
self.inner = self.inner.status(input);
self
}
/// The current status of an identity. This helps players understand if another player is currently playing or has their game in the background.
pub fn set_status(
mut self,
input: std::option::Option<crate::model::IdentityStatus>,
) -> Self {
self.inner = self.inner.set_status(input);
self
}
}
/// Fluent builder constructing a request to `ValidateIdentityProfile`.
///
/// Validate contents of identity profile. Use to provide immediate feedback on profile changes before committing them.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ValidateIdentityProfile<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::validate_identity_profile_input::Builder,
}
impl<C, M, R> ValidateIdentityProfile<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ValidateIdentityProfile`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ValidateIdentityProfileOutput,
aws_smithy_http::result::SdkError<crate::error::ValidateIdentityProfileError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ValidateIdentityProfileInputOperationOutputAlias,
crate::output::ValidateIdentityProfileOutput,
crate::error::ValidateIdentityProfileError,
crate::input::ValidateIdentityProfileInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Represent a resource's readable display name.
pub fn display_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.display_name(input.into());
self
}
/// Represent a resource's readable display name.
pub fn set_display_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_display_name(input);
self
}
/// Identity profile account number (#1234). These are assigned in addition to an identity's display name in order to allow multiple identities to have the same display name while still providing a unique handle. These are unique to each display name; you can have multiple accounts with different display names and the same account number.
pub fn account_number(mut self, input: i32) -> Self {
self.inner = self.inner.account_number(input);
self
}
/// Identity profile account number (#1234). These are assigned in addition to an identity's display name in order to allow multiple identities to have the same display name while still providing a unique handle. These are unique to each display name; you can have multiple accounts with different display names and the same account number.
pub fn set_account_number(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_account_number(input);
self
}
/// Detailed information about a profile.
pub fn bio(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.bio(input.into());
self
}
/// Detailed information about a profile.
pub fn set_bio(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_bio(input);
self
}
}
/// Fluent builder constructing a request to `WatchEvents`.
///
/// Returns all events relative to the current identity.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct WatchEvents<C, M, R = aws_smithy_client::retry::Standard> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::watch_events_input::Builder,
}
impl<C, M, R> WatchEvents<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `WatchEvents`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::WatchEventsOutput,
aws_smithy_http::result::SdkError<crate::error::WatchEventsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::WatchEventsInputOperationOutputAlias,
crate::output::WatchEventsOutput,
crate::error::WatchEventsError,
crate::input::WatchEventsInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// A query parameter denoting the requests watch index.
pub fn watch_index(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.watch_index(input.into());
self
}
/// A query parameter denoting the requests watch index.
pub fn set_watch_index(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_watch_index(input);
self
}
}
}
/// A wrapper around [`Client`]. Helps reduce external imports.
pub struct ClientWrapper {
pub(crate) client: Client<aws_smithy_client::erase::DynConnector, tower::layer::util::Identity>,
}
impl std::ops::Deref for ClientWrapper {
type Target = Client<aws_smithy_client::erase::DynConnector, tower::layer::util::Identity>;
fn deref(&self) -> &Self::Target {
&self.client
}
}