<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/maintenance/api/v1beta/maintenance_service.proto

namespace Google\Cloud\Maintenance\Api\V1beta\ResourceMaintenance;

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

/**
 * Resource contains information about the resource affected by maintenance.
 *
 * Generated from protobuf message <code>google.cloud.maintenance.api.v1beta.ResourceMaintenance.Resource</code>
 */
class Resource extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Name is the reference to the consumer resource affected by
     * the maintenance. Available values can be found here:
     * https://cloud.google.com/asset-inventory/docs/asset-names
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $resource_name = '';
    /**
     * Output only. The location of the resource.
     * Format:
     * `us-central1`
     *
     * Generated from protobuf field <code>string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $location = '';
    /**
     * Output only. The type of the resource.
     * Available values can be found here:
     * https://cloud.google.com/asset-inventory/docs/asset-types#supported_resource_types
     * Please note that not all the resource types will have their maintenances
     * reported.
     *
     * Generated from protobuf field <code>string type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $type = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource_name
     *           Output only. Name is the reference to the consumer resource affected by
     *           the maintenance. Available values can be found here:
     *           https://cloud.google.com/asset-inventory/docs/asset-names
     *     @type string $location
     *           Output only. The location of the resource.
     *           Format:
     *           `us-central1`
     *     @type string $type
     *           Output only. The type of the resource.
     *           Available values can be found here:
     *           https://cloud.google.com/asset-inventory/docs/asset-types#supported_resource_types
     *           Please note that not all the resource types will have their maintenances
     *           reported.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Maintenance\Api\V1Beta\MaintenanceService::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Name is the reference to the consumer resource affected by
     * the maintenance. Available values can be found here:
     * https://cloud.google.com/asset-inventory/docs/asset-names
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Output only. Name is the reference to the consumer resource affected by
     * the maintenance. Available values can be found here:
     * https://cloud.google.com/asset-inventory/docs/asset-names
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * Output only. The location of the resource.
     * Format:
     * `us-central1`
     *
     * Generated from protobuf field <code>string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * Output only. The location of the resource.
     * Format:
     * `us-central1`
     *
     * Generated from protobuf field <code>string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkString($var, True);
        $this->location = $var;

        return $this;
    }

    /**
     * Output only. The type of the resource.
     * Available values can be found here:
     * https://cloud.google.com/asset-inventory/docs/asset-types#supported_resource_types
     * Please note that not all the resource types will have their maintenances
     * reported.
     *
     * Generated from protobuf field <code>string type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Output only. The type of the resource.
     * Available values can be found here:
     * https://cloud.google.com/asset-inventory/docs/asset-types#supported_resource_types
     * Please note that not all the resource types will have their maintenances
     * reported.
     *
     * Generated from protobuf field <code>string type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

}


