Class AvailabilityForecast (0.62.0)

public final class AvailabilityForecast extends GeneratedMessage implements AvailabilityForecastOrBuilder

Describes predicted inventory availability for a ProspectiveLineItem. Inventory has three threshold values along a line of possible inventory. From least to most, these are:

Available units -- How many units can be booked without affecting any other line items. Booking more than this number can cause lower and same priority line items to underdeliver. Possible units -- How many units can be booked without affecting any higher priority line items. Booking more than this number can cause the line item to underdeliver. Matched (forecast) units -- How many units satisfy all specified criteria.

Underdelivery is caused by overbooking. However, if more impressions are served than are predicted, the extra available inventory might enable all inventory is able to be met without overbooking.

Protobuf type google.ads.admanager.v1.AvailabilityForecast

Static Fields

ALTERNATIVE_UNIT_TYPE_FORECASTS_FIELD_NUMBER

public static final int ALTERNATIVE_UNIT_TYPE_FORECASTS_FIELD_NUMBER
Field Value
Type Description
int

AVAILABLE_UNITS_FIELD_NUMBER

public static final int AVAILABLE_UNITS_FIELD_NUMBER
Field Value
Type Description
int

BREAKDOWNS_FIELD_NUMBER

public static final int BREAKDOWNS_FIELD_NUMBER
Field Value
Type Description
int

CONTENDING_LINE_ITEMS_FIELD_NUMBER

public static final int CONTENDING_LINE_ITEMS_FIELD_NUMBER
Field Value
Type Description
int

DELIVERED_UNITS_FIELD_NUMBER

public static final int DELIVERED_UNITS_FIELD_NUMBER
Field Value
Type Description
int

DEMOGRAPHIC_BREAKDOWNS_FIELD_NUMBER

public static final int DEMOGRAPHIC_BREAKDOWNS_FIELD_NUMBER
Field Value
Type Description
int

LINE_ITEM_FIELD_NUMBER

public static final int LINE_ITEM_FIELD_NUMBER
Field Value
Type Description
int

MATCHED_UNITS_FIELD_NUMBER

public static final int MATCHED_UNITS_FIELD_NUMBER
Field Value
Type Description
int

ORDER_FIELD_NUMBER

public static final int ORDER_FIELD_NUMBER
Field Value
Type Description
int

POSSIBLE_UNITS_FIELD_NUMBER

public static final int POSSIBLE_UNITS_FIELD_NUMBER
Field Value
Type Description
int

RESERVED_UNITS_FIELD_NUMBER

public static final int RESERVED_UNITS_FIELD_NUMBER
Field Value
Type Description
int

TARGETING_CRITERIA_BREAKDOWNS_FIELD_NUMBER

public static final int TARGETING_CRITERIA_BREAKDOWNS_FIELD_NUMBER
Field Value
Type Description
int

UNIT_TYPE_FIELD_NUMBER

public static final int UNIT_TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AvailabilityForecast getDefaultInstance()
Returns
Type Description
AvailabilityForecast

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AvailabilityForecast.Builder newBuilder()
Returns
Type Description
AvailabilityForecast.Builder

newBuilder(AvailabilityForecast prototype)

public static AvailabilityForecast.Builder newBuilder(AvailabilityForecast prototype)
Parameter
Name Description
prototype AvailabilityForecast
Returns
Type Description
AvailabilityForecast.Builder

parseDelimitedFrom(InputStream input)

public static AvailabilityForecast parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AvailabilityForecast parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AvailabilityForecast parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AvailabilityForecast parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AvailabilityForecast parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AvailabilityForecast parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AvailabilityForecast parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AvailabilityForecast parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AvailabilityForecast parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AvailabilityForecast parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AvailabilityForecast parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AvailabilityForecast parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AvailabilityForecast
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AvailabilityForecast> parser()
Returns
Type Description
Parser<AvailabilityForecast>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAlternativeUnitTypeForecasts(int index)

