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

namespace Google\Cloud\RapidMigrationAssessment\V1;

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

/**
 * Message for creating an AnnotationS.
 *
 * Generated from protobuf message <code>google.cloud.rapidmigrationassessment.v1.CreateAnnotationRequest</code>
 */
class CreateAnnotationRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of the parent (project+location).
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The resource being created.
     *
     * Generated from protobuf field <code>.google.cloud.rapidmigrationassessment.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $annotation = null;
    /**
     * Optional. An optional request ID to identify requests.
     *
     * Generated from protobuf field <code>string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $request_id = '';

    /**
     * @param string                                               $parent     Required. Name of the parent (project+location). Please see
     *                                                                         {@see RapidMigrationAssessmentClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\RapidMigrationAssessment\V1\Annotation $annotation Required. The resource being created.
     *
     * @return \Google\Cloud\RapidMigrationAssessment\V1\CreateAnnotationRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\RapidMigrationAssessment\V1\Annotation $annotation): self
    {
        return (new self())
            ->setParent($parent)
            ->setAnnotation($annotation);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. Name of the parent (project+location).
     *     @type \Google\Cloud\RapidMigrationAssessment\V1\Annotation $annotation
     *           Required. The resource being created.
     *     @type string $request_id
     *           Optional. An optional request ID to identify requests.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Rapidmigrationassessment\V1\Rapidmigrationassessment::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Name of the parent (project+location).
     *
     * 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. Name of the parent (project+location).
     *
     * 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 being created.
     *
     * Generated from protobuf field <code>.google.cloud.rapidmigrationassessment.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\RapidMigrationAssessment\V1\Annotation|null
     */
    public function getAnnotation()
    {
        return $this->annotation;
    }

    public function hasAnnotation()
    {
        return isset($this->annotation);
    }

    public function clearAnnotation()
    {
        unset($this->annotation);
    }

    /**
     * Required. The resource being created.
     *
     * Generated from protobuf field <code>.google.cloud.rapidmigrationassessment.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\RapidMigrationAssessment\V1\Annotation $var
     * @return $this
     */
    public function setAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\RapidMigrationAssessment\V1\Annotation::class);
        $this->annotation = $var;

        return $this;
    }

    /**
     * Optional. An optional request ID to identify requests.
     *
     * Generated from protobuf field <code>string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Optional. An optional request ID to identify requests.
     *
     * Generated from protobuf field <code>string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

}

