// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateTimeOff`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`instance_id(impl Into<String>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::instance_id) / [`set_instance_id(Option<String>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::set_instance_id):<br>required: **true**<br><p>The identifier of the Connect Customer instance. This can be the ID or the ARN of the instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p><br>
/// - [`user_id(impl Into<String>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::user_id) / [`set_user_id(Option<String>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::set_user_id):<br>required: **true**<br><p>The identifier of the user who the time off request is for. This can be the ID or the ARN of the user.</p><br>
/// - [`shift_activity_id(impl Into<String>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::shift_activity_id) / [`set_shift_activity_id(Option<String>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::set_shift_activity_id):<br>required: **true**<br><p>The identifier of the shift activity that defines the type of time off being requested. This can be the ID or the ARN of the shift activity. It must be a time off activity. Activities that aren't set as <i>Requestable</i> are accepted.</p><br>
/// - [`start_at(DateTime)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::start_at) / [`set_start_at(Option<DateTime>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::set_start_at):<br>required: **true**<br><p>The start of the time off window, inclusive. It must be no earlier than one year before the current date. Connect Customer stores the value as sent, to the millisecond.</p><br>
/// - [`end_at(DateTime)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::end_at) / [`set_end_at(Option<DateTime>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::set_end_at):<br>required: **true**<br><p>The end of the time off window, exclusive. It must be after <code>StartAt</code> and no later than 24 months after the current date. Connect Customer stores the value as sent, to the millisecond.</p><br>
/// - [`description(impl Into<String>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::set_description):<br>required: **false**<br><p>A description recorded on the time off request. If you omit it, the request has no description.</p><br>
/// - [`approval_type(ApprovalType)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::approval_type) / [`set_approval_type(Option<ApprovalType>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::set_approval_type):<br>required: **true**<br><p>Controls who approves the request. <code>AWAIT_APPROVAL</code> waits for an <code>ApproveTimeOff</code> or <code>RejectTimeOff</code> call. <code>AUTOMATIC</code> has Connect Customer decide the request. For details, see <code>CreateTimeOff</code>.</p><br>
/// - [`rule_failure_action(RuleFailureAction)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::rule_failure_action) / [`set_rule_failure_action(Option<RuleFailureAction>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::set_rule_failure_action):<br>required: **false**<br><p>Controls what happens when a configured rule fails. <code>REJECT</code>, the default, records an <code>ERROR</code> and ends the request <code>REJECTED</code>, unless the whole window is in the past. <code>OVERRIDE</code> records a <code>WARNING</code> and ends the request <code>APPROVED</code>, like the <i>Override time off rules</i> option in the Connect Customer admin website. <code>OVERRIDE</code> requires <code>AUTOMATIC</code>. With <code>AWAIT_APPROVAL</code>, <code>OVERRIDE</code> fails with <code>ValidationException</code>. Set it on <code>ApproveTimeOff</code> instead. <code>OVERRIDE</code> never waives <code>CONFLICTING_TIME_OFF_REQUEST</code>.</p><br>
/// - [`client_token(impl Into<String>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::set_client_token):<br>required: **false**<br><p>A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request, Connect Customer returns the result of that request and doesn't create another time off request. If you don't provide a token, the AWS SDK populates this field. If you reuse a client token with a different request body, the request fails with <code>ValidationException</code>. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p><br>
/// - On success, responds with [`CreateTimeOffOutput`](crate::operation::create_time_off::CreateTimeOffOutput) with field(s):
/// - [`time_off_id(String)`](crate::operation::create_time_off::CreateTimeOffOutput::time_off_id): <p>The identifier of the time off request.</p>
/// - On failure, responds with [`SdkError<CreateTimeOffError>`](crate::operation::create_time_off::CreateTimeOffError)
pub fn create_time_off(&self) -> crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder {
crate::operation::create_time_off::builders::CreateTimeOffFluentBuilder::new(self.handle.clone())
}
}