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

namespace Google\Cloud\ServiceUsage\V1;

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

/**
 * Request message for the `EnableService` method.
 *
 * Generated from protobuf message <code>google.api.serviceusage.v1.EnableServiceRequest</code>
 */
class EnableServiceRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the consumer and service to enable the service on.
     * The `EnableService` and `DisableService` methods currently only support
     * projects.
     * Enabling a service requires that the service is public or is shared with
     * the user enabling the service.
     * An example name would be:
     * `projects/123/services/serviceusage.googleapis.com` where `123` is the
     * project number.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Name of the consumer and service to enable the service on.
     *           The `EnableService` and `DisableService` methods currently only support
     *           projects.
     *           Enabling a service requires that the service is public or is shared with
     *           the user enabling the service.
     *           An example name would be:
     *           `projects/123/services/serviceusage.googleapis.com` where `123` is the
     *           project number.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Api\Serviceusage\V1\Serviceusage::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of the consumer and service to enable the service on.
     * The `EnableService` and `DisableService` methods currently only support
     * projects.
     * Enabling a service requires that the service is public or is shared with
     * the user enabling the service.
     * An example name would be:
     * `projects/123/services/serviceusage.googleapis.com` where `123` is the
     * project number.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Name of the consumer and service to enable the service on.
     * The `EnableService` and `DisableService` methods currently only support
     * projects.
     * Enabling a service requires that the service is public or is shared with
     * the user enabling the service.
     * An example name would be:
     * `projects/123/services/serviceusage.googleapis.com` where `123` is the
     * project number.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}

