Class Common.FixedOrPercent.Builder (2.31.0)

public static final class Common.FixedOrPercent.Builder extends GeneratedMessageV3.Builder<Common.FixedOrPercent.Builder> implements Common.FixedOrPercentOrBuilder

Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value.

Protobuf type google.cloud.osconfig.v1.FixedOrPercent

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Common.FixedOrPercent.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides

build()

public Common.FixedOrPercent build()
Returns
TypeDescription
Common.FixedOrPercent

buildPartial()

public Common.FixedOrPercent buildPartial()
Returns
TypeDescription
Common.FixedOrPercent

clear()

public Common.FixedOrPercent.Builder clear()
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Common.FixedOrPercent.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides

clearFixed()

public Common.FixedOrPercent.Builder clearFixed()

Specifies a fixed value.

int32 fixed = 1;

Returns
TypeDescription
Common.FixedOrPercent.Builder

This builder for chaining.

clearMode()

public Common.FixedOrPercent.Builder clearMode()
Returns
TypeDescription
Common.FixedOrPercent.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Common.FixedOrPercent.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides

clearPercent()

public Common.FixedOrPercent.Builder clearPercent()

Specifies the relative value defined as a percentage, which will be multiplied by a reference value.

int32 percent = 2;

Returns
TypeDescription
Common.FixedOrPercent.Builder

This builder for chaining.

clone()

public Common.FixedOrPercent.Builder clone()
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides

getDefaultInstanceForType()

public Common.FixedOrPercent getDefaultInstanceForType()
Returns
TypeDescription
Common.FixedOrPercent

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFixed()

public int getFixed()

Specifies a fixed value.

int32 fixed = 1;

Returns
TypeDescription
int

The fixed.

getModeCase()

public Common.FixedOrPercent.ModeCase getModeCase()
Returns
TypeDescription
Common.FixedOrPercent.ModeCase

getPercent()

public int getPercent()

Specifies the relative value defined as a percentage, which will be multiplied by a reference value.

int32 percent = 2;

Returns
TypeDescription
int

The percent.

hasFixed()

public boolean hasFixed()

Specifies a fixed value.

int32 fixed = 1;

Returns
TypeDescription
boolean

Whether the fixed field is set.

hasPercent()

public boolean hasPercent()

Specifies the relative value defined as a percentage, which will be multiplied by a reference value.

int32 percent = 2;

Returns
TypeDescription
boolean

Whether the percent field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Common.FixedOrPercent other)

public Common.FixedOrPercent.Builder mergeFrom(Common.FixedOrPercent other)
Parameter
NameDescription
otherCommon.FixedOrPercent
Returns
TypeDescription
Common.FixedOrPercent.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Common.FixedOrPercent.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Common.FixedOrPercent.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Common.FixedOrPercent.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Common.FixedOrPercent.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides

setFixed(int value)

public Common.FixedOrPercent.Builder setFixed(int value)

Specifies a fixed value.

int32 fixed = 1;

Parameter
NameDescription
valueint

The fixed to set.

Returns
TypeDescription
Common.FixedOrPercent.Builder

This builder for chaining.

setPercent(int value)

public Common.FixedOrPercent.Builder setPercent(int value)

Specifies the relative value defined as a percentage, which will be multiplied by a reference value.

int32 percent = 2;

Parameter
NameDescription
valueint

The percent to set.

Returns
TypeDescription
Common.FixedOrPercent.Builder

This builder for chaining.

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

public Common.FixedOrPercent.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Common.FixedOrPercent.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Common.FixedOrPercent.Builder
Overrides