Class TermsOfServiceAgreementState (0.7.0)

public final class TermsOfServiceAgreementState extends GeneratedMessageV3 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 Fields

ACCEPTED_FIELD_NUMBER

public static final int ACCEPTED_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

REGION_CODE_FIELD_NUMBER

public static final int REGION_CODE_FIELD_NUMBER
Field Value
Type Description
int

REQUIRED_FIELD_NUMBER

public static final int REQUIRED_FIELD_NUMBER
Field Value
Type Description
int

TERMS_OF_SERVICE_KIND_FIELD_NUMBER

public static final int TERMS_OF_SERVICE_KIND_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static TermsOfServiceAgreementState getDefaultInstance()
Returns
Type Description
TermsOfServiceAgreementState

getDescriptor()

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

newBuilder()

public static TermsOfServiceAgreementState.Builder newBuilder()
Returns
Type Description
TermsOfServiceAgreementState.Builder

newBuilder(TermsOfServiceAgreementState prototype)

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

parseDelimitedFrom(InputStream input)

public static TermsOfServiceAgreementState parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TermsOfServiceAgreementState
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static TermsOfServiceAgreementState parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
TermsOfServiceAgreementState
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static TermsOfServiceAgreementState parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
TermsOfServiceAgreementState
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static TermsOfServiceAgreementState parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TermsOfServiceAgreementState
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static TermsOfServiceAgreementState parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
TermsOfServiceAgreementState
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<TermsOfServiceAgreementState> parser()
Returns
Type Description
Parser<TermsOfServiceAgreementState>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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.

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

getName()

public String getName()

Identifier. The resource name of the terms of service version. Format: accounts/{account}/termsOfServiceAgreementState/{identifier} The identifier format is: {TermsOfServiceKind}-{country} For example, an identifier could be: MERCHANT_CENTER-US

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} The identifier format is: {TermsOfServiceKind}-{country} For example, an identifier could be: MERCHANT_CENTER-US

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

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<TermsOfServiceAgreementState> getParserForType()
Returns
Type Description
Parser<TermsOfServiceAgreementState>
Overrides

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.

getRequiredOrBuilder()

public RequiredOrBuilder getRequiredOrBuilder()

The required terms of service

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

Returns
Type Description
RequiredOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public TermsOfServiceAgreementState.Builder newBuilderForType()
Returns
Type Description
TermsOfServiceAgreementState.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TermsOfServiceAgreementState.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
TermsOfServiceAgreementState.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public TermsOfServiceAgreementState.Builder toBuilder()
Returns
Type Description
TermsOfServiceAgreementState.Builder

writeTo(CodedOutputStream output)

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