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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Request message for
 * [MetadataService.CreateArtifact][google.cloud.aiplatform.v1.MetadataService.CreateArtifact].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.CreateArtifactRequest</code>
 */
class CreateArtifactRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the MetadataStore where the Artifact should
     * be created.
     * Format:
     * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The Artifact to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $artifact = null;
    /**
     * The {artifact} portion of the resource name with the format:
     * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
     * If not provided, the Artifact's ID will be a UUID generated by the service.
     * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
     * Must be unique across all Artifacts in the parent MetadataStore. (Otherwise
     * the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
     * caller can't view the preexisting Artifact.)
     *
     * Generated from protobuf field <code>string artifact_id = 3;</code>
     */
    private $artifact_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource name of the MetadataStore where the Artifact should
     *           be created.
     *           Format:
     *           `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
     *     @type \Google\Cloud\AIPlatform\V1\Artifact $artifact
     *           Required. The Artifact to create.
     *     @type string $artifact_id
     *           The {artifact} portion of the resource name with the format:
     *           `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
     *           If not provided, the Artifact's ID will be a UUID generated by the service.
     *           Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
     *           Must be unique across all Artifacts in the parent MetadataStore. (Otherwise
     *           the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
     *           caller can't view the preexisting Artifact.)
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\MetadataService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the MetadataStore where the Artifact should
     * be created.
     * Format:
     * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
     *
     * 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 resource name of the MetadataStore where the Artifact should
     * be created.
     * Format:
     * `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
     *
     * 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 Artifact to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\AIPlatform\V1\Artifact|null
     */
    public function getArtifact()
    {
        return $this->artifact;
    }

    public function hasArtifact()
    {
        return isset($this->artifact);
    }

    public function clearArtifact()
    {
        unset($this->artifact);
    }

    /**
     * Required. The Artifact to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Artifact artifact = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\AIPlatform\V1\Artifact $var
     * @return $this
     */
    public function setArtifact($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Artifact::class);
        $this->artifact = $var;

        return $this;
    }

    /**
     * The {artifact} portion of the resource name with the format:
     * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
     * If not provided, the Artifact's ID will be a UUID generated by the service.
     * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
     * Must be unique across all Artifacts in the parent MetadataStore. (Otherwise
     * the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
     * caller can't view the preexisting Artifact.)
     *
     * Generated from protobuf field <code>string artifact_id = 3;</code>
     * @return string
     */
    public function getArtifactId()
    {
        return $this->artifact_id;
    }

    /**
     * The {artifact} portion of the resource name with the format:
     * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
     * If not provided, the Artifact's ID will be a UUID generated by the service.
     * Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
     * Must be unique across all Artifacts in the parent MetadataStore. (Otherwise
     * the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
     * caller can't view the preexisting Artifact.)
     *
     * Generated from protobuf field <code>string artifact_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setArtifactId($var)
    {
        GPBUtil::checkString($var, True);
        $this->artifact_id = $var;

        return $this;
    }

}

