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

namespace Google\Cloud\ApigeeConnect\V1;

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

/**
 * gRPC request payload for tether.
 *
 * Generated from protobuf message <code>google.cloud.apigeeconnect.v1.EgressRequest</code>
 */
class EgressRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Unique identifier for the request.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Actual payload to send to agent.
     *
     * Generated from protobuf field <code>.google.cloud.apigeeconnect.v1.Payload payload = 2;</code>
     */
    protected $payload = null;
    /**
     * Tether Endpoint.
     *
     * Generated from protobuf field <code>.google.cloud.apigeeconnect.v1.TetherEndpoint endpoint = 3;</code>
     */
    protected $endpoint = 0;
    /**
     * GCP Project.
     * Format: `projects/{project_number}`.
     *
     * Generated from protobuf field <code>string project = 4;</code>
     */
    protected $project = '';
    /**
     * Unique identifier for clients to trace their request/response.
     *
     * Generated from protobuf field <code>string trace_id = 5;</code>
     */
    protected $trace_id = '';
    /**
     * Timeout for the HTTP request.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration timeout = 6;</code>
     */
    protected $timeout = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Unique identifier for the request.
     *     @type \Google\Cloud\ApigeeConnect\V1\Payload $payload
     *           Actual payload to send to agent.
     *     @type int $endpoint
     *           Tether Endpoint.
     *     @type string $project
     *           GCP Project.
     *           Format: `projects/{project_number}`.
     *     @type string $trace_id
     *           Unique identifier for clients to trace their request/response.
     *     @type \Google\Protobuf\Duration $timeout
     *           Timeout for the HTTP request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apigeeconnect\V1\Tether::initOnce();
        parent::__construct($data);
    }

    /**
     * Unique identifier for the request.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Unique identifier for the request.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Actual payload to send to agent.
     *
     * Generated from protobuf field <code>.google.cloud.apigeeconnect.v1.Payload payload = 2;</code>
     * @return \Google\Cloud\ApigeeConnect\V1\Payload|null
     */
    public function getPayload()
    {
        return $this->payload;
    }

    public function hasPayload()
    {
        return isset($this->payload);
    }

    public function clearPayload()
    {
        unset($this->payload);
    }

    /**
     * Actual payload to send to agent.
     *
     * Generated from protobuf field <code>.google.cloud.apigeeconnect.v1.Payload payload = 2;</code>
     * @param \Google\Cloud\ApigeeConnect\V1\Payload $var
     * @return $this
     */
    public function setPayload($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApigeeConnect\V1\Payload::class);
        $this->payload = $var;

        return $this;
    }

    /**
     * Tether Endpoint.
     *
     * Generated from protobuf field <code>.google.cloud.apigeeconnect.v1.TetherEndpoint endpoint = 3;</code>
     * @return int
     */
    public function getEndpoint()
    {
        return $this->endpoint;
    }

    /**
     * Tether Endpoint.
     *
     * Generated from protobuf field <code>.google.cloud.apigeeconnect.v1.TetherEndpoint endpoint = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setEndpoint($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ApigeeConnect\V1\TetherEndpoint::class);
        $this->endpoint = $var;

        return $this;
    }

    /**
     * GCP Project.
     * Format: `projects/{project_number}`.
     *
     * Generated from protobuf field <code>string project = 4;</code>
     * @return string
     */
    public function getProject()
    {
        return $this->project;
    }

    /**
     * GCP Project.
     * Format: `projects/{project_number}`.
     *
     * Generated from protobuf field <code>string project = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setProject($var)
    {
        GPBUtil::checkString($var, True);
        $this->project = $var;

        return $this;
    }

    /**
     * Unique identifier for clients to trace their request/response.
     *
     * Generated from protobuf field <code>string trace_id = 5;</code>
     * @return string
     */
    public function getTraceId()
    {
        return $this->trace_id;
    }

    /**
     * Unique identifier for clients to trace their request/response.
     *
     * Generated from protobuf field <code>string trace_id = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setTraceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->trace_id = $var;

        return $this;
    }

    /**
     * Timeout for the HTTP request.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration timeout = 6;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getTimeout()
    {
        return $this->timeout;
    }

    public function hasTimeout()
    {
        return isset($this->timeout);
    }

    public function clearTimeout()
    {
        unset($this->timeout);
    }

    /**
     * Timeout for the HTTP request.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration timeout = 6;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setTimeout($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->timeout = $var;

        return $this;
    }

}

