Class FixedOrPercent.Builder (2.25.0)

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

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

Protobuf type google.cloud.osconfig.v1alpha.FixedOrPercent

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public FixedOrPercent build()
Returns
TypeDescription
FixedOrPercent

buildPartial()

public FixedOrPercent buildPartial()
Returns
TypeDescription
FixedOrPercent

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearFixed()

public FixedOrPercent.Builder clearFixed()

Specifies a fixed value.

int32 fixed = 1;

Returns
TypeDescription
FixedOrPercent.Builder

This builder for chaining.

clearMode()

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPercent()

public FixedOrPercent.Builder clearPercent()

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

int32 percent = 2;

Returns
TypeDescription
FixedOrPercent.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public FixedOrPercent getDefaultInstanceForType()
Returns
TypeDescription
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 FixedOrPercent.ModeCase getModeCase()
Returns
TypeDescription
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(FixedOrPercent other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setFixed(int value)

public FixedOrPercent.Builder setFixed(int value)

Specifies a fixed value.

int32 fixed = 1;

Parameter
NameDescription
valueint

The fixed to set.

Returns
TypeDescription
FixedOrPercent.Builder

This builder for chaining.

setPercent(int value)

public 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
FixedOrPercent.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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