# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. # typed: true # frozen_string_literal: true require 'sorbet-runtime' require 'faraday' module StackOne module Shared class TimeOffValue < T::Enum enums do APPROVED = new('approved') UNMAPPED_VALUE = new('unmapped_value') end end # The status of the time off request class TimeOffStatus < ::StackOne::Utils::FieldAugmented extend T::Sig field :source_value, T.nilable(Object), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } field :value, T.nilable(Shared::TimeOffValue), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::TimeOffValue, true) } } sig { params(source_value: T.nilable(Object), value: T.nilable(Shared::TimeOffValue)).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end class TimeOffSchemasValue < T::Enum enums do SICK = new('sick') UNMAPPED_VALUE = new('unmapped_value') VACATION = new('vacation') end end # The type of the time off request class TimeOffType < ::StackOne::Utils::FieldAugmented extend T::Sig field :source_value, T.nilable(Object), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } field :value, T.nilable(Shared::TimeOffSchemasValue), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::TimeOffSchemasValue, true) } } sig { params(source_value: T.nilable(Object), value: T.nilable(Shared::TimeOffSchemasValue)).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end class TimeOff < ::StackOne::Utils::FieldAugmented extend T::Sig # The approver ID field :approver_id, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('approver_id') } } # The created date of the time off request field :created_date, T.nilable(DateTime), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('created_date'), 'decoder': Utils.datetime_from_iso_format(true) } } # The employee ID field :employee_id, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('employee_id') } } # The end date of the time off request field :end_date, T.nilable(DateTime), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('end_date'), 'decoder': Utils.datetime_from_iso_format(true) } } # The unique ID of the time off request field :id, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('id') } } # The start date of the time off request field :start_date, T.nilable(DateTime), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('start_date'), 'decoder': Utils.datetime_from_iso_format(true) } } # The status of the time off request field :status, T.nilable(Shared::TimeOffStatus), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('status') } } # The type of the time off request field :type, T.nilable(Shared::TimeOffType), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('type') } } # The updated date of the time off request field :updated_date, T.nilable(DateTime), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('updated_date'), 'decoder': Utils.datetime_from_iso_format(true) } } sig { params(approver_id: T.nilable(String), created_date: T.nilable(DateTime), employee_id: T.nilable(String), end_date: T.nilable(DateTime), id: T.nilable(String), start_date: T.nilable(DateTime), status: T.nilable(Shared::TimeOffStatus), type: T.nilable(Shared::TimeOffType), updated_date: T.nilable(DateTime)).void } def initialize(approver_id: nil, created_date: nil, employee_id: nil, end_date: nil, id: nil, start_date: nil, status: nil, type: nil, updated_date: nil) @approver_id = approver_id @created_date = created_date @employee_id = employee_id @end_date = end_date @id = id @start_date = start_date @status = status @type = type @updated_date = updated_date end end end end