Class Goal.Builder (0.44.0)

public static final class Goal.Builder extends GeneratedMessage.Builder<Goal.Builder> implements GoalOrBuilder

Defines the criteria a LineItem needs to satisfy to meet its delivery goal.

Protobuf type google.ads.admanager.v1.Goal

Implements

GoalOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Goal build()
Returns
Type Description
Goal

buildPartial()

public Goal buildPartial()
Returns
Type Description
Goal

clear()

public Goal.Builder clear()
Returns
Type Description
Goal.Builder
Overrides

clearGoalType()

public Goal.Builder clearGoalType()

The type of the goal for the LineItem. It defines the period over which the goal should be reached.

optional .google.ads.admanager.v1.GoalTypeEnum.GoalType goal_type = 1;

Returns
Type Description
Goal.Builder

This builder for chaining.

clearUnitType()

public Goal.Builder clearUnitType()

The type of the goal unit for the LineItem.

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

Returns
Type Description
Goal.Builder

This builder for chaining.

clearUnits()

public Goal.Builder clearUnits()

If this is a primary goal, it represents the number or percentage of impressions or clicks that will be reserved. If the line item is of type LineItemTypeEnum.LineItemType.SPONSORSHIP, it represents the percentage of available impressions reserved. If the line item is of type LineItemTypeEnum.LineItemType.BULK or LineItemTypeEnum.LineItemType.PRICE_PRIORITY, it represents the number of remaining impressions reserved. If the line item is of type LineItemTypeEnum.LineItemType.NETWORK or LineItemTypeEnum.LineItemType.HOUSE, it represents the percentage of remaining impressions reserved. <p>If this is an impression cap goal, it represents the number of impressions or conversions that the line item will stop serving at if reached. For valid line item types, see [LineItem.impressions_cap][].

optional int64 units = 3;

Returns
Type Description
Goal.Builder

This builder for chaining.

getDefaultInstanceForType()

public Goal getDefaultInstanceForType()
Returns
Type Description
Goal

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getGoalType()

public GoalTypeEnum.GoalType getGoalType()

The type of the goal for the LineItem. It defines the period over which the goal should be reached.

optional .google.ads.admanager.v1.GoalTypeEnum.GoalType goal_type = 1;

Returns
Type Description
GoalTypeEnum.GoalType

The goalType.

getGoalTypeValue()

public int getGoalTypeValue()

The type of the goal for the LineItem. It defines the period over which the goal should be reached.

optional .google.ads.admanager.v1.GoalTypeEnum.GoalType goal_type = 1;

Returns
Type Description
int

The enum numeric value on the wire for goalType.

getUnitType()

public UnitTypeEnum.UnitType getUnitType()

The type of the goal unit for the LineItem.

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

Returns
Type Description
UnitTypeEnum.UnitType

The unitType.

getUnitTypeValue()

public int getUnitTypeValue()

The type of the goal unit for the LineItem.

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

Returns
Type Description
int

The enum numeric value on the wire for unitType.

getUnits()

public long getUnits()

If this is a primary goal, it represents the number or percentage of impressions or clicks that will be reserved. If the line item is of type LineItemTypeEnum.LineItemType.SPONSORSHIP, it represents the percentage of available impressions reserved. If the line item is of type LineItemTypeEnum.LineItemType.BULK or LineItemTypeEnum.LineItemType.PRICE_PRIORITY, it represents the number of remaining impressions reserved. If the line item is of type LineItemTypeEnum.LineItemType.NETWORK or LineItemTypeEnum.LineItemType.HOUSE, it represents the percentage of remaining impressions reserved. <p>If this is an impression cap goal, it represents the number of impressions or conversions that the line item will stop serving at if reached. For valid line item types, see [LineItem.impressions_cap][].

optional int64 units = 3;

Returns
Type Description
long

The units.

hasGoalType()

public boolean hasGoalType()

The type of the goal for the LineItem. It defines the period over which the goal should be reached.

optional .google.ads.admanager.v1.GoalTypeEnum.GoalType goal_type = 1;

Returns
Type Description
boolean

Whether the goalType field is set.

hasUnitType()

public boolean hasUnitType()

The type of the goal unit for the LineItem.

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

Returns
Type Description
boolean

Whether the unitType field is set.

hasUnits()

public boolean hasUnits()

If this is a primary goal, it represents the number or percentage of impressions or clicks that will be reserved. If the line item is of type LineItemTypeEnum.LineItemType.SPONSORSHIP, it represents the percentage of available impressions reserved. If the line item is of type LineItemTypeEnum.LineItemType.BULK or LineItemTypeEnum.LineItemType.PRICE_PRIORITY, it represents the number of remaining impressions reserved. If the line item is of type LineItemTypeEnum.LineItemType.NETWORK or LineItemTypeEnum.LineItemType.HOUSE, it represents the percentage of remaining impressions reserved. <p>If this is an impression cap goal, it represents the number of impressions or conversions that the line item will stop serving at if reached. For valid line item types, see [LineItem.impressions_cap][].

optional int64 units = 3;

Returns
Type Description
boolean

Whether the units field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Goal other)

public Goal.Builder mergeFrom(Goal other)
Parameter
Name Description
other Goal
Returns
Type Description
Goal.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Goal.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Goal.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Goal.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Goal.Builder
Overrides

setGoalType(GoalTypeEnum.GoalType value)

public Goal.Builder setGoalType(GoalTypeEnum.GoalType value)

The type of the goal for the LineItem. It defines the period over which the goal should be reached.

optional .google.ads.admanager.v1.GoalTypeEnum.GoalType goal_type = 1;

Parameter
Name Description
value GoalTypeEnum.GoalType

The goalType to set.

Returns
Type Description
Goal.Builder

This builder for chaining.

setGoalTypeValue(int value)

public Goal.Builder setGoalTypeValue(int value)

The type of the goal for the LineItem. It defines the period over which the goal should be reached.

optional .google.ads.admanager.v1.GoalTypeEnum.GoalType goal_type = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for goalType to set.

Returns
Type Description
Goal.Builder

This builder for chaining.

setUnitType(UnitTypeEnum.UnitType value)

public Goal.Builder setUnitType(UnitTypeEnum.UnitType value)

The type of the goal unit for the LineItem.

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

Parameter
Name Description
value UnitTypeEnum.UnitType

The unitType to set.

Returns
Type Description
Goal.Builder

This builder for chaining.

setUnitTypeValue(int value)

public Goal.Builder setUnitTypeValue(int value)

The type of the goal unit for the LineItem.

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

Parameter
Name Description
value int

The enum numeric value on the wire for unitType to set.

Returns
Type Description
Goal.Builder

This builder for chaining.

setUnits(long value)

public Goal.Builder setUnits(long value)

If this is a primary goal, it represents the number or percentage of impressions or clicks that will be reserved. If the line item is of type LineItemTypeEnum.LineItemType.SPONSORSHIP, it represents the percentage of available impressions reserved. If the line item is of type LineItemTypeEnum.LineItemType.BULK or LineItemTypeEnum.LineItemType.PRICE_PRIORITY, it represents the number of remaining impressions reserved. If the line item is of type LineItemTypeEnum.LineItemType.NETWORK or LineItemTypeEnum.LineItemType.HOUSE, it represents the percentage of remaining impressions reserved. <p>If this is an impression cap goal, it represents the number of impressions or conversions that the line item will stop serving at if reached. For valid line item types, see [LineItem.impressions_cap][].

optional int64 units = 3;

Parameter
Name Description
value long

The units to set.

Returns
Type Description
Goal.Builder

This builder for chaining.