// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CancelSubscription`](crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`app_id(impl Into<String>)`](crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder::app_id) / [`set_app_id(Option<String>)`](crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder::set_app_id):<br>required: **true**<br>The ID of the app.<br>
/// - [`user_id(impl Into<String>)`](crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder::user_id) / [`set_user_id(Option<String>)`](crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder::set_user_id):<br>required: **true**<br>An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.<br>
/// - [`effective_at(DateTime)`](crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder::effective_at) / [`set_effective_at(Option<DateTime>)`](crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder::set_effective_at):<br>required: **true**<br>The subscription's current effective time, as returned by GetSubscription, used as an optimistic-concurrency check. If GetSubscription returns a pending change, pass `pendingChange.effectiveAt`; otherwise pass `subscription.effectiveAt`. This value does not choose when the cancellation takes effect: a new cancellation takes effect at the end of the current billing period, returned as `cancellationEffectiveAt`. If the subscription's effective time has changed since you read it (for example, because another plan change was made), the value no longer matches and the request fails with ConflictException; call GetSubscription again and retry with the new value. If the subscription is already cancelled or a cancellation is already scheduled, the request returns its current state and does not compare this value.<br>
/// - [`scope(RequestScope)`](crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder::scope) / [`set_scope(Option<RequestScope>)`](crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder::set_scope):<br>required: **true**<br>Required. The environment: live or sandbox.<br>
/// - On success, responds with [`CancelSubscriptionOutput`](crate::operation::cancel_subscription::CancelSubscriptionOutput) with field(s):
/// - [`subscription(Option<Subscription>)`](crate::operation::cancel_subscription::CancelSubscriptionOutput::subscription): The subscription as it stands after the cancellation is scheduled.
/// - [`cancellation_effective_at(DateTime)`](crate::operation::cancel_subscription::CancelSubscriptionOutput::cancellation_effective_at): The time when the cancellation takes effect, at the end of the current billing period. The subscription remains active until this time.
/// - On failure, responds with [`SdkError<CancelSubscriptionError>`](crate::operation::cancel_subscription::CancelSubscriptionError)
pub fn cancel_subscription(&self) -> crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder {
crate::operation::cancel_subscription::builders::CancelSubscriptionFluentBuilder::new(self.handle.clone())
}
}