public AlternativeUnitTypeForecast getAlternativeUnitTypeForecasts(int index)

Views of this forecast, with alternative unit types.

repeated .google.ads.admanager.v1.AlternativeUnitTypeForecast alternative_unit_type_forecasts = 12;

Parameter
Name Description
index int
Returns
Type Description
AlternativeUnitTypeForecast

getAlternativeUnitTypeForecastsCount()

public int getAlternativeUnitTypeForecastsCount()

Views of this forecast, with alternative unit types.

repeated .google.ads.admanager.v1.AlternativeUnitTypeForecast alternative_unit_type_forecasts = 12;

Returns
Type Description
int

getAlternativeUnitTypeForecastsList()

public List<AlternativeUnitTypeForecast> getAlternativeUnitTypeForecastsList()

Views of this forecast, with alternative unit types.

repeated .google.ads.admanager.v1.AlternativeUnitTypeForecast alternative_unit_type_forecasts = 12;

Returns
Type Description
List<AlternativeUnitTypeForecast>

getAlternativeUnitTypeForecastsOrBuilder(int index)

public AlternativeUnitTypeForecastOrBuilder getAlternativeUnitTypeForecastsOrBuilder(int index)

Views of this forecast, with alternative unit types.

repeated .google.ads.admanager.v1.AlternativeUnitTypeForecast alternative_unit_type_forecasts = 12;

Parameter
Name Description
index int
Returns
Type Description
AlternativeUnitTypeForecastOrBuilder

getAlternativeUnitTypeForecastsOrBuilderList()

public List<? extends AlternativeUnitTypeForecastOrBuilder> getAlternativeUnitTypeForecastsOrBuilderList()

Views of this forecast, with alternative unit types.

repeated .google.ads.admanager.v1.AlternativeUnitTypeForecast alternative_unit_type_forecasts = 12;

Returns
Type Description
List<? extends com.google.ads.admanager.v1.AlternativeUnitTypeForecastOrBuilder>

getAvailableUnits()

public long getAvailableUnits()

The number of units, defined by Goal.unitType, that can be booked without affecting the delivery of any reserved line items. Exceeding this value won't cause an overbook, but lower priority line items may not run.

optional int64 available_units = 4;

Returns
Type Description
long

The availableUnits.

getBreakdowns(int index)

public ForecastBreakdown getBreakdowns(int index)

The breakdowns for each time window defined in ForecastBreakdownOptions.timeWindows.

If no breakdown was requested through AvailabilityForecastOptions.breakdown, this field will be empty.

repeated .google.ads.admanager.v1.ForecastBreakdown breakdowns = 9;

Parameter
Name Description
index int
Returns
Type Description
ForecastBreakdown

getBreakdownsCount()

public int getBreakdownsCount()

The breakdowns for each time window defined in ForecastBreakdownOptions.timeWindows.

If no breakdown was requested through AvailabilityForecastOptions.breakdown, this field will be empty.

repeated .google.ads.admanager.v1.ForecastBreakdown breakdowns = 9;

Returns
Type Description
int

getBreakdownsList()

public List<ForecastBreakdown> getBreakdownsList()

The breakdowns for each time window defined in ForecastBreakdownOptions.timeWindows.

If no breakdown was requested through AvailabilityForecastOptions.breakdown, this field will be empty.

repeated .google.ads.admanager.v1.ForecastBreakdown breakdowns = 9;

Returns
Type Description
List<ForecastBreakdown>

getBreakdownsOrBuilder(int index)

public ForecastBreakdownOrBuilder getBreakdownsOrBuilder(int index)

The breakdowns for each time window defined in ForecastBreakdownOptions.timeWindows.

If no breakdown was requested through AvailabilityForecastOptions.breakdown, this field will be empty.

repeated .google.ads.admanager.v1.ForecastBreakdown breakdowns = 9;

Parameter
Name Description
index int
Returns
Type Description
ForecastBreakdownOrBuilder

