Class CustomPacingGoal.Builder (0.54.0)

public static final class CustomPacingGoal.Builder extends GeneratedMessage.Builder<CustomPacingGoal.Builder> implements CustomPacingGoalOrBuilder

An interval of a CustomPacingCurve. A custom pacing goal contains a start time and an amount. The goal will apply until either the next custom pacing goal's getStartTime or the line item's end time if it is the last goal.

Protobuf type google.ads.admanager.v1.CustomPacingGoal

Static Methods

getDescriptor()

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

Methods

build()

public CustomPacingGoal build()
Returns
Type Description
CustomPacingGoal

buildPartial()

public CustomPacingGoal buildPartial()
Returns
Type Description
CustomPacingGoal

clear()

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

clearAmount()

public CustomPacingGoal.Builder clearAmount()

Optional. The amount associated with the goal. This field is required.

optional int64 amount = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomPacingGoal.Builder

This builder for chaining.

clearStartTime()

public CustomPacingGoal.Builder clearStartTime()

Optional. The start date and time of the goal. This field is required unless use_line_item_start_time is true.

optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomPacingGoal.Builder

clearUseLineItemStartTime()

public CustomPacingGoal.Builder clearUseLineItemStartTime()

Optional. Input only. Whether the [LineItem.start_time] should be used for the start date and time of this goal. This field is not persisted and if it is set to true, the [start_time] field will be populated by the line item's start time.

optional bool use_line_item_start_time = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
CustomPacingGoal.Builder

This builder for chaining.

getAmount()

public long getAmount()

Optional. The amount associated with the goal. This field is required.

optional int64 amount = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The amount.

getDefaultInstanceForType()

public CustomPacingGoal getDefaultInstanceForType()
Returns
Type Description
CustomPacingGoal

getDescriptorForType()

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

getStartTime()

public Timestamp getStartTime()

Optional. The start date and time of the goal. This field is required unless use_line_item_start_time is true.

optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

public Timestamp.Builder getStartTimeBuilder()

Optional. The start date and time of the goal. This field is required unless use_line_item_start_time is true.

optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Optional. The start date and time of the goal. This field is required unless use_line_item_start_time is true.

optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TimestampOrBuilder

getUseLineItemStartTime()

public boolean getUseLineItemStartTime()

Optional. Input only. Whether the [LineItem.start_time] should be used for the start date and time of this goal. This field is not persisted and if it is set to true, the [start_time] field will be populated by the line item's start time.

optional bool use_line_item_start_time = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

The useLineItemStartTime.

hasAmount()

public boolean hasAmount()

Optional. The amount associated with the goal. This field is required.

optional int64 amount = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the amount field is set.

hasStartTime()

public boolean hasStartTime()

Optional. The start date and time of the goal. This field is required unless use_line_item_start_time is true.

optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the startTime field is set.

hasUseLineItemStartTime()

public boolean hasUseLineItemStartTime()

Optional. Input only. Whether the [LineItem.start_time] should be used for the start date and time of this goal. This field is not persisted and if it is set to true, the [start_time] field will be populated by the line item's start time.

optional bool use_line_item_start_time = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the useLineItemStartTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CustomPacingGoal other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeStartTime(Timestamp value)

public CustomPacingGoal.Builder mergeStartTime(Timestamp value)

Optional. The start date and time of the goal. This field is required unless use_line_item_start_time is true.

optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
CustomPacingGoal.Builder

setAmount(long value)

public CustomPacingGoal.Builder setAmount(long value)

Optional. The amount associated with the goal. This field is required.

optional int64 amount = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The amount to set.

Returns
Type Description
CustomPacingGoal.Builder

This builder for chaining.

setStartTime(Timestamp value)

public CustomPacingGoal.Builder setStartTime(Timestamp value)

Optional. The start date and time of the goal. This field is required unless use_line_item_start_time is true.

optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
CustomPacingGoal.Builder

setStartTime(Timestamp.Builder builderForValue)

public CustomPacingGoal.Builder setStartTime(Timestamp.Builder builderForValue)

Optional. The start date and time of the goal. This field is required unless use_line_item_start_time is true.

optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
CustomPacingGoal.Builder

setUseLineItemStartTime(boolean value)

public CustomPacingGoal.Builder setUseLineItemStartTime(boolean value)

Optional. Input only. Whether the [LineItem.start_time] should be used for the start date and time of this goal. This field is not persisted and if it is set to true, the [start_time] field will be populated by the line item's start time.

optional bool use_line_item_start_time = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value boolean

The useLineItemStartTime to set.

Returns
Type Description
CustomPacingGoal.Builder

This builder for chaining.