Class ProductDimension.Builder (0.4.0)

public static final class ProductDimension.Builder extends GeneratedMessageV3.Builder<ProductDimension.Builder> implements ProductDimensionOrBuilder

The dimension of the product.

Protobuf type google.shopping.css.v1.ProductDimension

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ProductDimension build()
Returns
TypeDescription
ProductDimension

buildPartial()

public ProductDimension buildPartial()
Returns
TypeDescription
ProductDimension

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUnit()

public ProductDimension.Builder clearUnit()

Required. The dimension units. Acceptable values are:

  • "in"
  • "cm"

string unit = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ProductDimension.Builder

This builder for chaining.

clearValue()

public ProductDimension.Builder clearValue()

Required. The dimension value represented as a number. The value can have a maximum precision of four decimal places.

double value = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ProductDimension.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public ProductDimension getDefaultInstanceForType()
Returns
TypeDescription
ProductDimension

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getUnit()

public String getUnit()

Required. The dimension units. Acceptable values are:

  • "in"
  • "cm"

string unit = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The unit.

getUnitBytes()

public ByteString getUnitBytes()

Required. The dimension units. Acceptable values are:

  • "in"
  • "cm"

string unit = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for unit.

getValue()

public double getValue()

Required. The dimension value represented as a number. The value can have a maximum precision of four decimal places.

double value = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
double

The value.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(ProductDimension other)

public ProductDimension.Builder mergeFrom(ProductDimension other)
Parameter
NameDescription
otherProductDimension
Returns
TypeDescription
ProductDimension.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnit(String value)

public ProductDimension.Builder setUnit(String value)

Required. The dimension units. Acceptable values are:

  • "in"
  • "cm"

string unit = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The unit to set.

Returns
TypeDescription
ProductDimension.Builder

This builder for chaining.

setUnitBytes(ByteString value)

public ProductDimension.Builder setUnitBytes(ByteString value)

Required. The dimension units. Acceptable values are:

  • "in"
  • "cm"

string unit = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for unit to set.

Returns
TypeDescription
ProductDimension.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setValue(double value)

public ProductDimension.Builder setValue(double value)

Required. The dimension value represented as a number. The value can have a maximum precision of four decimal places.

double value = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valuedouble

The value to set.

Returns
TypeDescription
ProductDimension.Builder

This builder for chaining.