Class FrequencyCap.Builder (0.4.0)

public static final class FrequencyCap.Builder extends GeneratedMessageV3.Builder<FrequencyCap.Builder> implements FrequencyCapOrBuilder

Represents a Frequency Cap that can be applied to an entity.

Protobuf type google.ads.admanager.v1.FrequencyCap

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public FrequencyCap build()
Returns
Type Description
FrequencyCap

buildPartial()

public FrequencyCap buildPartial()
Returns
Type Description
FrequencyCap

clear()

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

clearField(Descriptors.FieldDescriptor field)

public FrequencyCap.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
FrequencyCap.Builder
Overrides

clearMaxImpressions()

public FrequencyCap.Builder clearMaxImpressions()

The maximum number of impressions for this frequency cap.

optional int64 max_impressions = 1;

Returns
Type Description
FrequencyCap.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTimeAmount()

public FrequencyCap.Builder clearTimeAmount()

The number of time units over which the frequency cap is effective.

optional int64 time_amount = 2;

Returns
Type Description
FrequencyCap.Builder

This builder for chaining.

clearTimeUnit()

public FrequencyCap.Builder clearTimeUnit()

The units of time of this frequency cap.

optional .google.ads.admanager.v1.TimeUnitEnum.TimeUnit time_unit = 3;

Returns
Type Description
FrequencyCap.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public FrequencyCap getDefaultInstanceForType()
Returns
Type Description
FrequencyCap

getDescriptorForType()

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

getMaxImpressions()

public long getMaxImpressions()

The maximum number of impressions for this frequency cap.

optional int64 max_impressions = 1;

Returns
Type Description
long

The maxImpressions.

getTimeAmount()

public long getTimeAmount()

The number of time units over which the frequency cap is effective.

optional int64 time_amount = 2;

Returns
Type Description
long

The timeAmount.

getTimeUnit()

public TimeUnitEnum.TimeUnit getTimeUnit()

The units of time of this frequency cap.

optional .google.ads.admanager.v1.TimeUnitEnum.TimeUnit time_unit = 3;

Returns
Type Description
TimeUnitEnum.TimeUnit

The timeUnit.

getTimeUnitValue()

public int getTimeUnitValue()

The units of time of this frequency cap.

optional .google.ads.admanager.v1.TimeUnitEnum.TimeUnit time_unit = 3;

Returns
Type Description
int

The enum numeric value on the wire for timeUnit.

hasMaxImpressions()

public boolean hasMaxImpressions()

The maximum number of impressions for this frequency cap.

optional int64 max_impressions = 1;

Returns
Type Description
boolean

Whether the maxImpressions field is set.

hasTimeAmount()

public boolean hasTimeAmount()

The number of time units over which the frequency cap is effective.

optional int64 time_amount = 2;

Returns
Type Description
boolean

Whether the timeAmount field is set.

hasTimeUnit()

public boolean hasTimeUnit()

The units of time of this frequency cap.

optional .google.ads.admanager.v1.TimeUnitEnum.TimeUnit time_unit = 3;

Returns
Type Description
boolean

Whether the timeUnit field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(FrequencyCap other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setMaxImpressions(long value)

public FrequencyCap.Builder setMaxImpressions(long value)

The maximum number of impressions for this frequency cap.

optional int64 max_impressions = 1;

Parameter
Name Description
value long

The maxImpressions to set.

Returns
Type Description
FrequencyCap.Builder

This builder for chaining.

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

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

setTimeAmount(long value)

public FrequencyCap.Builder setTimeAmount(long value)

The number of time units over which the frequency cap is effective.

optional int64 time_amount = 2;

Parameter
Name Description
value long

The timeAmount to set.

Returns
Type Description
FrequencyCap.Builder

This builder for chaining.

setTimeUnit(TimeUnitEnum.TimeUnit value)

public FrequencyCap.Builder setTimeUnit(TimeUnitEnum.TimeUnit value)

The units of time of this frequency cap.

optional .google.ads.admanager.v1.TimeUnitEnum.TimeUnit time_unit = 3;

Parameter
Name Description
value TimeUnitEnum.TimeUnit

The timeUnit to set.

Returns
Type Description
FrequencyCap.Builder

This builder for chaining.

setTimeUnitValue(int value)

public FrequencyCap.Builder setTimeUnitValue(int value)

The units of time of this frequency cap.

optional .google.ads.admanager.v1.TimeUnitEnum.TimeUnit time_unit = 3;

Parameter
Name Description
value int

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

Returns
Type Description
FrequencyCap.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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