Class Program.Builder (0.4.0)

public static final class Program.Builder extends GeneratedMessageV3.Builder<Program.Builder> implements ProgramOrBuilder

Defines participation in a given program for the specified account.

Programs provide a mechanism for adding functionality to merchant accounts. A typical example of this is the Free product listings program, which enables products from a merchant's store to be shown across Google for free.

Protobuf type google.shopping.merchant.accounts.v1beta.Program

Implements

ProgramOrBuilder

Static Methods

getDescriptor()

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

Methods

addActiveRegionCodes(String value)

public Program.Builder addActiveRegionCodes(String value)

Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met.

Region codes are defined by CLDR. This is either a country where the program applies specifically to that country or 001 when the program applies globally.

repeated string active_region_codes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The activeRegionCodes to add.

Returns
Type Description
Program.Builder

This builder for chaining.

addActiveRegionCodesBytes(ByteString value)

public Program.Builder addActiveRegionCodesBytes(ByteString value)

Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met.

Region codes are defined by CLDR. This is either a country where the program applies specifically to that country or 001 when the program applies globally.

repeated string active_region_codes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes of the activeRegionCodes to add.

Returns
Type Description
Program.Builder

This builder for chaining.

addAllActiveRegionCodes(Iterable<String> values)

public Program.Builder addAllActiveRegionCodes(Iterable<String> values)

Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met.

Region codes are defined by CLDR. This is either a country where the program applies specifically to that country or 001 when the program applies globally.

repeated string active_region_codes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<String>

The activeRegionCodes to add.

Returns
Type Description
Program.Builder

This builder for chaining.

addAllUnmetRequirements(Iterable<? extends Program.Requirement> values)

public Program.Builder addAllUnmetRequirements(Iterable<? extends Program.Requirement> values)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<? extends com.google.shopping.merchant.accounts.v1beta.Program.Requirement>
Returns
Type Description
Program.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addUnmetRequirements(Program.Requirement value)

public Program.Builder addUnmetRequirements(Program.Requirement value)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Program.Requirement
Returns
Type Description
Program.Builder

addUnmetRequirements(Program.Requirement.Builder builderForValue)

public Program.Builder addUnmetRequirements(Program.Requirement.Builder builderForValue)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Program.Requirement.Builder
Returns
Type Description
Program.Builder

addUnmetRequirements(int index, Program.Requirement value)

public Program.Builder addUnmetRequirements(int index, Program.Requirement value)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value Program.Requirement
Returns
Type Description
Program.Builder

addUnmetRequirements(int index, Program.Requirement.Builder builderForValue)

public Program.Builder addUnmetRequirements(int index, Program.Requirement.Builder builderForValue)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue Program.Requirement.Builder
Returns
Type Description
Program.Builder

addUnmetRequirementsBuilder()

public Program.Requirement.Builder addUnmetRequirementsBuilder()

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Program.Requirement.Builder

addUnmetRequirementsBuilder(int index)

public Program.Requirement.Builder addUnmetRequirementsBuilder(int index)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Program.Requirement.Builder

build()

public Program build()
Returns
Type Description
Program

buildPartial()

public Program buildPartial()
Returns
Type Description
Program

clear()

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

clearActiveRegionCodes()

public Program.Builder clearActiveRegionCodes()

Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met.

Region codes are defined by CLDR. This is either a country where the program applies specifically to that country or 001 when the program applies globally.

repeated string active_region_codes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Program.Builder

This builder for chaining.

clearDocumentationUri()

public Program.Builder clearDocumentationUri()

Output only. The URL of a Merchant Center help page describing the program.

string documentation_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Program.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Program.Builder clearName()

Identifier. The resource name of the program. Format: accounts/{account}/programs/{program}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
Program.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearState()

public Program.Builder clearState()

Output only. The participation state of the account in the program.

.google.shopping.merchant.accounts.v1beta.Program.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Program.Builder

This builder for chaining.

clearUnmetRequirements()

public Program.Builder clearUnmetRequirements()

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Program.Builder

clone()

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

getActiveRegionCodes(int index)

public String getActiveRegionCodes(int index)

Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met.

Region codes are defined by CLDR. This is either a country where the program applies specifically to that country or 001 when the program applies globally.

repeated string active_region_codes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The activeRegionCodes at the given index.

getActiveRegionCodesBytes(int index)

public ByteString getActiveRegionCodesBytes(int index)

Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met.

Region codes are defined by CLDR. This is either a country where the program applies specifically to that country or 001 when the program applies globally.

repeated string active_region_codes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the activeRegionCodes at the given index.

getActiveRegionCodesCount()

public int getActiveRegionCodesCount()

Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met.

Region codes are defined by CLDR. This is either a country where the program applies specifically to that country or 001 when the program applies globally.

