Class AndroidKeySettings.Builder (3.80.0)

public static final class AndroidKeySettings.Builder extends GeneratedMessage.Builder<AndroidKeySettings.Builder> implements AndroidKeySettingsOrBuilder

Settings specific to keys that can be used by Android apps.

Protobuf type google.cloud.recaptchaenterprise.v1.AndroidKeySettings

Static Methods

getDescriptor()

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

Methods

addAllAllowedPackageNames(Iterable<String> values)

public AndroidKeySettings.Builder addAllAllowedPackageNames(Iterable<String> values)

Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set allow_all_package_names to true. When this is set, you are responsible for validating the package name by checking the token_properties.android_package_name field in each assessment response against your list of allowed package names.

repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The allowedPackageNames to add.

Returns
Type Description
AndroidKeySettings.Builder

This builder for chaining.

addAllowedPackageNames(String value)

public AndroidKeySettings.Builder addAllowedPackageNames(String value)

Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set allow_all_package_names to true. When this is set, you are responsible for validating the package name by checking the token_properties.android_package_name field in each assessment response against your list of allowed package names.

repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The allowedPackageNames to add.

Returns
Type Description
AndroidKeySettings.Builder

This builder for chaining.

addAllowedPackageNamesBytes(ByteString value)

public AndroidKeySettings.Builder addAllowedPackageNamesBytes(ByteString value)

Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set allow_all_package_names to true. When this is set, you are responsible for validating the package name by checking the token_properties.android_package_name field in each assessment response against your list of allowed package names.

repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the allowedPackageNames to add.

Returns
Type Description
AndroidKeySettings.Builder

This builder for chaining.

build()

public AndroidKeySettings build()
Returns
Type Description
AndroidKeySettings

buildPartial()

public AndroidKeySettings buildPartial()
Returns
Type Description
AndroidKeySettings

clear()

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

clearAllowAllPackageNames()

public AndroidKeySettings.Builder clearAllowAllPackageNames()

Optional. If set to true, allowed_package_names are not enforced.

bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AndroidKeySettings.Builder

This builder for chaining.

clearAllowedPackageNames()

public AndroidKeySettings.Builder clearAllowedPackageNames()

Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set allow_all_package_names to true. When this is set, you are responsible for validating the package name by checking the token_properties.android_package_name field in each assessment response against your list of allowed package names.

repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AndroidKeySettings.Builder

This builder for chaining.

clearSupportNonGoogleAppStoreDistribution()

public AndroidKeySettings.Builder clearSupportNonGoogleAppStoreDistribution()

Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.

bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AndroidKeySettings.Builder

This builder for chaining.

getAllowAllPackageNames()

public boolean getAllowAllPackageNames()

Optional. If set to true, allowed_package_names are not enforced.

bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The allowAllPackageNames.

getAllowedPackageNames(int index)

public String getAllowedPackageNames(int index)

Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set allow_all_package_names to true. When this is set, you are responsible for validating the package name by checking the token_properties.android_package_name field in each assessment response against your list of allowed package names.

repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The allowedPackageNames at the given index.

getAllowedPackageNamesBytes(int index)

public ByteString getAllowedPackageNamesBytes(int index)

Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set allow_all_package_names to true. When this is set, you are responsible for validating the package name by checking the token_properties.android_package_name field in each assessment response against your list of allowed package names.

repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowedPackageNames at the given index.

getAllowedPackageNamesCount()

public int getAllowedPackageNamesCount()

Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set allow_all_package_names to true. When this is set, you are responsible for validating the package name by checking the token_properties.android_package_name field in each assessment response against your list of allowed package names.

repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of allowedPackageNames.

getAllowedPackageNamesList()

public ProtocolStringList getAllowedPackageNamesList()

Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set allow_all_package_names to true. When this is set, you are responsible for validating the package name by checking the token_properties.android_package_name field in each assessment response against your list of allowed package names.

repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the allowedPackageNames.

getDefaultInstanceForType()

public AndroidKeySettings getDefaultInstanceForType()
Returns
Type Description
AndroidKeySettings

getDescriptorForType()

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

getSupportNonGoogleAppStoreDistribution()

public boolean getSupportNonGoogleAppStoreDistribution()

Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.

bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The supportNonGoogleAppStoreDistribution.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(AndroidKeySettings other)

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

setAllowAllPackageNames(boolean value)

public AndroidKeySettings.Builder setAllowAllPackageNames(boolean value)

Optional. If set to true, allowed_package_names are not enforced.

bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The allowAllPackageNames to set.

Returns
Type Description
AndroidKeySettings.Builder

This builder for chaining.

setAllowedPackageNames(int index, String value)

public AndroidKeySettings.Builder setAllowedPackageNames(int index, String value)

Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set allow_all_package_names to true. When this is set, you are responsible for validating the package name by checking the token_properties.android_package_name field in each assessment response against your list of allowed package names.

repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The allowedPackageNames to set.

Returns
Type Description
AndroidKeySettings.Builder

This builder for chaining.

setSupportNonGoogleAppStoreDistribution(boolean value)

public AndroidKeySettings.Builder setSupportNonGoogleAppStoreDistribution(boolean value)

Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.

bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The supportNonGoogleAppStoreDistribution to set.

Returns
Type Description
AndroidKeySettings.Builder

This builder for chaining.