Copied!
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto

namespace Google\Cloud\RecaptchaEnterprise\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Settings specific to keys that can be used by Android apps.
 *
 * Generated from protobuf message <code>google.cloud.recaptchaenterprise.v1.AndroidKeySettings</code>
 */
class AndroidKeySettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. If set to true, allowed_package_names are not enforced.
     *
     * Generated from protobuf field <code>bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $allow_all_package_names = false;
    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $allowed_package_names;
    /**
     * 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.
     *
     * Generated from protobuf field <code>bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $support_non_google_app_store_distribution = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $allow_all_package_names
     *           Optional. If set to true, allowed_package_names are not enforced.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $allowed_package_names
     *           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.
     *     @type bool $support_non_google_app_store_distribution
     *           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.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. If set to true, allowed_package_names are not enforced.
     *
     * Generated from protobuf field <code>bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getAllowAllPackageNames()
    {
        return $this->allow_all_package_names;
    }

    /**
     * Optional. If set to true, allowed_package_names are not enforced.
     *
     * Generated from protobuf field <code>bool allow_all_package_names = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setAllowAllPackageNames($var)
    {
        GPBUtil::checkBool($var);
        $this->allow_all_package_names = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAllowedPackageNames()
    {
        return $this->allowed_package_names;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>repeated string allowed_package_names = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAllowedPackageNames($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->allowed_package_names = $arr;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getSupportNonGoogleAppStoreDistribution()
    {
        return $this->support_non_google_app_store_distribution;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>bool support_non_google_app_store_distribution = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setSupportNonGoogleAppStoreDistribution($var)
    {
        GPBUtil::checkBool($var);
        $this->support_non_google_app_store_distribution = $var;

        return $this;
    }

}

© 2026 Bruce Wells
Search Namespaces \ Classes
Configuration