repeated string active_region_codes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The count of activeRegionCodes.

getActiveRegionCodesList()

public ProtocolStringList getActiveRegionCodesList()

Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met.

Region codes are defined by CLDR. This is either a country where the program applies specifically to that country or 001 when the program applies globally.

repeated string active_region_codes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the activeRegionCodes.

getDefaultInstanceForType()

public Program getDefaultInstanceForType()
Returns
Type Description
Program

getDescriptorForType()

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

getDocumentationUri()

public String getDocumentationUri()

Output only. The URL of a Merchant Center help page describing the program.

string documentation_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The documentationUri.

getDocumentationUriBytes()

public ByteString getDocumentationUriBytes()

Output only. The URL of a Merchant Center help page describing the program.

string documentation_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for documentationUri.

getName()

public String getName()

Identifier. The resource name of the program. Format: accounts/{account}/programs/{program}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the program. Format: accounts/{account}/programs/{program}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getState()

public Program.State getState()

Output only. The participation state of the account in the program.

.google.shopping.merchant.accounts.v1beta.Program.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Program.State

The state.

getStateValue()

public int getStateValue()

Output only. The participation state of the account in the program.

.google.shopping.merchant.accounts.v1beta.Program.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getUnmetRequirements(int index)

public Program.Requirement getUnmetRequirements(int index)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Program.Requirement

getUnmetRequirementsBuilder(int index)

public Program.Requirement.Builder getUnmetRequirementsBuilder(int index)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Program.Requirement.Builder

getUnmetRequirementsBuilderList()

public List<Program.Requirement.Builder> getUnmetRequirementsBuilderList()

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Builder>

getUnmetRequirementsCount()

public int getUnmetRequirementsCount()

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getUnmetRequirementsList()

public List<Program.Requirement> getUnmetRequirementsList()

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Requirement>

getUnmetRequirementsOrBuilder(int index)

public Program.RequirementOrBuilder getUnmetRequirementsOrBuilder(int index)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Program.RequirementOrBuilder

getUnmetRequirementsOrBuilderList()

public List<? extends Program.RequirementOrBuilder> getUnmetRequirementsOrBuilderList()

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.shopping.merchant.accounts.v1beta.Program.RequirementOrBuilder>

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 Program.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Program.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(Program other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeUnmetRequirements(int index)

public Program.Builder removeUnmetRequirements(int index)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Program.Builder

setActiveRegionCodes(int index, String value)

public Program.Builder setActiveRegionCodes(int index, String value)

Output only. The regions in which the account is actively participating in the program. Active regions are defined as those where all program requirements affecting the regions have been met.

Region codes are defined by CLDR. This is either a country where the program applies specifically to that country or 001 when the program applies globally.

repeated string active_region_codes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int

The index to set the value at.

value String

The activeRegionCodes to set.

Returns
Type Description
Program.Builder

This builder for chaining.

setDocumentationUri(String value)

public Program.Builder setDocumentationUri(String value)

Output only. The URL of a Merchant Center help page describing the program.

string documentation_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The documentationUri to set.

Returns
Type Description
Program.Builder

This builder for chaining.

setDocumentationUriBytes(ByteString value)

public Program.Builder setDocumentationUriBytes(ByteString value)

Output only. The URL of a Merchant Center help page describing the program.

string documentation_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for documentationUri to set.

Returns
Type Description
Program.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Program.Builder setName(String value)

Identifier. The resource name of the program. Format: accounts/{account}/programs/{program}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Program.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Program.Builder setNameBytes(ByteString value)

Identifier. The resource name of the program. Format: accounts/{account}/programs/{program}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Program.Builder

This builder for chaining.

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

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

setState(Program.State value)

public Program.Builder setState(Program.State value)

Output only. The participation state of the account in the program.

.google.shopping.merchant.accounts.v1beta.Program.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Program.State

The state to set.

Returns
Type Description
Program.Builder

This builder for chaining.

setStateValue(int value)

public Program.Builder setStateValue(int value)

Output only. The participation state of the account in the program.

.google.shopping.merchant.accounts.v1beta.Program.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
Program.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUnmetRequirements(int index, Program.Requirement value)

public Program.Builder setUnmetRequirements(int index, Program.Requirement value)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value Program.Requirement
Returns
Type Description
Program.Builder

setUnmetRequirements(int index, Program.Requirement.Builder builderForValue)

public Program.Builder setUnmetRequirements(int index, Program.Requirement.Builder builderForValue)

Output only. The requirements that the account has not yet satisfied that are affecting participation in the program.

repeated .google.shopping.merchant.accounts.v1beta.Program.Requirement unmet_requirements = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue Program.Requirement.Builder
Returns
Type Description
Program.Builder