Class Period (3.31.0)

public final class Period extends GeneratedMessageV3 implements PeriodOrBuilder

Represents period in days/months/years.

Protobuf type google.cloud.channel.v1.Period

Implements

PeriodOrBuilder

Static Fields

DURATION_FIELD_NUMBER

public static final int DURATION_FIELD_NUMBER
Field Value
TypeDescription
int

PERIOD_TYPE_FIELD_NUMBER

public static final int PERIOD_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Period getDefaultInstance()
Returns
TypeDescription
Period

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Period.Builder newBuilder()
Returns
TypeDescription
Period.Builder

newBuilder(Period prototype)

public static Period.Builder newBuilder(Period prototype)
Parameter
NameDescription
prototypePeriod
Returns
TypeDescription
Period.Builder

parseDelimitedFrom(InputStream input)

public static Period parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Period
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Period parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Period
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Period parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Period
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Period parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Period
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Period parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Period
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Period parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Period
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Period parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Period
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Period parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Period
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Period parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Period
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Period parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Period
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Period parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Period
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Period parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Period
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Period> parser()
Returns
TypeDescription
Parser<Period>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Period getDefaultInstanceForType()
Returns
TypeDescription
Period

getDuration()

public int getDuration()

Total duration of Period Type defined.

int32 duration = 1;

Returns
TypeDescription
int

The duration.

getParserForType()

public Parser<Period> getParserForType()
Returns
TypeDescription
Parser<Period>
Overrides

getPeriodType()

public PeriodType getPeriodType()

Period Type.

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

Returns
TypeDescription
PeriodType

The periodType.

getPeriodTypeValue()

public int getPeriodTypeValue()

Period Type.

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

Returns
TypeDescription
int

The enum numeric value on the wire for periodType.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Period.Builder newBuilderForType()
Returns
TypeDescription
Period.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Period.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Period.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Period.Builder toBuilder()
Returns
TypeDescription
Period.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException