<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/servicedirectory/v1beta1/registration_service.proto

namespace Google\Cloud\ServiceDirectory\V1beta1;

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

/**
 * The request message for [RegistrationService.CreateEndpoint][google.cloud.servicedirectory.v1beta1.RegistrationService.CreateEndpoint].
 *
 * Generated from protobuf message <code>google.cloud.servicedirectory.v1beta1.CreateEndpointRequest</code>
 */
class CreateEndpointRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the service that this endpoint provides.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The Resource ID must be 1-63 characters long, and comply with
     * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
     * Specifically, the name must be 1-63 characters long and match the regular
     * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first
     * character must be a lowercase letter, and all following characters must
     * be a dash, lowercase letter, or digit, except the last character, which
     * cannot be a dash.
     *
     * Generated from protobuf field <code>string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $endpoint_id = '';
    /**
     * Required. A endpoint with initial fields set.
     *
     * Generated from protobuf field <code>.google.cloud.servicedirectory.v1beta1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $endpoint = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource name of the service that this endpoint provides.
     *     @type string $endpoint_id
     *           Required. The Resource ID must be 1-63 characters long, and comply with
     *           <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
     *           Specifically, the name must be 1-63 characters long and match the regular
     *           expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first
     *           character must be a lowercase letter, and all following characters must
     *           be a dash, lowercase letter, or digit, except the last character, which
     *           cannot be a dash.
     *     @type \Google\Cloud\ServiceDirectory\V1beta1\Endpoint $endpoint
     *           Required. A endpoint with initial fields set.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Servicedirectory\V1Beta1\RegistrationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the service that this endpoint provides.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The resource name of the service that this endpoint provides.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The Resource ID must be 1-63 characters long, and comply with
     * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
     * Specifically, the name must be 1-63 characters long and match the regular
     * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first
     * character must be a lowercase letter, and all following characters must
     * be a dash, lowercase letter, or digit, except the last character, which
     * cannot be a dash.
     *
     * Generated from protobuf field <code>string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getEndpointId()
    {
        return $this->endpoint_id;
    }

    /**
     * Required. The Resource ID must be 1-63 characters long, and comply with
     * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
     * Specifically, the name must be 1-63 characters long and match the regular
     * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first
     * character must be a lowercase letter, and all following characters must
     * be a dash, lowercase letter, or digit, except the last character, which
     * cannot be a dash.
     *
     * Generated from protobuf field <code>string endpoint_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setEndpointId($var)
    {
        GPBUtil::checkString($var, True);
        $this->endpoint_id = $var;

        return $this;
    }

    /**
     * Required. A endpoint with initial fields set.
     *
     * Generated from protobuf field <code>.google.cloud.servicedirectory.v1beta1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\ServiceDirectory\V1beta1\Endpoint
     */
    public function getEndpoint()
    {
        return $this->endpoint;
    }

    /**
     * Required. A endpoint with initial fields set.
     *
     * Generated from protobuf field <code>.google.cloud.servicedirectory.v1beta1.Endpoint endpoint = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\ServiceDirectory\V1beta1\Endpoint $var
     * @return $this
     */
    public function setEndpoint($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ServiceDirectory\V1beta1\Endpoint::class);
        $this->endpoint = $var;

        return $this;
    }

}

