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

namespace Grafeas\V1;

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

/**
 * Request to create a new note.
 *
 * Generated from protobuf message <code>grafeas.v1.CreateNoteRequest</code>
 */
class CreateNoteRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
     * the note is to be created.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * The ID to use for this note.
     *
     * Generated from protobuf field <code>string note_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $note_id = '';
    /**
     * The note to create.
     *
     * Generated from protobuf field <code>.grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $note = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           The name of the project in the form of `projects/[PROJECT_ID]`, under which
     *           the note is to be created.
     *     @type string $note_id
     *           The ID to use for this note.
     *     @type \Grafeas\V1\Note $note
     *           The note to create.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Grafeas\V1\Grafeas::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
     * the note is to be created.
     *
     * 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;
    }

    /**
     * The name of the project in the form of `projects/[PROJECT_ID]`, under which
     * the note is to be created.
     *
     * 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;
    }

    /**
     * The ID to use for this note.
     *
     * Generated from protobuf field <code>string note_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getNoteId()
    {
        return $this->note_id;
    }

    /**
     * The ID to use for this note.
     *
     * Generated from protobuf field <code>string note_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setNoteId($var)
    {
        GPBUtil::checkString($var, True);
        $this->note_id = $var;

        return $this;
    }

    /**
     * The note to create.
     *
     * Generated from protobuf field <code>.grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Grafeas\V1\Note|null
     */
    public function getNote()
    {
        return $this->note;
    }

    public function hasNote()
    {
        return isset($this->note);
    }

    public function clearNote()
    {
        unset($this->note);
    }

    /**
     * The note to create.
     *
     * Generated from protobuf field <code>.grafeas.v1.Note note = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Grafeas\V1\Note $var
     * @return $this
     */
    public function setNote($var)
    {
        GPBUtil::checkMessage($var, \Grafeas\V1\Note::class);
        $this->note = $var;

        return $this;
    }

}

