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

namespace Google\Cloud\Asset\V1\AnalyzeOrgPolicyGovernedContainersResponse;

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

/**
 * The organization/folder/project resource governed by organization policies
 * of
 * [AnalyzeOrgPolicyGovernedContainersRequest.constraint][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersRequest.constraint].
 *
 * Generated from protobuf message <code>google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer</code>
 */
class GovernedContainer extends \Google\Protobuf\Internal\Message
{
    /**
     * The [full resource name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format) of
     * an organization/folder/project resource.
     *
     * Generated from protobuf field <code>string full_resource_name = 1;</code>
     */
    private $full_resource_name = '';
    /**
     * The [full resource name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format) of
     * the parent of
     * [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name].
     *
     * Generated from protobuf field <code>string parent = 2;</code>
     */
    private $parent = '';
    /**
     * The consolidated organization policy for the analyzed resource. The
     * consolidated organization policy is computed by merging and evaluating
     * [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle].
     * The evaluation will respect the organization policy [hierarchy
     * rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy).
     *
     * Generated from protobuf field <code>.google.cloud.asset.v1.AnalyzerOrgPolicy consolidated_policy = 3;</code>
     */
    private $consolidated_policy = null;
    /**
     * The ordered list of all organization policies from the
     * [AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.attached_resource][].
     * to the scope specified in the request.
     * If the constraint is defined with default policy, it will also appear in
     * the list.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.AnalyzerOrgPolicy policy_bundle = 4;</code>
     */
    private $policy_bundle;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $full_resource_name
     *           The [full resource name]
     *           (https://cloud.google.com/asset-inventory/docs/resource-name-format) of
     *           an organization/folder/project resource.
     *     @type string $parent
     *           The [full resource name]
     *           (https://cloud.google.com/asset-inventory/docs/resource-name-format) of
     *           the parent of
     *           [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name].
     *     @type \Google\Cloud\Asset\V1\AnalyzerOrgPolicy $consolidated_policy
     *           The consolidated organization policy for the analyzed resource. The
     *           consolidated organization policy is computed by merging and evaluating
     *           [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle].
     *           The evaluation will respect the organization policy [hierarchy
     *           rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy).
     *     @type array<\Google\Cloud\Asset\V1\AnalyzerOrgPolicy>|\Google\Protobuf\Internal\RepeatedField $policy_bundle
     *           The ordered list of all organization policies from the
     *           [AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.attached_resource][].
     *           to the scope specified in the request.
     *           If the constraint is defined with default policy, it will also appear in
     *           the list.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Asset\V1\AssetService::initOnce();
        parent::__construct($data);
    }

    /**
     * The [full resource name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format) of
     * an organization/folder/project resource.
     *
     * Generated from protobuf field <code>string full_resource_name = 1;</code>
     * @return string
     */
    public function getFullResourceName()
    {
        return $this->full_resource_name;
    }

    /**
     * The [full resource name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format) of
     * an organization/folder/project resource.
     *
     * Generated from protobuf field <code>string full_resource_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setFullResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->full_resource_name = $var;

        return $this;
    }

    /**
     * The [full resource name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format) of
     * the parent of
     * [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name].
     *
     * Generated from protobuf field <code>string parent = 2;</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * The [full resource name]
     * (https://cloud.google.com/asset-inventory/docs/resource-name-format) of
     * the parent of
     * [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.full_resource_name].
     *
     * Generated from protobuf field <code>string parent = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * The consolidated organization policy for the analyzed resource. The
     * consolidated organization policy is computed by merging and evaluating
     * [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle].
     * The evaluation will respect the organization policy [hierarchy
     * rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy).
     *
     * Generated from protobuf field <code>.google.cloud.asset.v1.AnalyzerOrgPolicy consolidated_policy = 3;</code>
     * @return \Google\Cloud\Asset\V1\AnalyzerOrgPolicy|null
     */
    public function getConsolidatedPolicy()
    {
        return $this->consolidated_policy;
    }

    public function hasConsolidatedPolicy()
    {
        return isset($this->consolidated_policy);
    }

    public function clearConsolidatedPolicy()
    {
        unset($this->consolidated_policy);
    }

    /**
     * The consolidated organization policy for the analyzed resource. The
     * consolidated organization policy is computed by merging and evaluating
     * [AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle][google.cloud.asset.v1.AnalyzeOrgPolicyGovernedContainersResponse.GovernedContainer.policy_bundle].
     * The evaluation will respect the organization policy [hierarchy
     * rules](https://cloud.google.com/resource-manager/docs/organization-policy/understanding-hierarchy).
     *
     * Generated from protobuf field <code>.google.cloud.asset.v1.AnalyzerOrgPolicy consolidated_policy = 3;</code>
     * @param \Google\Cloud\Asset\V1\AnalyzerOrgPolicy $var
     * @return $this
     */
    public function setConsolidatedPolicy($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Asset\V1\AnalyzerOrgPolicy::class);
        $this->consolidated_policy = $var;

        return $this;
    }

    /**
     * The ordered list of all organization policies from the
     * [AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.attached_resource][].
     * to the scope specified in the request.
     * If the constraint is defined with default policy, it will also appear in
     * the list.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.AnalyzerOrgPolicy policy_bundle = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPolicyBundle()
    {
        return $this->policy_bundle;
    }

    /**
     * The ordered list of all organization policies from the
     * [AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.attached_resource][].
     * to the scope specified in the request.
     * If the constraint is defined with default policy, it will also appear in
     * the list.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.AnalyzerOrgPolicy policy_bundle = 4;</code>
     * @param array<\Google\Cloud\Asset\V1\AnalyzerOrgPolicy>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPolicyBundle($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Asset\V1\AnalyzerOrgPolicy::class);
        $this->policy_bundle = $arr;

        return $this;
    }

}

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