getBreakdownsOrBuilderList()

public List<? extends ForecastBreakdownOrBuilder> getBreakdownsOrBuilderList()

The breakdowns for each time window defined in ForecastBreakdownOptions.timeWindows.

If no breakdown was requested through AvailabilityForecastOptions.breakdown, this field will be empty.

repeated .google.ads.admanager.v1.ForecastBreakdown breakdowns = 9;

Returns
Type Description
List<? extends com.google.ads.admanager.v1.ForecastBreakdownOrBuilder>

getContendingLineItems(int index)

public ContendingLineItem getContendingLineItems(int index)

List of ContendingLineItem contending line items for this forecast.

repeated .google.ads.admanager.v1.ContendingLineItem contending_line_items = 11;

Parameter
Name Description
index int
Returns
Type Description
ContendingLineItem

getContendingLineItemsCount()

public int getContendingLineItemsCount()

List of ContendingLineItem contending line items for this forecast.

repeated .google.ads.admanager.v1.ContendingLineItem contending_line_items = 11;

Returns
Type Description
int

getContendingLineItemsList()

public List<ContendingLineItem> getContendingLineItemsList()

List of ContendingLineItem contending line items for this forecast.

repeated .google.ads.admanager.v1.ContendingLineItem contending_line_items = 11;

Returns
Type Description
List<ContendingLineItem>

getContendingLineItemsOrBuilder(int index)

public ContendingLineItemOrBuilder getContendingLineItemsOrBuilder(int index)

List of ContendingLineItem contending line items for this forecast.

repeated .google.ads.admanager.v1.ContendingLineItem contending_line_items = 11;

Parameter
Name Description
index int
Returns
Type Description
ContendingLineItemOrBuilder

getContendingLineItemsOrBuilderList()

public List<? extends ContendingLineItemOrBuilder> getContendingLineItemsOrBuilderList()

List of ContendingLineItem contending line items for this forecast.

repeated .google.ads.admanager.v1.ContendingLineItem contending_line_items = 11;

Returns
Type Description
List<? extends com.google.ads.admanager.v1.ContendingLineItemOrBuilder>

getDefaultInstanceForType()

public AvailabilityForecast getDefaultInstanceForType()
Returns
Type Description
AvailabilityForecast

getDeliveredUnits()

public long getDeliveredUnits()

The number of units, defined by Goal.unitType, that have already been served if the reservation is already running.

optional int64 delivered_units = 5;

Returns
Type Description
long

The deliveredUnits.

getDemographicBreakdowns(int index)

public GrpDemographicBreakdown getDemographicBreakdowns(int index)

The forecast result broken down by demographics.

repeated .google.ads.admanager.v1.GrpDemographicBreakdown demographic_breakdowns = 14;

Parameter
Name Description
index int
Returns
Type Description
GrpDemographicBreakdown

getDemographicBreakdownsCount()

public int getDemographicBreakdownsCount()

The forecast result broken down by demographics.

repeated .google.ads.admanager.v1.GrpDemographicBreakdown demographic_breakdowns = 14;

Returns
Type Description
int

getDemographicBreakdownsList()

public List<GrpDemographicBreakdown> getDemographicBreakdownsList()

The forecast result broken down by demographics.

repeated .google.ads.admanager.v1.GrpDemographicBreakdown demographic_breakdowns = 14;

Returns
Type Description
List<GrpDemographicBreakdown>

getDemographicBreakdownsOrBuilder(int index)

public GrpDemographicBreakdownOrBuilder getDemographicBreakdownsOrBuilder(int index)

The forecast result broken down by demographics.

repeated .google.ads.admanager.v1.GrpDemographicBreakdown demographic_breakdowns = 14;

Parameter
Name Description
index int
Returns
Type Description
GrpDemographicBreakdownOrBuilder

getDemographicBreakdownsOrBuilderList()

public List<? extends GrpDemographicBreakdownOrBuilder> getDemographicBreakdownsOrBuilderList()

