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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * An edge describing the relationship between an Artifact and an Execution in
 * a lineage graph.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.Event</code>
 */
class Event extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The relative resource name of the Artifact in the Event.
     *
     * Generated from protobuf field <code>string artifact = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $artifact = '';
    /**
     * Output only. The relative resource name of the Execution in the Event.
     *
     * Generated from protobuf field <code>string execution = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    private $execution = '';
    /**
     * Output only. Time the Event occurred.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $event_time = null;
    /**
     * Required. The type of the Event.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Event.Type type = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $type = 0;
    /**
     * The labels with user-defined metadata to annotate Events.
     * Label keys and values can be no longer than 64 characters
     * (Unicode codepoints), can only contain lowercase letters, numeric
     * characters, underscores and dashes. International characters are allowed.
     * No more than 64 user labels can be associated with one Event (System
     * labels are excluded).
     * See https://goo.gl/xmQnxf for more information and examples of labels.
     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
     * and are immutable.
     *
     * Generated from protobuf field <code>map<string, string> labels = 5;</code>
     */
    private $labels;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $artifact
     *           Required. The relative resource name of the Artifact in the Event.
     *     @type string $execution
     *           Output only. The relative resource name of the Execution in the Event.
     *     @type \Google\Protobuf\Timestamp $event_time
     *           Output only. Time the Event occurred.
     *     @type int $type
     *           Required. The type of the Event.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           The labels with user-defined metadata to annotate Events.
     *           Label keys and values can be no longer than 64 characters
     *           (Unicode codepoints), can only contain lowercase letters, numeric
     *           characters, underscores and dashes. International characters are allowed.
     *           No more than 64 user labels can be associated with one Event (System
     *           labels are excluded).
     *           See https://goo.gl/xmQnxf for more information and examples of labels.
     *           System reserved label keys are prefixed with "aiplatform.googleapis.com/"
     *           and are immutable.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Event::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The relative resource name of the Artifact in the Event.
     *
     * Generated from protobuf field <code>string artifact = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getArtifact()
    {
        return $this->artifact;
    }

    /**
     * Required. The relative resource name of the Artifact in the Event.
     *
     * Generated from protobuf field <code>string artifact = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setArtifact($var)
    {
        GPBUtil::checkString($var, True);
        $this->artifact = $var;

        return $this;
    }

    /**
     * Output only. The relative resource name of the Execution in the Event.
     *
     * Generated from protobuf field <code>string execution = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getExecution()
    {
        return $this->execution;
    }

    /**
     * Output only. The relative resource name of the Execution in the Event.
     *
     * Generated from protobuf field <code>string execution = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setExecution($var)
    {
        GPBUtil::checkString($var, True);
        $this->execution = $var;

        return $this;
    }

    /**
     * Output only. Time the Event occurred.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getEventTime()
    {
        return $this->event_time;
    }

    public function hasEventTime()
    {
        return isset($this->event_time);
    }

    public function clearEventTime()
    {
        unset($this->event_time);
    }

    /**
     * Output only. Time the Event occurred.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp event_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setEventTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->event_time = $var;

        return $this;
    }

    /**
     * Required. The type of the Event.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Event.Type type = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Required. The type of the Event.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Event.Type type = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\Event\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * The labels with user-defined metadata to annotate Events.
     * Label keys and values can be no longer than 64 characters
     * (Unicode codepoints), can only contain lowercase letters, numeric
     * characters, underscores and dashes. International characters are allowed.
     * No more than 64 user labels can be associated with one Event (System
     * labels are excluded).
     * See https://goo.gl/xmQnxf for more information and examples of labels.
     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
     * and are immutable.
     *
     * Generated from protobuf field <code>map<string, string> labels = 5;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * The labels with user-defined metadata to annotate Events.
     * Label keys and values can be no longer than 64 characters
     * (Unicode codepoints), can only contain lowercase letters, numeric
     * characters, underscores and dashes. International characters are allowed.
     * No more than 64 user labels can be associated with one Event (System
     * labels are excluded).
     * See https://goo.gl/xmQnxf for more information and examples of labels.
     * System reserved label keys are prefixed with "aiplatform.googleapis.com/"
     * and are immutable.
     *
     * Generated from protobuf field <code>map<string, string> labels = 5;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

}

