Class TermsOfServiceAgreementState.Builder (0.2.0)

public static final class TermsOfServiceAgreementState.Builder extends GeneratedMessageV3.Builder<TermsOfServiceAgreementState.Builder> implements TermsOfServiceAgreementStateOrBuilder

This resource represents the agreement state for a given account and terms of service kind. The state is as follows:

  • If the merchant has accepted a terms of service: accepted will be populated, otherwise it will be empty
  • If the merchant must sign a terms of service: required will be populated, otherwise it will be empty.

    Note that both required and accepted can be present. In this case the accepted terms of services will have an expiration date set in the valid_until field. The required terms of services need to be accepted before valid_until in order for the account to continue having a valid agreement. When accepting new terms of services we expect 3Ps to display the text associated with the given terms of service agreement (the url to the file containing the text is added in the Required message below as tos_file_uri. The actual acceptance of the terms of service is done by calling accept on the TermsOfService resource.

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

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TermsOfServiceAgreementState build()
Returns
Type Description
TermsOfServiceAgreementState

buildPartial()

public TermsOfServiceAgreementState buildPartial()
Returns
Type Description
TermsOfServiceAgreementState

clear()

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

clearAccepted()

public TermsOfServiceAgreementState.Builder clearAccepted()

The accepted terms of service of this kind and for the associated region_code

optional .google.shopping.merchant.accounts.v1beta.Accepted accepted = 4;

Returns
Type Description
TermsOfServiceAgreementState.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public TermsOfServiceAgreementState.Builder clearName()

Identifier. The resource name of the terms of service version. Format: accounts/{account}/termsOfServiceAgreementState/{identifier}

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

Returns
Type Description
TermsOfServiceAgreementState.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRegionCode()

public TermsOfServiceAgreementState.Builder clearRegionCode()

Region code as defined by https://cldr.unicode.org/. This is the country the current state applies to.

string region_code = 2;

Returns
Type Description
TermsOfServiceAgreementState.Builder

This builder for chaining.

clearRequired()

public TermsOfServiceAgreementState.Builder clearRequired()

The required terms of service

optional .google.shopping.merchant.accounts.v1beta.Required required = 5;

Returns
Type Description
TermsOfServiceAgreementState.Builder

clearTermsOfServiceKind()

public TermsOfServiceAgreementState.Builder clearTermsOfServiceKind()

Terms of Service kind associated with the particular version.

.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind terms_of_service_kind = 3;

Returns
Type Description
TermsOfServiceAgreementState.Builder

This builder for chaining.

clone()

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

getAccepted()

public Accepted getAccepted()

The accepted terms of service of this kind and for the associated region_code

optional .google.shopping.merchant.accounts.v1beta.Accepted accepted = 4;

Returns
Type Description
Accepted

The accepted.

getAcceptedBuilder()

public Accepted.Builder getAcceptedBuilder()

The accepted terms of service of this kind and for the associated region_code

optional .google.shopping.merchant.accounts.v1beta.Accepted accepted = 4;

Returns
Type Description
Accepted.Builder

getAcceptedOrBuilder()

public AcceptedOrBuilder getAcceptedOrBuilder()

The accepted terms of service of this kind and for the associated region_code

optional .google.shopping.merchant.accounts.v1beta.Accepted accepted = 4;

Returns
Type Description
AcceptedOrBuilder

getDefaultInstanceForType()

public TermsOfServiceAgreementState getDefaultInstanceForType()
Returns
Type Description
TermsOfServiceAgreementState

getDescriptorForType()

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

getName()

public String getName()

Identifier. The resource name of the terms of service version. Format: accounts/{account}/termsOfServiceAgreementState/{identifier}

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the terms of service version. Format: accounts/{account}/termsOfServiceAgreementState/{identifier}

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

Returns
Type Description
ByteString

The bytes for name.

getRegionCode()

public String getRegionCode()

Region code as defined by https://cldr.unicode.org/. This is the country the current state applies to.

string region_code = 2;

Returns
Type Description
String

The regionCode.

getRegionCodeBytes()

public ByteString getRegionCodeBytes()

Region code as defined by https://cldr.unicode.org/. This is the country the current state applies to.

string region_code = 2;

Returns
Type Description
ByteString

The bytes for regionCode.

getRequired()

public Required getRequired()

The required terms of service

optional .google.shopping.merchant.accounts.v1beta.Required required = 5;

Returns
Type Description
Required

The required.

getRequiredBuilder()

public Required.Builder getRequiredBuilder()

The required terms of service

optional .google.shopping.merchant.accounts.v1beta.Required required = 5;

Returns
Type Description
Required.Builder

getRequiredOrBuilder()

public RequiredOrBuilder getRequiredOrBuilder()

The required terms of service

optional .google.shopping.merchant.accounts.v1beta.Required required = 5;

Returns
Type Description
RequiredOrBuilder

getTermsOfServiceKind()

public TermsOfServiceKind getTermsOfServiceKind()

Terms of Service kind associated with the particular version.

.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind terms_of_service_kind = 3;

Returns
Type Description
TermsOfServiceKind

The termsOfServiceKind.

getTermsOfServiceKindValue()

public int getTermsOfServiceKindValue()

Terms of Service kind associated with the particular version.

.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind terms_of_service_kind = 3;

Returns
Type Description
int

The enum numeric value on the wire for termsOfServiceKind.

hasAccepted()

public boolean hasAccepted()

The accepted terms of service of this kind and for the associated region_code

optional .google.shopping.merchant.accounts.v1beta.Accepted accepted = 4;

Returns
Type Description
boolean

Whether the accepted field is set.

hasRequired()

public boolean hasRequired()

The required terms of service

optional .google.shopping.merchant.accounts.v1beta.Required required = 5;

Returns
Type Description
boolean

Whether the required field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAccepted(Accepted value)

public TermsOfServiceAgreementState.Builder mergeAccepted(Accepted value)

The accepted terms of service of this kind and for the associated region_code

optional .google.shopping.merchant.accounts.v1beta.Accepted accepted = 4;

Parameter
Name Description
value Accepted
Returns
Type Description
TermsOfServiceAgreementState.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(TermsOfServiceAgreementState other)

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

mergeRequired(Required value)

public TermsOfServiceAgreementState.Builder mergeRequired(Required value)

The required terms of service

optional .google.shopping.merchant.accounts.v1beta.Required required = 5;

Parameter
Name Description
value Required
Returns
Type Description
TermsOfServiceAgreementState.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAccepted(Accepted value)

public TermsOfServiceAgreementState.Builder setAccepted(Accepted value)

The accepted terms of service of this kind and for the associated region_code

optional .google.shopping.merchant.accounts.v1beta.Accepted accepted = 4;

Parameter
Name Description
value Accepted
Returns
Type Description
TermsOfServiceAgreementState.Builder

setAccepted(Accepted.Builder builderForValue)

public TermsOfServiceAgreementState.Builder setAccepted(Accepted.Builder builderForValue)

The accepted terms of service of this kind and for the associated region_code

optional .google.shopping.merchant.accounts.v1beta.Accepted accepted = 4;

Parameter
Name Description
builderForValue Accepted.Builder
Returns
Type Description
TermsOfServiceAgreementState.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public TermsOfServiceAgreementState.Builder setName(String value)

Identifier. The resource name of the terms of service version. Format: accounts/{account}/termsOfServiceAgreementState/{identifier}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
TermsOfServiceAgreementState.Builder

This builder for chaining.

setNameBytes(ByteString value)

public TermsOfServiceAgreementState.Builder setNameBytes(ByteString value)

Identifier. The resource name of the terms of service version. Format: accounts/{account}/termsOfServiceAgreementState/{identifier}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
TermsOfServiceAgreementState.Builder

This builder for chaining.

setRegionCode(String value)

public TermsOfServiceAgreementState.Builder setRegionCode(String value)

Region code as defined by https://cldr.unicode.org/. This is the country the current state applies to.

string region_code = 2;

Parameter
Name Description
value String

The regionCode to set.

Returns
Type Description
TermsOfServiceAgreementState.Builder

This builder for chaining.

setRegionCodeBytes(ByteString value)

public TermsOfServiceAgreementState.Builder setRegionCodeBytes(ByteString value)

Region code as defined by https://cldr.unicode.org/. This is the country the current state applies to.

string region_code = 2;

Parameter
Name Description
value ByteString

The bytes for regionCode to set.

Returns
Type Description
TermsOfServiceAgreementState.Builder

This builder for chaining.

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

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

setRequired(Required value)

public TermsOfServiceAgreementState.Builder setRequired(Required value)

The required terms of service

optional .google.shopping.merchant.accounts.v1beta.Required required = 5;

Parameter
Name Description
value Required
Returns
Type Description
TermsOfServiceAgreementState.Builder

setRequired(Required.Builder builderForValue)

public TermsOfServiceAgreementState.Builder setRequired(Required.Builder builderForValue)

The required terms of service

optional .google.shopping.merchant.accounts.v1beta.Required required = 5;

Parameter
Name Description
builderForValue Required.Builder
Returns
Type Description
TermsOfServiceAgreementState.Builder

setTermsOfServiceKind(TermsOfServiceKind value)

public TermsOfServiceAgreementState.Builder setTermsOfServiceKind(TermsOfServiceKind value)

Terms of Service kind associated with the particular version.

.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind terms_of_service_kind = 3;

Parameter
Name Description
value TermsOfServiceKind

The termsOfServiceKind to set.

Returns
Type Description
TermsOfServiceAgreementState.Builder

This builder for chaining.

setTermsOfServiceKindValue(int value)

public TermsOfServiceAgreementState.Builder setTermsOfServiceKindValue(int value)

Terms of Service kind associated with the particular version.

.google.shopping.merchant.accounts.v1beta.TermsOfServiceKind terms_of_service_kind = 3;

Parameter
Name Description
value int

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

Returns
Type Description
TermsOfServiceAgreementState.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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