import { StartDateTime } from './StartDateTime'
import { TotalBudget } from './TotalBudget'
import { AppliedLabels } from './AppliedLabels'
import { CustomFieldValues } from './CustomFieldValues'

export enum Status {
  DRAFT = 'DRAFT',
  PENDING_APPROVAL = 'PENDING_APPROVAL',
  APPROVED = 'APPROVED',
  DISAPPROVED = 'DISAPPROVED',
  PAUSED = 'PAUSED',
  CANCELED = 'CANCELED',
  DELETED = 'DELETED',
  UNKNOWN = 'UNKNOWN',
}

/**
 * orders
 * @targetNSAlias `tns`
 * @targetNamespace `https://www.google.com/apis/ads/publisher/v202408`
 */
export interface Orders {
  /** xsd:long */
  id?: number
  /** xsd:string */
  name?: string
  /** startDateTime */
  startDateTime?: StartDateTime
  /** endDateTime */
  endDateTime?: StartDateTime
  /** xsd:boolean */
  unlimitedEndDateTime?: boolean
  /** OrderStatus|xsd:string|DRAFT,PENDING_APPROVAL,APPROVED,DISAPPROVED,PAUSED,CANCELED,DELETED,UNKNOWN */
  status?: Status | keyof typeof Status
  /** xsd:boolean */
  isArchived?: boolean
  /** xsd:string */
  notes?: string
  /** xsd:int */
  externalOrderId?: number
  /** xsd:string */
  poNumber?: string
  /** xsd:string */
  currencyCode?: string
  /** xsd:long */
  advertiserId?: number
  /** xsd:long */
  advertiserContactIds?: Array<number>
  /** xsd:long */
  agencyId?: number
  /** xsd:long */
  agencyContactIds?: Array<number>
  /** xsd:long */
  creatorId?: number
  /** xsd:long */
  traffickerId?: number
  /** xsd:long */
  secondaryTraffickerIds?: Array<number>
  /** xsd:long */
  salespersonId?: number
  /** xsd:long */
  secondarySalespersonIds?: Array<number>
  /** xsd:long */
  totalImpressionsDelivered?: number
  /** xsd:long */
  totalClicksDelivered?: number
  /** xsd:long */
  totalViewableImpressionsDelivered?: number
  /** totalBudget */
  totalBudget?: TotalBudget
  /** appliedLabels[] */
  appliedLabels?: Array<AppliedLabels>
  /** effectiveAppliedLabels[] */
  effectiveAppliedLabels?: Array<AppliedLabels>
  /** xsd:string */
  lastModifiedByApp?: string
  /** xsd:boolean */
  isProgrammatic?: boolean
  /** xsd:long */
  appliedTeamIds?: Array<number>
  /** lastModifiedDateTime */
  lastModifiedDateTime?: StartDateTime
  /** customFieldValues[] */
  customFieldValues?: Array<CustomFieldValues>
}
