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

namespace Google\Cloud\ModelArmor\V1beta;

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

/**
 * message describing AiPlatformFloorSetting
 *
 * Generated from protobuf message <code>google.cloud.modelarmor.v1beta.AiPlatformFloorSetting</code>
 */
class AiPlatformFloorSetting extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. If true, log Model Armor filter results to Cloud Logging.
     *
     * Generated from protobuf field <code>bool enable_cloud_logging = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $enable_cloud_logging = false;
    protected $enforcement_type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $inspect_only
     *           Optional. If true, Model Armor filters will be run in inspect only mode.
     *           No action will be taken on the request.
     *     @type bool $inspect_and_block
     *           Optional. If true, Model Armor filters will be run in inspect and block
     *           mode. Requests that trip Model Armor filters will be blocked.
     *     @type bool $enable_cloud_logging
     *           Optional. If true, log Model Armor filter results to Cloud Logging.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Modelarmor\V1Beta\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. If true, Model Armor filters will be run in inspect only mode.
     * No action will be taken on the request.
     *
     * Generated from protobuf field <code>bool inspect_only = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getInspectOnly()
    {
        return $this->readOneof(1);
    }

    public function hasInspectOnly()
    {
        return $this->hasOneof(1);
    }

    /**
     * Optional. If true, Model Armor filters will be run in inspect only mode.
     * No action will be taken on the request.
     *
     * Generated from protobuf field <code>bool inspect_only = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setInspectOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Optional. If true, Model Armor filters will be run in inspect and block
     * mode. Requests that trip Model Armor filters will be blocked.
     *
     * Generated from protobuf field <code>bool inspect_and_block = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getInspectAndBlock()
    {
        return $this->readOneof(2);
    }

    public function hasInspectAndBlock()
    {
        return $this->hasOneof(2);
    }

    /**
     * Optional. If true, Model Armor filters will be run in inspect and block
     * mode. Requests that trip Model Armor filters will be blocked.
     *
     * Generated from protobuf field <code>bool inspect_and_block = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setInspectAndBlock($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Optional. If true, log Model Armor filter results to Cloud Logging.
     *
     * Generated from protobuf field <code>bool enable_cloud_logging = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getEnableCloudLogging()
    {
        return $this->enable_cloud_logging;
    }

    /**
     * Optional. If true, log Model Armor filter results to Cloud Logging.
     *
     * Generated from protobuf field <code>bool enable_cloud_logging = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setEnableCloudLogging($var)
    {
        GPBUtil::checkBool($var);
        $this->enable_cloud_logging = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getEnforcementType()
    {
        return $this->whichOneof("enforcement_type");
    }

}

