<?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>
     */
    private $allow_all_package_names = false;
    /**
     * Optional. Android package names of apps allowed to use the key.
     * Example: 'com.companyname.appname'
     *
     * 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>
     */
    private $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'
     *     @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'
     *
     * 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'
     *
     * 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;
    }

}

