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

namespace Google\Cloud\Iap\V1;

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

/**
 * Allows customers to configure HTTP request paths that'll allow HTTP OPTIONS
 * call to bypass authentication and authorization.
 *
 * Generated from protobuf message <code>google.cloud.iap.v1.CorsSettings</code>
 */
class CorsSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * Configuration to allow HTTP OPTIONS calls to skip authorization. If
     * undefined, IAP will not apply any special logic to OPTIONS requests.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue allow_http_options = 1;</code>
     */
    private $allow_http_options = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\BoolValue $allow_http_options
     *           Configuration to allow HTTP OPTIONS calls to skip authorization. If
     *           undefined, IAP will not apply any special logic to OPTIONS requests.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Configuration to allow HTTP OPTIONS calls to skip authorization. If
     * undefined, IAP will not apply any special logic to OPTIONS requests.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue allow_http_options = 1;</code>
     * @return \Google\Protobuf\BoolValue|null
     */
    public function getAllowHttpOptions()
    {
        return $this->allow_http_options;
    }

    public function hasAllowHttpOptions()
    {
        return isset($this->allow_http_options);
    }

    public function clearAllowHttpOptions()
    {
        unset($this->allow_http_options);
    }

    /**
     * Returns the unboxed value from <code>getAllowHttpOptions()</code>

     * Configuration to allow HTTP OPTIONS calls to skip authorization. If
     * undefined, IAP will not apply any special logic to OPTIONS requests.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue allow_http_options = 1;</code>
     * @return bool|null
     */
    public function getAllowHttpOptionsValue()
    {
        return $this->readWrapperValue("allow_http_options");
    }

    /**
     * Configuration to allow HTTP OPTIONS calls to skip authorization. If
     * undefined, IAP will not apply any special logic to OPTIONS requests.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue allow_http_options = 1;</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setAllowHttpOptions($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->allow_http_options = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

     * Configuration to allow HTTP OPTIONS calls to skip authorization. If
     * undefined, IAP will not apply any special logic to OPTIONS requests.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue allow_http_options = 1;</code>
     * @param bool|null $var
     * @return $this
     */
    public function setAllowHttpOptionsValue($var)
    {
        $this->writeWrapperValue("allow_http_options", $var);
        return $this;}

}

