Class ProductChange.Builder (0.10.0)

public static final class ProductChange.Builder extends GeneratedMessageV3.Builder<ProductChange.Builder> implements ProductChangeOrBuilder

The change that happened to the product including old value, new value, country code as the region code and reporting context.

Protobuf type google.shopping.merchant.notifications.v1beta.ProductChange

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ProductChange.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ProductChange.Builder
Overrides

build()

public ProductChange build()
Returns
Type Description
ProductChange

buildPartial()

public ProductChange buildPartial()
Returns
Type Description
ProductChange

clear()

public ProductChange.Builder clear()
Returns
Type Description
ProductChange.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ProductChange.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ProductChange.Builder
Overrides

clearNewValue()

public ProductChange.Builder clearNewValue()

The new value of the changed resource or attribute.

optional string new_value = 2;

Returns
Type Description
ProductChange.Builder

This builder for chaining.

clearOldValue()

public ProductChange.Builder clearOldValue()

The old value of the changed resource or attribute.

optional string old_value = 1;

Returns
Type Description
ProductChange.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ProductChange.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ProductChange.Builder
Overrides

clearRegionCode()

public ProductChange.Builder clearRegionCode()

Countries that have the change (if applicable)

optional string region_code = 3;

Returns
Type Description
ProductChange.Builder

This builder for chaining.

clearReportingContext()

public ProductChange.Builder clearReportingContext()

Reporting contexts that have the change (if applicable)

optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 4;

Returns
Type Description
ProductChange.Builder

This builder for chaining.

clone()

public ProductChange.Builder clone()
Returns
Type Description
ProductChange.Builder
Overrides

getDefaultInstanceForType()

public ProductChange getDefaultInstanceForType()
Returns
Type Description
ProductChange

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getNewValue()

public String getNewValue()

The new value of the changed resource or attribute.

optional string new_value = 2;

Returns
Type Description
String

The newValue.

getNewValueBytes()

public ByteString getNewValueBytes()

The new value of the changed resource or attribute.

optional string new_value = 2;

Returns
Type Description
ByteString

The bytes for newValue.

getOldValue()

public String getOldValue()

The old value of the changed resource or attribute.

optional string old_value = 1;

Returns
Type Description
String

The oldValue.

getOldValueBytes()

public ByteString getOldValueBytes()

The old value of the changed resource or attribute.

optional string old_value = 1;

Returns
Type Description
ByteString

The bytes for oldValue.

getRegionCode()

public String getRegionCode()

Countries that have the change (if applicable)

optional string region_code = 3;

Returns
Type Description
String

The regionCode.

getRegionCodeBytes()

public ByteString getRegionCodeBytes()

Countries that have the change (if applicable)

optional string region_code = 3;

Returns
Type Description
ByteString

The bytes for regionCode.

getReportingContext()

public ReportingContext.ReportingContextEnum getReportingContext()

Reporting contexts that have the change (if applicable)

optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 4;

Returns
Type Description
com.google.shopping.type.ReportingContext.ReportingContextEnum

The reportingContext.

getReportingContextValue()

public int getReportingContextValue()

Reporting contexts that have the change (if applicable)

optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 4;

Returns
Type Description
int

The enum numeric value on the wire for reportingContext.

hasNewValue()

public boolean hasNewValue()

The new value of the changed resource or attribute.

optional string new_value = 2;

Returns
Type Description
boolean

Whether the newValue field is set.

hasOldValue()

public boolean hasOldValue()

The old value of the changed resource or attribute.

optional string old_value = 1;

Returns
Type Description
boolean

Whether the oldValue field is set.

hasRegionCode()

public boolean hasRegionCode()

Countries that have the change (if applicable)

optional string region_code = 3;

Returns
Type Description
boolean

Whether the regionCode field is set.

hasReportingContext()

public boolean hasReportingContext()

Reporting contexts that have the change (if applicable)

optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 4;

Returns
Type Description
boolean

Whether the reportingContext field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ProductChange.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductChange.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ProductChange.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ProductChange.Builder
Overrides

mergeFrom(ProductChange other)

public ProductChange.Builder mergeFrom(ProductChange other)
Parameter
Name Description
other ProductChange
Returns
Type Description
ProductChange.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ProductChange.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ProductChange.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public ProductChange.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ProductChange.Builder
Overrides

setNewValue(String value)

public ProductChange.Builder setNewValue(String value)

The new value of the changed resource or attribute.

optional string new_value = 2;

Parameter
Name Description
value String

The newValue to set.

Returns
Type Description
ProductChange.Builder

This builder for chaining.

setNewValueBytes(ByteString value)

public ProductChange.Builder setNewValueBytes(ByteString value)

The new value of the changed resource or attribute.

optional string new_value = 2;

Parameter
Name Description
value ByteString

The bytes for newValue to set.

Returns
Type Description
ProductChange.Builder

This builder for chaining.

setOldValue(String value)

public ProductChange.Builder setOldValue(String value)

The old value of the changed resource or attribute.

optional string old_value = 1;

Parameter
Name Description
value String

The oldValue to set.

Returns
Type Description
ProductChange.Builder

This builder for chaining.

setOldValueBytes(ByteString value)

public ProductChange.Builder setOldValueBytes(ByteString value)

The old value of the changed resource or attribute.

optional string old_value = 1;

Parameter
Name Description
value ByteString

The bytes for oldValue to set.

Returns
Type Description
ProductChange.Builder

This builder for chaining.

setRegionCode(String value)

public ProductChange.Builder setRegionCode(String value)

Countries that have the change (if applicable)

optional string region_code = 3;

Parameter
Name Description
value String

The regionCode to set.

Returns
Type Description
ProductChange.Builder

This builder for chaining.

setRegionCodeBytes(ByteString value)

public ProductChange.Builder setRegionCodeBytes(ByteString value)

Countries that have the change (if applicable)

optional string region_code = 3;

Parameter
Name Description
value ByteString

The bytes for regionCode to set.

Returns
Type Description
ProductChange.Builder

This builder for chaining.

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

public ProductChange.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ProductChange.Builder
Overrides

setReportingContext(ReportingContext.ReportingContextEnum value)

public ProductChange.Builder setReportingContext(ReportingContext.ReportingContextEnum value)

Reporting contexts that have the change (if applicable)

optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 4;

Parameter
Name Description
value com.google.shopping.type.ReportingContext.ReportingContextEnum

The reportingContext to set.

Returns
Type Description
ProductChange.Builder

This builder for chaining.

setReportingContextValue(int value)

public ProductChange.Builder setReportingContextValue(int value)

Reporting contexts that have the change (if applicable)

optional .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 4;

Parameter
Name Description
value int

The enum numeric value on the wire for reportingContext to set.

Returns
Type Description
ProductChange.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ProductChange.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ProductChange.Builder
Overrides