The forecast result broken down by demographics.

repeated .google.ads.admanager.v1.GrpDemographicBreakdown demographic_breakdowns = 14;

Returns
Type Description
List<? extends com.google.ads.admanager.v1.GrpDemographicBreakdownOrBuilder>

getLineItem()

public String getLineItem()

Uniquely identifies this availability forecast. This value is read-only and is assigned by Google when the forecast is created. The attribute will be either the resource name of the LineItem object it represents, or null if the forecast represents a prospective line item. Format: networks/{network_code}/lineItems/{line_item_id}

optional string line_item = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The lineItem.

getLineItemBytes()

public ByteString getLineItemBytes()

Uniquely identifies this availability forecast. This value is read-only and is assigned by Google when the forecast is created. The attribute will be either the resource name of the LineItem object it represents, or null if the forecast represents a prospective line item. Format: networks/{network_code}/lineItems/{line_item_id}

optional string line_item = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for lineItem.

getMatchedUnits()

public long getMatchedUnits()

The number of units, defined by Goal.unitType, that match the specified targeting and delivery settings.

optional int64 matched_units = 6;

Returns
Type Description
long

The matchedUnits.

getOrder()

public String getOrder()

The resource name for the Order object that this line item belongs to, or null if the forecast represents a prospective line item without an LineItem.order set. Format: networks/{network_code}/orders/{order_id}

optional string order = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The order.

getOrderBytes()

public ByteString getOrderBytes()

The resource name for the Order object that this line item belongs to, or null if the forecast represents a prospective line item without an LineItem.order set. Format: networks/{network_code}/orders/{order_id}

optional string order = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for order.

getParserForType()

public Parser<AvailabilityForecast> getParserForType()
Returns
Type Description
Parser<AvailabilityForecast>
Overrides

getPossibleUnits()

public long getPossibleUnits()

The maximum number of units, defined by Goal.unitType, that could be booked by taking inventory away from lower priority line items and some same priority line items.

Booking this number may cause lower priority line items and some same priority line items to underdeliver.

optional int64 possible_units = 7;

Returns
Type Description
long

The possibleUnits.

getReservedUnits()

public long getReservedUnits()

The number of reserved units, defined by Goal.unitType, requested. This can be an absolute or percentage value.

optional int64 reserved_units = 8;

Returns
Type Description
long

The reservedUnits.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTargetingCriteriaBreakdowns(int index)

public TargetingCriteriaBreakdown getTargetingCriteriaBreakdowns(int index)

The forecast result broken down by the targeting of the forecasted line item.

repeated .google.ads.admanager.v1.TargetingCriteriaBreakdown targeting_criteria_breakdowns = 10;

Parameter
Name Description
index int
Returns
Type Description
TargetingCriteriaBreakdown

getTargetingCriteriaBreakdownsCount()

public int getTargetingCriteriaBreakdownsCount()

The forecast result broken down by the targeting of the forecasted line item.

repeated .google.ads.admanager.v1.TargetingCriteriaBreakdown targeting_criteria_breakdowns = 10;

Returns
Type Description
int

getTargetingCriteriaBreakdownsList()

public List<TargetingCriteriaBreakdown> getTargetingCriteriaBreakdownsList()

The forecast result broken down by the targeting of the forecasted line item.

repeated .google.ads.admanager.v1.TargetingCriteriaBreakdown targeting_criteria_breakdowns = 10;

Returns
Type Description
List<TargetingCriteriaBreakdown>

getTargetingCriteriaBreakdownsOrBuilder(int index)

public TargetingCriteriaBreakdownOrBuilder getTargetingCriteriaBreakdownsOrBuilder(int index)

The forecast result broken down by the targeting of the forecasted line item.

repeated .google.ads.admanager.v1.TargetingCriteriaBreakdown targeting_criteria_breakdowns = 10;

Parameter
Name Description
index int
Returns
Type Description
TargetingCriteriaBreakdownOrBuilder

