Class Goal.Builder (0.2.0)

public static final class Goal.Builder extends GeneratedMessageV3.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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Goal.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Goal.Builder
Overrides

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

clearField(Descriptors.FieldDescriptor field)

public Goal.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
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.

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

Returns
Type Description
Goal.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Goal.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Goal.Builder
Overrides

clearUnitType()

public Goal.Builder clearUnitType()

The type of the goal unit for the LineItem.

.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][].

int64 units = 3;

Returns
Type Description
Goal.Builder

This builder for chaining.

clone()

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

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.

.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.

.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.

.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.

.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][].

int64 units = 3;

Returns
Type Description
long

The units.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Goal.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Goal.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Goal.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
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.

.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.

.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.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Goal.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Goal.Builder
Overrides

setUnitType(UnitTypeEnum.UnitType value)

public Goal.Builder setUnitType(UnitTypeEnum.UnitType value)

The type of the goal unit for the LineItem.

.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.

.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][].

int64 units = 3;

Parameter
Name Description
value long

The units to set.

Returns
Type Description
Goal.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Goal.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Goal.Builder
Overrides