Interface CreateTimeOffRequest.Builder

  • Method Details

    • instanceId

      CreateTimeOffRequest.Builder instanceId(String instanceId)

      The identifier of the Connect Customer instance. This can be the ID or the ARN of the instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

      Parameters:
      instanceId - The identifier of the Connect Customer instance. This can be the ID or the ARN of the instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • userId

      The identifier of the user who the time off request is for. This can be the ID or the ARN of the user.

      Parameters:
      userId - The identifier of the user who the time off request is for. This can be the ID or the ARN of the user.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • shiftActivityId

      CreateTimeOffRequest.Builder shiftActivityId(String shiftActivityId)

      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 Requestable are accepted.

      Parameters:
      shiftActivityId - 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 Requestable are accepted.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • startAt

      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.

      Parameters:
      startAt - 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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • endAt

      The end of the time off window, exclusive. It must be after StartAt and no later than 24 months after the current date. Connect Customer stores the value as sent, to the millisecond.

      Parameters:
      endAt - The end of the time off window, exclusive. It must be after StartAt and no later than 24 months after the current date. Connect Customer stores the value as sent, to the millisecond.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      CreateTimeOffRequest.Builder description(String description)

      A description recorded on the time off request. If you omit it, the request has no description.

      Parameters:
      description - A description recorded on the time off request. If you omit it, the request has no description.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • approvalType

      CreateTimeOffRequest.Builder approvalType(String approvalType)

      Controls who approves the request. AWAIT_APPROVAL waits for an ApproveTimeOff or RejectTimeOff call. AUTOMATIC has Connect Customer decide the request. For details, see CreateTimeOff.

      Parameters:
      approvalType - Controls who approves the request. AWAIT_APPROVAL waits for an ApproveTimeOff or RejectTimeOff call. AUTOMATIC has Connect Customer decide the request. For details, see CreateTimeOff.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • approvalType

      CreateTimeOffRequest.Builder approvalType(ApprovalType approvalType)

      Controls who approves the request. AWAIT_APPROVAL waits for an ApproveTimeOff or RejectTimeOff call. AUTOMATIC has Connect Customer decide the request. For details, see CreateTimeOff.

      Parameters:
      approvalType - Controls who approves the request. AWAIT_APPROVAL waits for an ApproveTimeOff or RejectTimeOff call. AUTOMATIC has Connect Customer decide the request. For details, see CreateTimeOff.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • ruleFailureAction

      CreateTimeOffRequest.Builder ruleFailureAction(String ruleFailureAction)

      Controls what happens when a configured rule fails. REJECT, the default, records an ERROR and ends the request REJECTED, unless the whole window is in the past. OVERRIDE records a WARNING and ends the request APPROVED, like the Override time off rules option in the Connect Customer admin website. OVERRIDE requires AUTOMATIC. With AWAIT_APPROVAL, OVERRIDE fails with ValidationException. Set it on ApproveTimeOff instead. OVERRIDE never waives CONFLICTING_TIME_OFF_REQUEST.

      Parameters:
      ruleFailureAction - Controls what happens when a configured rule fails. REJECT, the default, records an ERROR and ends the request REJECTED, unless the whole window is in the past. OVERRIDE records a WARNING and ends the request APPROVED, like the Override time off rules option in the Connect Customer admin website. OVERRIDE requires AUTOMATIC. With AWAIT_APPROVAL, OVERRIDE fails with ValidationException. Set it on ApproveTimeOff instead. OVERRIDE never waives CONFLICTING_TIME_OFF_REQUEST.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • ruleFailureAction

      CreateTimeOffRequest.Builder ruleFailureAction(RuleFailureAction ruleFailureAction)

      Controls what happens when a configured rule fails. REJECT, the default, records an ERROR and ends the request REJECTED, unless the whole window is in the past. OVERRIDE records a WARNING and ends the request APPROVED, like the Override time off rules option in the Connect Customer admin website. OVERRIDE requires AUTOMATIC. With AWAIT_APPROVAL, OVERRIDE fails with ValidationException. Set it on ApproveTimeOff instead. OVERRIDE never waives CONFLICTING_TIME_OFF_REQUEST.

      Parameters:
      ruleFailureAction - Controls what happens when a configured rule fails. REJECT, the default, records an ERROR and ends the request REJECTED, unless the whole window is in the past. OVERRIDE records a WARNING and ends the request APPROVED, like the Override time off rules option in the Connect Customer admin website. OVERRIDE requires AUTOMATIC. With AWAIT_APPROVAL, OVERRIDE fails with ValidationException. Set it on ApproveTimeOff instead. OVERRIDE never waives CONFLICTING_TIME_OFF_REQUEST.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • clientToken

      CreateTimeOffRequest.Builder clientToken(String clientToken)

      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 ValidationException. For more information about idempotency, see Making retries safe with idempotent APIs.

      Parameters:
      clientToken - 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 ValidationException. For more information about idempotency, see Making retries safe with idempotent APIs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      CreateTimeOffRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.