<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/monitoring/v3/service_service.proto

namespace Google\Cloud\Monitoring\V3;

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

/**
 * The `GetServiceLevelObjective` request.
 *
 * Generated from protobuf message <code>google.monitoring.v3.GetServiceLevelObjectiveRequest</code>
 */
class GetServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Resource name of the `ServiceLevelObjective` to get. The format is:
     *     projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the
     * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the
     * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the
     * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.ServiceLevelObjective.View view = 2;</code>
     */
    private $view = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Resource name of the `ServiceLevelObjective` to get. The format is:
     *               projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
     *     @type int $view
     *           View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the
     *           `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the
     *           `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the
     *           `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Resource name of the `ServiceLevelObjective` to get. The format is:
     *     projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Resource name of the `ServiceLevelObjective` to get. The format is:
     *     projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the
     * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the
     * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the
     * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.ServiceLevelObjective.View view = 2;</code>
     * @return int
     */
    public function getView()
    {
        return $this->view;
    }

    /**
     * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the
     * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the
     * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the
     * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.ServiceLevelObjective.View view = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setView($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\ServiceLevelObjective_View::class);
        $this->view = $var;

        return $this;
    }

}

