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

namespace Google\Cloud\Asset\V1\AnalyzeIamPolicyResponse;

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

/**
 * An analysis message to group the query and results.
 *
 * Generated from protobuf message <code>google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis</code>
 */
class IamPolicyAnalysis extends \Google\Protobuf\Internal\Message
{
    /**
     * The analysis query.
     *
     * Generated from protobuf field <code>.google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1;</code>
     */
    private $analysis_query = null;
    /**
     * A list of
     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
     * that matches the analysis query, or empty if no result is found.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2;</code>
     */
    private $analysis_results;
    /**
     * Represents whether all entries in the
     * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
     * have been fully explored to answer the query.
     *
     * Generated from protobuf field <code>bool fully_explored = 3;</code>
     */
    private $fully_explored = false;
    /**
     * A list of non-critical errors happened during the query handling.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5;</code>
     */
    private $non_critical_errors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Asset\V1\IamPolicyAnalysisQuery $analysis_query
     *           The analysis query.
     *     @type array<\Google\Cloud\Asset\V1\IamPolicyAnalysisResult>|\Google\Protobuf\Internal\RepeatedField $analysis_results
     *           A list of
     *           [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
     *           that matches the analysis query, or empty if no result is found.
     *     @type bool $fully_explored
     *           Represents whether all entries in the
     *           [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
     *           have been fully explored to answer the query.
     *     @type array<\Google\Cloud\Asset\V1\IamPolicyAnalysisState>|\Google\Protobuf\Internal\RepeatedField $non_critical_errors
     *           A list of non-critical errors happened during the query handling.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Asset\V1\AssetService::initOnce();
        parent::__construct($data);
    }

    /**
     * The analysis query.
     *
     * Generated from protobuf field <code>.google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1;</code>
     * @return \Google\Cloud\Asset\V1\IamPolicyAnalysisQuery|null
     */
    public function getAnalysisQuery()
    {
        return $this->analysis_query;
    }

    public function hasAnalysisQuery()
    {
        return isset($this->analysis_query);
    }

    public function clearAnalysisQuery()
    {
        unset($this->analysis_query);
    }

    /**
     * The analysis query.
     *
     * Generated from protobuf field <code>.google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1;</code>
     * @param \Google\Cloud\Asset\V1\IamPolicyAnalysisQuery $var
     * @return $this
     */
    public function setAnalysisQuery($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Asset\V1\IamPolicyAnalysisQuery::class);
        $this->analysis_query = $var;

        return $this;
    }

    /**
     * A list of
     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
     * that matches the analysis query, or empty if no result is found.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAnalysisResults()
    {
        return $this->analysis_results;
    }

    /**
     * A list of
     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
     * that matches the analysis query, or empty if no result is found.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2;</code>
     * @param array<\Google\Cloud\Asset\V1\IamPolicyAnalysisResult>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAnalysisResults($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Asset\V1\IamPolicyAnalysisResult::class);
        $this->analysis_results = $arr;

        return $this;
    }

    /**
     * Represents whether all entries in the
     * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
     * have been fully explored to answer the query.
     *
     * Generated from protobuf field <code>bool fully_explored = 3;</code>
     * @return bool
     */
    public function getFullyExplored()
    {
        return $this->fully_explored;
    }

    /**
     * Represents whether all entries in the
     * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
     * have been fully explored to answer the query.
     *
     * Generated from protobuf field <code>bool fully_explored = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setFullyExplored($var)
    {
        GPBUtil::checkBool($var);
        $this->fully_explored = $var;

        return $this;
    }

    /**
     * A list of non-critical errors happened during the query handling.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNonCriticalErrors()
    {
        return $this->non_critical_errors;
    }

    /**
     * A list of non-critical errors happened during the query handling.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5;</code>
     * @param array<\Google\Cloud\Asset\V1\IamPolicyAnalysisState>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNonCriticalErrors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Asset\V1\IamPolicyAnalysisState::class);
        $this->non_critical_errors = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(IamPolicyAnalysis::class, \Google\Cloud\Asset\V1\AnalyzeIamPolicyResponse_IamPolicyAnalysis::class);

