Class TermsOfServiceAgreementState (1.0.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version latestkeyboard_arrow_down
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 business has accepted a terms of service,
accepted
will be populated, otherwise it will be empty
If the business 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 third-party providers 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.
valid_until
field.
Protobuf type google.shopping.merchant.accounts.v1.TermsOfServiceAgreementState
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int ACCEPTED_FIELD_NUMBER
Field Value
Type
Description
int
public static final int NAME_FIELD_NUMBER
Field Value
Type
Description
int
public static final int REGION_CODE_FIELD_NUMBER
Field Value
Type
Description
int
public static final int REQUIRED_FIELD_NUMBER
Field Value
Type
Description
int
public static final int TERMS_OF_SERVICE_KIND_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
public static TermsOfServiceAgreementState getDefaultInstance ()
public static final Descriptors . Descriptor getDescriptor ()
public static TermsOfServiceAgreementState . Builder newBuilder ()
public static TermsOfServiceAgreementState . Builder newBuilder ( TermsOfServiceAgreementState prototype )
public static TermsOfServiceAgreementState parseDelimitedFrom ( InputStream input )
public static TermsOfServiceAgreementState parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
public static TermsOfServiceAgreementState parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
public static TermsOfServiceAgreementState parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
public static TermsOfServiceAgreementState parseFrom ( ByteString data )
public static TermsOfServiceAgreementState parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static TermsOfServiceAgreementState parseFrom ( CodedInputStream input )
public static TermsOfServiceAgreementState parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static TermsOfServiceAgreementState parseFrom ( InputStream input )
public static TermsOfServiceAgreementState parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
public static TermsOfServiceAgreementState parseFrom ( ByteBuffer data )
public static TermsOfServiceAgreementState parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
public static Parser<TermsOfServiceAgreementState> parser ()
Methods
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
public Accepted getAccepted ()
Optional. The accepted terms of service of this kind and for the associated
region_code
optional .google.shopping.merchant.accounts.v1.Accepted accepted = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
Accepted
The accepted.
public AcceptedOrBuilder getAcceptedOrBuilder ()
Optional. The accepted terms of service of this kind and for the associated
region_code
optional .google.shopping.merchant.accounts.v1.Accepted accepted = 4 [(.google.api.field_behavior) = OPTIONAL];
public TermsOfServiceAgreementState getDefaultInstanceForType ()
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-EU
or
MERCHANT_CENTER-US
.
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
Returns
Type
Description
String
The name.
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-EU
or
MERCHANT_CENTER-US
.
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
Returns
Type
Description
ByteString
The bytes for name.
public Parser<TermsOfServiceAgreementState> getParserForType ()
Overrides
public String getRegionCode ()
Required. Region code as defined by https://cldr.unicode.org/ . This is the
country the current state applies to.
string region_code = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
String
The regionCode.
public ByteString getRegionCodeBytes ()
Required. Region code as defined by https://cldr.unicode.org/ . This is the
country the current state applies to.
string region_code = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
ByteString
The bytes for regionCode.
public Required getRequired ()
Optional. The required terms of service
optional .google.shopping.merchant.accounts.v1.Required required = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
Required
The required.
public RequiredOrBuilder getRequiredOrBuilder ()
Optional. The required terms of service
optional .google.shopping.merchant.accounts.v1.Required required = 5 [(.google.api.field_behavior) = OPTIONAL];
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
public TermsOfServiceKind getTermsOfServiceKind ()
Required. Terms of Service kind associated with the particular version.
.google.shopping.merchant.accounts.v1.TermsOfServiceKind terms_of_service_kind = 3 [(.google.api.field_behavior) = REQUIRED];
public int getTermsOfServiceKindValue ()
Required. Terms of Service kind associated with the particular version.
.google.shopping.merchant.accounts.v1.TermsOfServiceKind terms_of_service_kind = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
int
The enum numeric value on the wire for termsOfServiceKind.
public boolean hasAccepted ()
Optional. The accepted terms of service of this kind and for the associated
region_code
optional .google.shopping.merchant.accounts.v1.Accepted accepted = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
boolean
Whether the accepted field is set.
public boolean hasRequired ()
Optional. The required terms of service
optional .google.shopping.merchant.accounts.v1.Required required = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
boolean
Whether the required field is set.
Returns
Type
Description
int
Overrides
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
public final boolean isInitialized ()
Overrides
public TermsOfServiceAgreementState . Builder newBuilderForType ()
protected TermsOfServiceAgreementState . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
public TermsOfServiceAgreementState . Builder toBuilder ()
public void writeTo ( CodedOutputStream output )
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-16 UTC."],[],[],null,[]]