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

namespace Google\Cloud\ServiceUsage\V1\BatchEnableServicesResponse;

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

/**
 * Provides error messages for the failing services.
 *
 * Generated from protobuf message <code>google.api.serviceusage.v1.BatchEnableServicesResponse.EnableFailure</code>
 */
class EnableFailure extends \Google\Protobuf\Internal\Message
{
    /**
     * The service id of a service that could not be enabled.
     *
     * Generated from protobuf field <code>string service_id = 1;</code>
     */
    private $service_id = '';
    /**
     * An error message describing why the service could not be enabled.
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     */
    private $error_message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $service_id
     *           The service id of a service that could not be enabled.
     *     @type string $error_message
     *           An error message describing why the service could not be enabled.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Api\Serviceusage\V1\Serviceusage::initOnce();
        parent::__construct($data);
    }

    /**
     * The service id of a service that could not be enabled.
     *
     * Generated from protobuf field <code>string service_id = 1;</code>
     * @return string
     */
    public function getServiceId()
    {
        return $this->service_id;
    }

    /**
     * The service id of a service that could not be enabled.
     *
     * Generated from protobuf field <code>string service_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setServiceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->service_id = $var;

        return $this;
    }

    /**
     * An error message describing why the service could not be enabled.
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     * @return string
     */
    public function getErrorMessage()
    {
        return $this->error_message;
    }

    /**
     * An error message describing why the service could not be enabled.
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setErrorMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->error_message = $var;

        return $this;
    }

}


