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

namespace Google\Cloud\SecurityCenter\V1;

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

/**
 * Azure metadata associated with the resource, only applicable if the finding's
 * cloud provider is Microsoft Azure.
 *
 * Generated from protobuf message <code>google.cloud.securitycenter.v1.AzureMetadata</code>
 */
class AzureMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of Azure management groups associated with the resource, ordered
     * from lowest level (closest to the subscription) to highest level.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup management_groups = 4;</code>
     */
    private $management_groups;
    /**
     * The Azure subscription associated with the resource.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription subscription = 5;</code>
     */
    protected $subscription = null;
    /**
     * The Azure resource group associated with the resource.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup resource_group = 6;</code>
     */
    protected $resource_group = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureManagementGroup>|\Google\Protobuf\Internal\RepeatedField $management_groups
     *           A list of Azure management groups associated with the resource, ordered
     *           from lowest level (closest to the subscription) to highest level.
     *     @type \Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureSubscription $subscription
     *           The Azure subscription associated with the resource.
     *     @type \Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureResourceGroup $resource_group
     *           The Azure resource group associated with the resource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Securitycenter\V1\Resource::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of Azure management groups associated with the resource, ordered
     * from lowest level (closest to the subscription) to highest level.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup management_groups = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getManagementGroups()
    {
        return $this->management_groups;
    }

    /**
     * A list of Azure management groups associated with the resource, ordered
     * from lowest level (closest to the subscription) to highest level.
     *
     * Generated from protobuf field <code>repeated .google.cloud.securitycenter.v1.AzureMetadata.AzureManagementGroup management_groups = 4;</code>
     * @param array<\Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureManagementGroup>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setManagementGroups($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureManagementGroup::class);
        $this->management_groups = $arr;

        return $this;
    }

    /**
     * The Azure subscription associated with the resource.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription subscription = 5;</code>
     * @return \Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureSubscription|null
     */
    public function getSubscription()
    {
        return $this->subscription;
    }

    public function hasSubscription()
    {
        return isset($this->subscription);
    }

    public function clearSubscription()
    {
        unset($this->subscription);
    }

    /**
     * The Azure subscription associated with the resource.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.AzureMetadata.AzureSubscription subscription = 5;</code>
     * @param \Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureSubscription $var
     * @return $this
     */
    public function setSubscription($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureSubscription::class);
        $this->subscription = $var;

        return $this;
    }

    /**
     * The Azure resource group associated with the resource.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup resource_group = 6;</code>
     * @return \Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureResourceGroup|null
     */
    public function getResourceGroup()
    {
        return $this->resource_group;
    }

    public function hasResourceGroup()
    {
        return isset($this->resource_group);
    }

    public function clearResourceGroup()
    {
        unset($this->resource_group);
    }

    /**
     * The Azure resource group associated with the resource.
     *
     * Generated from protobuf field <code>.google.cloud.securitycenter.v1.AzureMetadata.AzureResourceGroup resource_group = 6;</code>
     * @param \Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureResourceGroup $var
     * @return $this
     */
    public function setResourceGroup($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\AzureMetadata\AzureResourceGroup::class);
        $this->resource_group = $var;

        return $this;
    }

}