getTargetingCriteriaBreakdownsOrBuilderList()

public List<? extends TargetingCriteriaBreakdownOrBuilder> getTargetingCriteriaBreakdownsOrBuilderList()

The forecast result broken down by the targeting of the forecasted line item.

repeated .google.ads.admanager.v1.TargetingCriteriaBreakdown targeting_criteria_breakdowns = 10;

Returns
Type Description
List<? extends com.google.ads.admanager.v1.TargetingCriteriaBreakdownOrBuilder>

getUnitType()

public UnitTypeEnum.UnitType getUnitType()

The unit with which the goal or cap of the LineItem is defined. Will be the same value as Goal.unitType for both a set line item or a prospective one.

optional .google.ads.admanager.v1.UnitTypeEnum.UnitType unit_type = 3;

Returns
Type Description
UnitTypeEnum.UnitType

The unitType.

getUnitTypeValue()

public int getUnitTypeValue()

The unit with which the goal or cap of the LineItem is defined. Will be the same value as Goal.unitType for both a set line item or a prospective one.

optional .google.ads.admanager.v1.UnitTypeEnum.UnitType unit_type = 3;

Returns
Type Description
int

The enum numeric value on the wire for unitType.

hasAvailableUnits()

public boolean hasAvailableUnits()

The number of units, defined by Goal.unitType, that can be booked without affecting the delivery of any reserved line items. Exceeding this value won't cause an overbook, but lower priority line items may not run.

optional int64 available_units = 4;

Returns
Type Description
boolean

Whether the availableUnits field is set.

hasDeliveredUnits()

public boolean hasDeliveredUnits()

The number of units, defined by Goal.unitType, that have already been served if the reservation is already running.

optional int64 delivered_units = 5;

Returns
Type Description
boolean

Whether the deliveredUnits field is set.

hasLineItem()

public boolean hasLineItem()

Uniquely identifies this availability forecast. This value is read-only and is assigned by Google when the forecast is created. The attribute will be either the resource name of the LineItem object it represents, or null if the forecast represents a prospective line item. Format: networks/{network_code}/lineItems/{line_item_id}

optional string line_item = 1 [(.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the lineItem field is set.

hasMatchedUnits()

public boolean hasMatchedUnits()

The number of units, defined by Goal.unitType, that match the specified targeting and delivery settings.

optional int64 matched_units = 6;

Returns
Type Description
boolean

Whether the matchedUnits field is set.

hasOrder()

public boolean hasOrder()

The resource name for the Order object that this line item belongs to, or null if the forecast represents a prospective line item without an LineItem.order set. Format: networks/{network_code}/orders/{order_id}

optional string order = 2 [(.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the order field is set.

hasPossibleUnits()

public boolean hasPossibleUnits()

The maximum number of units, defined by Goal.unitType, that could be booked by taking inventory away from lower priority line items and some same priority line items.

Booking this number may cause lower priority line items and some same priority line items to underdeliver.

optional int64 possible_units = 7;

Returns
Type Description
boolean

Whether the possibleUnits field is set.

hasReservedUnits()

public boolean hasReservedUnits()

The number of reserved units, defined by Goal.unitType, requested. This can be an absolute or percentage value.

optional int64 reserved_units = 8;

Returns
Type Description
boolean

Whether the reservedUnits field is set.

hasUnitType()

public boolean hasUnitType()

The unit with which the goal or cap of the LineItem is defined. Will be the same value as Goal.unitType for both a set line item or a prospective one.

optional .google.ads.admanager.v1.UnitTypeEnum.UnitType unit_type = 3;

Returns
Type Description
boolean

Whether the unitType field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AvailabilityForecast.Builder newBuilderForType()
Returns
Type Description
AvailabilityForecast.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected AvailabilityForecast.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AvailabilityForecast.Builder
Overrides

toBuilder()

public AvailabilityForecast.Builder toBuilder()
Returns
Type Description
AvailabilityForecast.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException