<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto

namespace Google\Cloud\AssuredWorkloads\V1beta1\Workload;

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

/**
 * Represent the resources that are children of this Workload.
 *
 * Generated from protobuf message <code>google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo</code>
 */
class ResourceInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Resource identifier.
     * For a project this represents project_number.
     *
     * Generated from protobuf field <code>int64 resource_id = 1;</code>
     */
    private $resource_id = 0;
    /**
     * Indicates the type of resource.
     *
     * Generated from protobuf field <code>.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType resource_type = 2;</code>
     */
    private $resource_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $resource_id
     *           Resource identifier.
     *           For a project this represents project_number.
     *     @type int $resource_type
     *           Indicates the type of resource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Assuredworkloads\V1Beta1\AssuredworkloadsV1Beta1::initOnce();
        parent::__construct($data);
    }

    /**
     * Resource identifier.
     * For a project this represents project_number.
     *
     * Generated from protobuf field <code>int64 resource_id = 1;</code>
     * @return int|string
     */
    public function getResourceId()
    {
        return $this->resource_id;
    }

    /**
     * Resource identifier.
     * For a project this represents project_number.
     *
     * Generated from protobuf field <code>int64 resource_id = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setResourceId($var)
    {
        GPBUtil::checkInt64($var);
        $this->resource_id = $var;

        return $this;
    }

    /**
     * Indicates the type of resource.
     *
     * Generated from protobuf field <code>.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType resource_type = 2;</code>
     * @return int
     */
    public function getResourceType()
    {
        return $this->resource_type;
    }

    /**
     * Indicates the type of resource.
     *
     * Generated from protobuf field <code>.google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType resource_type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setResourceType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AssuredWorkloads\V1beta1\Workload\ResourceInfo\ResourceType::class);
        $this->resource_type = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ResourceInfo::class, \Google\Cloud\AssuredWorkloads\V1beta1\Workload_ResourceInfo::class);

