/**
 * Shell Card Management APIsLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

import {
  array,
  lazy,
  number,
  object,
  optional,
  Schema,
  string,
} from '../schema.js';
import { Datum, datumSchema } from './datum.js';
import {
  DeliveryAddressUpdateStatusEnum,
  deliveryAddressUpdateStatusEnumSchema,
} from './deliveryAddressUpdateStatusEnum.js';

export interface ResponseDeliveryAddressUpdate {
  /** Mandatory UUID (according to RFC 4122 standards) for requests and responses. This will be played back in the response from the requests. */
  requestId: string;
  status: DeliveryAddressUpdateStatusEnum;
  /** Main reference number for tracking. */
  mainReference?: number;
  /** List of Delivery address update entity. The fields of this entity are described below. */
  data?: Datum[];
}

export const responseDeliveryAddressUpdateSchema: Schema<ResponseDeliveryAddressUpdate> = lazy(
  () =>
    object({
      requestId: ['RequestId', string()],
      status: ['Status', deliveryAddressUpdateStatusEnumSchema],
      mainReference: ['MainReference', optional(number())],
      data: ['Data', optional(array(datumSchema))],
    })
);
