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

namespace Google\Cloud\ArtifactRegistry\V1;

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

/**
 * MavenArtifact represents a maven artifact.
 *
 * Generated from protobuf message <code>google.devtools.artifactregistry.v1.MavenArtifact</code>
 */
class MavenArtifact extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. registry_location, project_id, repository_name and maven_artifact
     * forms a unique artifact For example,
     * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
     * com.google.guava:guava:31.0-jre",
     * where "us-west4" is the registry_location, "test-project" is the
     * project_id, "test-repo" is the repository_name and
     * "com.google.guava:guava:31.0-jre"
     * is the maven artifact.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Required. URL to access the pom file of the artifact.
     * Example:
     * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
     *
     * Generated from protobuf field <code>string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $pom_uri = '';
    /**
     * Group ID for the artifact.
     * Example:
     * com.google.guava
     *
     * Generated from protobuf field <code>string group_id = 3;</code>
     */
    protected $group_id = '';
    /**
     * Artifact ID for the artifact.
     *
     * Generated from protobuf field <code>string artifact_id = 4;</code>
     */
    protected $artifact_id = '';
    /**
     * Version of this artifact.
     *
     * Generated from protobuf field <code>string version = 5;</code>
     */
    protected $version = '';
    /**
     * Output only. Time the artifact was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. Time the artifact was updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. registry_location, project_id, repository_name and maven_artifact
     *           forms a unique artifact For example,
     *           "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
     *           com.google.guava:guava:31.0-jre",
     *           where "us-west4" is the registry_location, "test-project" is the
     *           project_id, "test-repo" is the repository_name and
     *           "com.google.guava:guava:31.0-jre"
     *           is the maven artifact.
     *     @type string $pom_uri
     *           Required. URL to access the pom file of the artifact.
     *           Example:
     *           us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
     *     @type string $group_id
     *           Group ID for the artifact.
     *           Example:
     *           com.google.guava
     *     @type string $artifact_id
     *           Artifact ID for the artifact.
     *     @type string $version
     *           Version of this artifact.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Time the artifact was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Time the artifact was updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Artifactregistry\V1\Artifact::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. registry_location, project_id, repository_name and maven_artifact
     * forms a unique artifact For example,
     * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
     * com.google.guava:guava:31.0-jre",
     * where "us-west4" is the registry_location, "test-project" is the
     * project_id, "test-repo" is the repository_name and
     * "com.google.guava:guava:31.0-jre"
     * is the maven artifact.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. registry_location, project_id, repository_name and maven_artifact
     * forms a unique artifact For example,
     * "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/
     * com.google.guava:guava:31.0-jre",
     * where "us-west4" is the registry_location, "test-project" is the
     * project_id, "test-repo" is the repository_name and
     * "com.google.guava:guava:31.0-jre"
     * is the maven artifact.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. URL to access the pom file of the artifact.
     * Example:
     * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
     *
     * Generated from protobuf field <code>string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPomUri()
    {
        return $this->pom_uri;
    }

    /**
     * Required. URL to access the pom file of the artifact.
     * Example:
     * us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
     *
     * Generated from protobuf field <code>string pom_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPomUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->pom_uri = $var;

        return $this;
    }

    /**
     * Group ID for the artifact.
     * Example:
     * com.google.guava
     *
     * Generated from protobuf field <code>string group_id = 3;</code>
     * @return string
     */
    public function getGroupId()
    {
        return $this->group_id;
    }

    /**
     * Group ID for the artifact.
     * Example:
     * com.google.guava
     *
     * Generated from protobuf field <code>string group_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setGroupId($var)
    {
        GPBUtil::checkString($var, True);
        $this->group_id = $var;

        return $this;
    }

    /**
     * Artifact ID for the artifact.
     *
     * Generated from protobuf field <code>string artifact_id = 4;</code>
     * @return string
     */
    public function getArtifactId()
    {
        return $this->artifact_id;
    }

    /**
     * Artifact ID for the artifact.
     *
     * Generated from protobuf field <code>string artifact_id = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setArtifactId($var)
    {
        GPBUtil::checkString($var, True);
        $this->artifact_id = $var;

        return $this;
    }

    /**
     * Version of this artifact.
     *
     * Generated from protobuf field <code>string version = 5;</code>
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

    /**
     * Version of this artifact.
     *
     * Generated from protobuf field <code>string version = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->version = $var;

        return $this;
    }

    /**
     * Output only. Time the artifact was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. Time the artifact was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. Time the artifact was updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Time the artifact was updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

}

