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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Instance of a general MetadataSchema.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.MetadataSchema</code>
 */
class MetadataSchema extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The resource name of the MetadataSchema.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $name = '';
    /**
     * The version of the MetadataSchema. The version's format must match
     * the following regular expression: `^[0-9]+[.][0-9]+[.][0-9]+$`, which would
     * allow to order/compare different versions. Example: 1.0.0, 1.0.1, etc.
     *
     * Generated from protobuf field <code>string schema_version = 2;</code>
     */
    private $schema_version = '';
    /**
     * Required. The raw YAML string representation of the MetadataSchema. The combination
     * of [MetadataSchema.version] and the schema name given by `title` in
     * [MetadataSchema.schema] must be unique within a MetadataStore.
     * The schema is defined as an OpenAPI 3.0.2
     * [MetadataSchema
     * Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject)
     *
     * Generated from protobuf field <code>string schema = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $schema = '';
    /**
     * The type of the MetadataSchema. This is a property that identifies which
     * metadata types will use the MetadataSchema.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType schema_type = 4;</code>
     */
    private $schema_type = 0;
    /**
     * Output only. Timestamp when this MetadataSchema was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Description of the Metadata Schema
     *
     * Generated from protobuf field <code>string description = 6;</code>
     */
    private $description = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. The resource name of the MetadataSchema.
     *     @type string $schema_version
     *           The version of the MetadataSchema. The version's format must match
     *           the following regular expression: `^[0-9]+[.][0-9]+[.][0-9]+$`, which would
     *           allow to order/compare different versions. Example: 1.0.0, 1.0.1, etc.
     *     @type string $schema
     *           Required. The raw YAML string representation of the MetadataSchema. The combination
     *           of [MetadataSchema.version] and the schema name given by `title` in
     *           [MetadataSchema.schema] must be unique within a MetadataStore.
     *           The schema is defined as an OpenAPI 3.0.2
     *           [MetadataSchema
     *           Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject)
     *     @type int $schema_type
     *           The type of the MetadataSchema. This is a property that identifies which
     *           metadata types will use the MetadataSchema.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Timestamp when this MetadataSchema was created.
     *     @type string $description
     *           Description of the Metadata Schema
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\MetadataSchema::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The resource name of the MetadataSchema.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. The resource name of the MetadataSchema.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The version of the MetadataSchema. The version's format must match
     * the following regular expression: `^[0-9]+[.][0-9]+[.][0-9]+$`, which would
     * allow to order/compare different versions. Example: 1.0.0, 1.0.1, etc.
     *
     * Generated from protobuf field <code>string schema_version = 2;</code>
     * @return string
     */
    public function getSchemaVersion()
    {
        return $this->schema_version;
    }

    /**
     * The version of the MetadataSchema. The version's format must match
     * the following regular expression: `^[0-9]+[.][0-9]+[.][0-9]+$`, which would
     * allow to order/compare different versions. Example: 1.0.0, 1.0.1, etc.
     *
     * Generated from protobuf field <code>string schema_version = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setSchemaVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->schema_version = $var;

        return $this;
    }

    /**
     * Required. The raw YAML string representation of the MetadataSchema. The combination
     * of [MetadataSchema.version] and the schema name given by `title` in
     * [MetadataSchema.schema] must be unique within a MetadataStore.
     * The schema is defined as an OpenAPI 3.0.2
     * [MetadataSchema
     * Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject)
     *
     * Generated from protobuf field <code>string schema = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getSchema()
    {
        return $this->schema;
    }

    /**
     * Required. The raw YAML string representation of the MetadataSchema. The combination
     * of [MetadataSchema.version] and the schema name given by `title` in
     * [MetadataSchema.schema] must be unique within a MetadataStore.
     * The schema is defined as an OpenAPI 3.0.2
     * [MetadataSchema
     * Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject)
     *
     * Generated from protobuf field <code>string schema = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setSchema($var)
    {
        GPBUtil::checkString($var, True);
        $this->schema = $var;

        return $this;
    }

    /**
     * The type of the MetadataSchema. This is a property that identifies which
     * metadata types will use the MetadataSchema.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType schema_type = 4;</code>
     * @return int
     */
    public function getSchemaType()
    {
        return $this->schema_type;
    }

    /**
     * The type of the MetadataSchema. This is a property that identifies which
     * metadata types will use the MetadataSchema.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MetadataSchema.MetadataSchemaType schema_type = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setSchemaType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\MetadataSchema\MetadataSchemaType::class);
        $this->schema_type = $var;

        return $this;
    }

    /**
     * Output only. Timestamp when this MetadataSchema was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.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. Timestamp when this MetadataSchema was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.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;
    }

    /**
     * Description of the Metadata Schema
     *
     * Generated from protobuf field <code>string description = 6;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Description of the Metadata Schema
     *
     * Generated from protobuf field <code>string description = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

}

