# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. # typed: true # frozen_string_literal: true require 'sorbet-runtime' require 'faraday' module DingSDK module Shared # RetryAuthenticationResponseStatus - The status of the retry. Possible values are: # * `approved` - The retry was approved and a new code was sent. # * `denied` - The retry was denied. # * `no_attempt` - No attempt was sent yet, so a retry cannot be completed. # * `rate_limited` - The authentication was rate limited and cannot be retried. # * `expired_auth` - The authentication has expired and cannot be retried. # * `already_validated` - The authentication has already been validated. # class RetryAuthenticationResponseStatus < T::Enum enums do APPROVED = new('approved') DENIED = new('denied') NO_ATTEMPT = new('no_attempt') RATE_LIMITED = new('rate_limited') EXPIRED_AUTH = new('expired_auth') ALREADY_VALIDATED = new('already_validated') end end class RetryAuthenticationResponse < ::DingSDK::Utils::FieldAugmented extend T::Sig # The UUID of the corresponding authentication. field :authentication_uuid, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } } field :created_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } } # The time at which the next retry will be available. field :next_retry_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('next_retry_at'), 'decoder': Utils.datetime_from_iso_format(true) } } # The number of remaining retries. field :remaining_retry, T.nilable(Integer), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('remaining_retry') } } # The status of the retry. Possible values are: # * `approved` - The retry was approved and a new code was sent. # * `denied` - The retry was denied. # * `no_attempt` - No attempt was sent yet, so a retry cannot be completed. # * `rate_limited` - The authentication was rate limited and cannot be retried. # * `expired_auth` - The authentication has expired and cannot be retried. # * `already_validated` - The authentication has already been validated. # field :status, T.nilable(Shared::RetryAuthenticationResponseStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Shared::RetryAuthenticationResponseStatus, true) } } sig { params(authentication_uuid: T.nilable(String), created_at: T.nilable(DateTime), next_retry_at: T.nilable(DateTime), remaining_retry: T.nilable(Integer), status: T.nilable(Shared::RetryAuthenticationResponseStatus)).void } def initialize(authentication_uuid: nil, created_at: nil, next_retry_at: nil, remaining_retry: nil, status: nil) @authentication_uuid = authentication_uuid @created_at = created_at @next_retry_at = next_retry_at @remaining_retry = remaining_retry @status = status end end end end