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

namespace Google\Cloud\Recommender\V1;

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

/**
 * Contains information on the impact of a reliability recommendation.
 *
 * Generated from protobuf message <code>google.cloud.recommender.v1.ReliabilityProjection</code>
 */
class ReliabilityProjection extends \Google\Protobuf\Internal\Message
{
    /**
     * Reliability risks mitigated by this recommendation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recommender.v1.ReliabilityProjection.RiskType risks = 1;</code>
     */
    private $risks;
    /**
     * Per-recommender projection.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct details = 2;</code>
     */
    protected $details = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $risks
     *           Reliability risks mitigated by this recommendation.
     *     @type \Google\Protobuf\Struct $details
     *           Per-recommender projection.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce();
        parent::__construct($data);
    }

    /**
     * Reliability risks mitigated by this recommendation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recommender.v1.ReliabilityProjection.RiskType risks = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRisks()
    {
        return $this->risks;
    }

    /**
     * Reliability risks mitigated by this recommendation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recommender.v1.ReliabilityProjection.RiskType risks = 1;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRisks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Recommender\V1\ReliabilityProjection\RiskType::class);
        $this->risks = $arr;

        return $this;
    }

    /**
     * Per-recommender projection.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct details = 2;</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getDetails()
    {
        return $this->details;
    }

    public function hasDetails()
    {
        return isset($this->details);
    }

    public function clearDetails()
    {
        unset($this->details);
    }

    /**
     * Per-recommender projection.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct details = 2;</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setDetails($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->details = $var;

        return $this;
    }

}

