import { Breakdowns } from './Breakdowns'
import { TargetingCriteriaBreakdowns } from './TargetingCriteriaBreakdowns'
import { ContendingLineItems } from './ContendingLineItems'
import { AlternativeUnitTypeForecasts } from './AlternativeUnitTypeForecasts'

export enum UnitType {
  IMPRESSIONS = 'IMPRESSIONS',
  CLICKS = 'CLICKS',
  CLICK_THROUGH_CPA_CONVERSIONS = 'CLICK_THROUGH_CPA_CONVERSIONS',
  VIEW_THROUGH_CPA_CONVERSIONS = 'VIEW_THROUGH_CPA_CONVERSIONS',
  TOTAL_CPA_CONVERSIONS = 'TOTAL_CPA_CONVERSIONS',
  VIEWABLE_IMPRESSIONS = 'VIEWABLE_IMPRESSIONS',
  IN_TARGET_IMPRESSIONS = 'IN_TARGET_IMPRESSIONS',
  UNKNOWN = 'UNKNOWN',
}

/**
 * rval
 * @targetNSAlias `tns`
 * @targetNamespace `https://www.google.com/apis/ads/publisher/v202408`
 */
export interface Rval {
  /** xsd:long */
  lineItemId?: number
  /** xsd:long */
  orderId?: number
  /** UnitType|xsd:string|IMPRESSIONS,CLICKS,CLICK_THROUGH_CPA_CONVERSIONS,VIEW_THROUGH_CPA_CONVERSIONS,TOTAL_CPA_CONVERSIONS,VIEWABLE_IMPRESSIONS,IN_TARGET_IMPRESSIONS,UNKNOWN */
  unitType?: UnitType | keyof typeof UnitType
  /** xsd:long */
  availableUnits?: number
  /** xsd:long */
  deliveredUnits?: number
  /** xsd:long */
  matchedUnits?: number
  /** xsd:long */
  possibleUnits?: number
  /** xsd:long */
  reservedUnits?: number
  /** breakdowns[] */
  breakdowns?: Array<Breakdowns>
  /** targetingCriteriaBreakdowns[] */
  targetingCriteriaBreakdowns?: Array<TargetingCriteriaBreakdowns>
  /** contendingLineItems[] */
  contendingLineItems?: Array<ContendingLineItems>
  /** alternativeUnitTypeForecasts[] */
  alternativeUnitTypeForecasts?: Array<AlternativeUnitTypeForecasts>
}
