Class Period.Builder (3.87.0)

public static final class Period.Builder extends GeneratedMessage.Builder<Period.Builder> implements PeriodOrBuilder

Represents period in days/months/years.

Protobuf type google.cloud.channel.v1.Period

Implements

PeriodOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Period build()
Returns
Type Description
Period

buildPartial()

public Period buildPartial()
Returns
Type Description
Period

clear()

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

clearDuration()

public Period.Builder clearDuration()

Total duration of Period Type defined.

int32 duration = 1;

Returns
Type Description
Period.Builder

This builder for chaining.

clearPeriodType()

public Period.Builder clearPeriodType()

Period Type.

.google.cloud.channel.v1.PeriodType period_type = 2;

Returns
Type Description
Period.Builder

This builder for chaining.

getDefaultInstanceForType()

public Period getDefaultInstanceForType()
Returns
Type Description
Period

getDescriptorForType()

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

getDuration()

public int getDuration()

Total duration of Period Type defined.

int32 duration = 1;

Returns
Type Description
int

The duration.

getPeriodType()

public PeriodType getPeriodType()

Period Type.

.google.cloud.channel.v1.PeriodType period_type = 2;

Returns
Type Description
PeriodType

The periodType.

getPeriodTypeValue()

public int getPeriodTypeValue()

Period Type.

.google.cloud.channel.v1.PeriodType period_type = 2;

Returns
Type Description
int

The enum numeric value on the wire for periodType.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Period other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setDuration(int value)

public Period.Builder setDuration(int value)

Total duration of Period Type defined.

int32 duration = 1;

Parameter
Name Description
value int

The duration to set.

Returns
Type Description
Period.Builder

This builder for chaining.

setPeriodType(PeriodType value)

public Period.Builder setPeriodType(PeriodType value)

Period Type.

.google.cloud.channel.v1.PeriodType period_type = 2;

Parameter
Name Description
value PeriodType

The periodType to set.

Returns
Type Description
Period.Builder

This builder for chaining.

setPeriodTypeValue(int value)

public Period.Builder setPeriodTypeValue(int value)

Period Type.

.google.cloud.channel.v1.PeriodType period_type = 2;

Parameter
Name Description
value int

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

Returns
Type Description
Period.Builder

This builder for chaining.