Class ProductAttributes.RelatedProduct (1.23.0)

public static final class ProductAttributes.RelatedProduct extends GeneratedMessage implements ProductAttributes.RelatedProductOrBuilder

Specifies how other products are related to this product.

Protobuf type google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > ProductAttributes.RelatedProduct

Static Fields

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

ID_TYPE_FIELD_NUMBER

public static final int ID_TYPE_FIELD_NUMBER
Field Value
Type Description
int

RELATIONSHIP_TYPE_FIELD_NUMBER

public static final int RELATIONSHIP_TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ProductAttributes.RelatedProduct getDefaultInstance()
Returns
Type Description
ProductAttributes.RelatedProduct

getDescriptor()

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

newBuilder()

public static ProductAttributes.RelatedProduct.Builder newBuilder()
Returns
Type Description
ProductAttributes.RelatedProduct.Builder

newBuilder(ProductAttributes.RelatedProduct prototype)

public static ProductAttributes.RelatedProduct.Builder newBuilder(ProductAttributes.RelatedProduct prototype)
Parameter
Name Description
prototype ProductAttributes.RelatedProduct
Returns
Type Description
ProductAttributes.RelatedProduct.Builder

parseDelimitedFrom(InputStream input)

public static ProductAttributes.RelatedProduct parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.RelatedProduct parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ProductAttributes.RelatedProduct parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.RelatedProduct parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ProductAttributes.RelatedProduct parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.RelatedProduct parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ProductAttributes.RelatedProduct parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.RelatedProduct parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ProductAttributes.RelatedProduct parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.RelatedProduct parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ProductAttributes.RelatedProduct parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ProductAttributes.RelatedProduct parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductAttributes.RelatedProduct
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ProductAttributes.RelatedProduct> parser()
Returns
Type Description
Parser<RelatedProduct>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public ProductAttributes.RelatedProduct getDefaultInstanceForType()
Returns
Type Description
ProductAttributes.RelatedProduct

getId()

public String getId()

Required. The identifier of the related product.

string id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

Required. The identifier of the related product.

string id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for id.

getIdType()

public ProductAttributes.RelatedProduct.IdType getIdType()

Required. The type of the identifier of the related product. For example, GTIN or product ID.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdType id_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.RelatedProduct.IdType

The idType.

getIdTypeValue()

public int getIdTypeValue()

Required. The type of the identifier of the related product. For example, GTIN or product ID.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.IdType id_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for idType.

getParserForType()

public Parser<ProductAttributes.RelatedProduct> getParserForType()
Returns
Type Description
Parser<RelatedProduct>
Overrides

getRelationshipType()

public ProductAttributes.RelatedProduct.RelationshipType getRelationshipType()

Required. The type of the relationship between this product and the related product.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipType relationship_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.RelatedProduct.RelationshipType

The relationshipType.

getRelationshipTypeValue()

public int getRelationshipTypeValue()

Required. The type of the relationship between this product and the related product.

.google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct.RelationshipType relationship_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for relationshipType.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ProductAttributes.RelatedProduct.Builder newBuilderForType()
Returns
Type Description
ProductAttributes.RelatedProduct.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected ProductAttributes.RelatedProduct.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ProductAttributes.RelatedProduct.Builder
Overrides

toBuilder()

public ProductAttributes.RelatedProduct.Builder toBuilder()
Returns
Type Description
ProductAttributes.RelatedProduct.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException