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

namespace Google\Cloud\Datastream\V1;

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

/**
 * Request for looking up a specific stream object by its source object
 * identifier.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.LookupStreamObjectRequest</code>
 */
class LookupStreamObjectRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent stream that owns the collection of objects.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The source object identifier which maps to the stream object.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.SourceObjectIdentifier source_object_identifier = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $source_object_identifier = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent stream that owns the collection of objects.
     *     @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier $source_object_identifier
     *           Required. The source object identifier which maps to the stream object.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent stream that owns the collection of objects.
     *
     * 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 parent stream that owns the collection of objects.
     *
     * 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 source object identifier which maps to the stream object.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.SourceObjectIdentifier source_object_identifier = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier|null
     */
    public function getSourceObjectIdentifier()
    {
        return $this->source_object_identifier;
    }

    public function hasSourceObjectIdentifier()
    {
        return isset($this->source_object_identifier);
    }

    public function clearSourceObjectIdentifier()
    {
        unset($this->source_object_identifier);
    }

    /**
     * Required. The source object identifier which maps to the stream object.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.SourceObjectIdentifier source_object_identifier = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier $var
     * @return $this
     */
    public function setSourceObjectIdentifier($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier::class);
        $this->source_object_identifier = $var;

        return $this;
    }

}

