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

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

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

/**
 * Maintenance is the maintenance details of a resource's maintenance.
 *
 * Generated from protobuf message <code>google.cloud.maintenance.api.v1.ResourceMaintenance.Maintenance</code>
 */
class Maintenance extends \Google\Protobuf\Internal\Message
{
    /**
     * Maintenance is the name of the corresponding maintenance resource
     * following the standard naming scheme: `"{maintenance-id}"`
     *
     * Generated from protobuf field <code>string maintenance_name = 1;</code>
     */
    protected $maintenance_name = '';
    /**
     * Output only. The title of the maintenance.
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $title = '';
    /**
     * Output only. The description of the maintenance.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $description = '';
    /**
     * Output only. The category of the maintenance.
     *
     * Generated from protobuf field <code>.google.cloud.maintenance.api.v1.MaintenanceCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $category = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $maintenance_name
     *           Maintenance is the name of the corresponding maintenance resource
     *           following the standard naming scheme: `"{maintenance-id}"`
     *     @type string $title
     *           Output only. The title of the maintenance.
     *     @type string $description
     *           Output only. The description of the maintenance.
     *     @type int $category
     *           Output only. The category of the maintenance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Maintenance\Api\V1\MaintenanceService::initOnce();
        parent::__construct($data);
    }

    /**
     * Maintenance is the name of the corresponding maintenance resource
     * following the standard naming scheme: `"{maintenance-id}"`
     *
     * Generated from protobuf field <code>string maintenance_name = 1;</code>
     * @return string
     */
    public function getMaintenanceName()
    {
        return $this->maintenance_name;
    }

    /**
     * Maintenance is the name of the corresponding maintenance resource
     * following the standard naming scheme: `"{maintenance-id}"`
     *
     * Generated from protobuf field <code>string maintenance_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setMaintenanceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->maintenance_name = $var;

        return $this;
    }

    /**
     * Output only. The title of the maintenance.
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

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

        return $this;
    }

    /**
     * Output only. The description of the maintenance.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Output only. The description of the maintenance.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Output only. The category of the maintenance.
     *
     * Generated from protobuf field <code>.google.cloud.maintenance.api.v1.MaintenanceCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getCategory()
    {
        return $this->category;
    }

    /**
     * Output only. The category of the maintenance.
     *
     * Generated from protobuf field <code>.google.cloud.maintenance.api.v1.MaintenanceCategory category = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setCategory($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Maintenance\Api\V1\MaintenanceCategory::class);
        $this->category = $var;

        return $this;
    }

}


