<?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;

/**
 * Custom content configuration for access denied page.
 * IAP allows customers to define a custom URI to use as the error page when
 * access is denied to users. If IAP prevents access to this page, the default
 * IAP error page will be displayed instead.
 *
 * Generated from protobuf message <code>google.cloud.iap.v1.AccessDeniedPageSettings</code>
 */
class AccessDeniedPageSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * The URI to be redirected to when access is denied.
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue access_denied_page_uri = 1;</code>
     */
    private $access_denied_page_uri = null;
    /**
     * Whether to generate a troubleshooting URL on access denied events to this
     * application.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue generate_troubleshooting_uri = 2;</code>
     */
    private $generate_troubleshooting_uri = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\StringValue $access_denied_page_uri
     *           The URI to be redirected to when access is denied.
     *     @type \Google\Protobuf\BoolValue $generate_troubleshooting_uri
     *           Whether to generate a troubleshooting URL on access denied events to this
     *           application.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Iap\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * The URI to be redirected to when access is denied.
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue access_denied_page_uri = 1;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getAccessDeniedPageUri()
    {
        return $this->access_denied_page_uri;
    }

    public function hasAccessDeniedPageUri()
    {
        return isset($this->access_denied_page_uri);
    }

    public function clearAccessDeniedPageUri()
    {
        unset($this->access_denied_page_uri);
    }

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

     * The URI to be redirected to when access is denied.
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue access_denied_page_uri = 1;</code>
     * @return string|null
     */
    public function getAccessDeniedPageUriValue()
    {
        return $this->readWrapperValue("access_denied_page_uri");
    }

    /**
     * The URI to be redirected to when access is denied.
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue access_denied_page_uri = 1;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setAccessDeniedPageUri($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->access_denied_page_uri = $var;

        return $this;
    }

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

     * The URI to be redirected to when access is denied.
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue access_denied_page_uri = 1;</code>
     * @param string|null $var
     * @return $this
     */
    public function setAccessDeniedPageUriValue($var)
    {
        $this->writeWrapperValue("access_denied_page_uri", $var);
        return $this;}

    /**
     * Whether to generate a troubleshooting URL on access denied events to this
     * application.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue generate_troubleshooting_uri = 2;</code>
     * @return \Google\Protobuf\BoolValue|null
     */
    public function getGenerateTroubleshootingUri()
    {
        return $this->generate_troubleshooting_uri;
    }

    public function hasGenerateTroubleshootingUri()
    {
        return isset($this->generate_troubleshooting_uri);
    }

    public function clearGenerateTroubleshootingUri()
    {
        unset($this->generate_troubleshooting_uri);
    }

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

     * Whether to generate a troubleshooting URL on access denied events to this
     * application.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue generate_troubleshooting_uri = 2;</code>
     * @return bool|null
     */
    public function getGenerateTroubleshootingUriValue()
    {
        return $this->readWrapperValue("generate_troubleshooting_uri");
    }

    /**
     * Whether to generate a troubleshooting URL on access denied events to this
     * application.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue generate_troubleshooting_uri = 2;</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setGenerateTroubleshootingUri($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->generate_troubleshooting_uri = $var;

        return $this;
    }

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

     * Whether to generate a troubleshooting URL on access denied events to this
     * application.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue generate_troubleshooting_uri = 2;</code>
     * @param bool|null $var
     * @return $this
     */
    public function setGenerateTroubleshootingUriValue($var)
    {
        $this->writeWrapperValue("generate_troubleshooting_uri", $var);
        return $this;}

}

