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

namespace Google\Cloud\DiscoveryEngine\V1;

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

/**
 * Safety rating corresponding to the generated content.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.SafetyRating</code>
 */
class SafetyRating extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Harm category.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $category = 0;
    /**
     * Output only. Harm probability levels in the content.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $probability = 0;
    /**
     * Output only. Harm probability score.
     *
     * Generated from protobuf field <code>float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $probability_score = 0.0;
    /**
     * Output only. Harm severity levels in the content.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $severity = 0;
    /**
     * Output only. Harm severity score.
     *
     * Generated from protobuf field <code>float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $severity_score = 0.0;
    /**
     * Output only. Indicates whether the content was filtered out because of this
     * rating.
     *
     * Generated from protobuf field <code>bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $blocked = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $category
     *           Output only. Harm category.
     *     @type int $probability
     *           Output only. Harm probability levels in the content.
     *     @type float $probability_score
     *           Output only. Harm probability score.
     *     @type int $severity
     *           Output only. Harm severity levels in the content.
     *     @type float $severity_score
     *           Output only. Harm severity score.
     *     @type bool $blocked
     *           Output only. Indicates whether the content was filtered out because of this
     *           rating.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\Safety::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Harm category.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getCategory()
    {
        return $this->category;
    }

    /**
     * Output only. Harm category.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setCategory($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\HarmCategory::class);
        $this->category = $var;

        return $this;
    }

    /**
     * Output only. Harm probability levels in the content.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getProbability()
    {
        return $this->probability;
    }

    /**
     * Output only. Harm probability levels in the content.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setProbability($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\SafetyRating\HarmProbability::class);
        $this->probability = $var;

        return $this;
    }

    /**
     * Output only. Harm probability score.
     *
     * Generated from protobuf field <code>float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getProbabilityScore()
    {
        return $this->probability_score;
    }

    /**
     * Output only. Harm probability score.
     *
     * Generated from protobuf field <code>float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setProbabilityScore($var)
    {
        GPBUtil::checkFloat($var);
        $this->probability_score = $var;

        return $this;
    }

    /**
     * Output only. Harm severity levels in the content.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getSeverity()
    {
        return $this->severity;
    }

    /**
     * Output only. Harm severity levels in the content.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setSeverity($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\SafetyRating\HarmSeverity::class);
        $this->severity = $var;

        return $this;
    }

    /**
     * Output only. Harm severity score.
     *
     * Generated from protobuf field <code>float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getSeverityScore()
    {
        return $this->severity_score;
    }

    /**
     * Output only. Harm severity score.
     *
     * Generated from protobuf field <code>float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setSeverityScore($var)
    {
        GPBUtil::checkFloat($var);
        $this->severity_score = $var;

        return $this;
    }

    /**
     * Output only. Indicates whether the content was filtered out because of this
     * rating.
     *
     * Generated from protobuf field <code>bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getBlocked()
    {
        return $this->blocked;
    }

    /**
     * Output only. Indicates whether the content was filtered out because of this
     * rating.
     *
     * Generated from protobuf field <code>bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setBlocked($var)
    {
        GPBUtil::checkBool($var);
        $this->blocked = $var;

        return $this;
    }

}

