<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/privatecatalog/v1beta1/private_catalog.proto

namespace Google\Cloud\PrivateCatalog\V1beta1;

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

/**
 * Defines the reference of an asset belonging to a product.
 *
 * Generated from protobuf message <code>google.cloud.privatecatalog.v1beta1.AssetReference</code>
 */
class AssetReference extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. A unique identifier among asset references in a product.
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $id = '';
    /**
     * Output only. The human-readable description of the referenced asset. Maximum 256
     * characters in length.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $description = '';
    /**
     * Output only. The definition of input parameters to hydrate the asset template.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.Inputs inputs = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $inputs = null;
    /**
     * Output only. The current state of the asset reference.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.AssetReference.AssetValidationState validation_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $validation_status = 0;
    /**
     * Output only. The validation process metadata.
     *
     * Generated from protobuf field <code>.google.longrunning.Operation validation_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $validation_operation = null;
    /**
     * Output only. The cloud storage source.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.GcsSource gcs_source = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $gcs_source = null;
    /**
     * Output only. The creation timestamp of the asset reference.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. The last update timestamp of the asset reference.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    /**
     * The version of the source used for this asset reference.
     *
     * Generated from protobuf field <code>string version = 14 [deprecated = true];</code>
     * @deprecated
     */
    protected $version = '';
    protected $source;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Output only. A unique identifier among asset references in a product.
     *     @type string $description
     *           Output only. The human-readable description of the referenced asset. Maximum 256
     *           characters in length.
     *     @type \Google\Cloud\PrivateCatalog\V1beta1\Inputs $inputs
     *           Output only. The definition of input parameters to hydrate the asset template.
     *     @type int $validation_status
     *           Output only. The current state of the asset reference.
     *     @type \Google\LongRunning\Operation $validation_operation
     *           Output only. The validation process metadata.
     *     @type string $asset
     *           Output only. The asset resource name if an asset is hosted by Private Catalog.
     *     @type string $gcs_path
     *           Output only. The cloud storage object path.
     *     @type \Google\Cloud\PrivateCatalog\V1beta1\GitSource $git_source
     *           Output only. The git source.
     *     @type \Google\Cloud\PrivateCatalog\V1beta1\GcsSource $gcs_source
     *           Output only. The cloud storage source.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The creation timestamp of the asset reference.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The last update timestamp of the asset reference.
     *     @type string $version
     *           The version of the source used for this asset reference.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Privatecatalog\V1Beta1\PrivateCatalog::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. A unique identifier among asset references in a product.
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Output only. A unique identifier among asset references in a product.
     *
     * Generated from protobuf field <code>string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Output only. The human-readable description of the referenced asset. Maximum 256
     * characters in length.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Output only. The human-readable description of the referenced asset. Maximum 256
     * characters in length.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Output only. The definition of input parameters to hydrate the asset template.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.Inputs inputs = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\PrivateCatalog\V1beta1\Inputs|null
     */
    public function getInputs()
    {
        return $this->inputs;
    }

    public function hasInputs()
    {
        return isset($this->inputs);
    }

    public function clearInputs()
    {
        unset($this->inputs);
    }

    /**
     * Output only. The definition of input parameters to hydrate the asset template.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.Inputs inputs = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\PrivateCatalog\V1beta1\Inputs $var
     * @return $this
     */
    public function setInputs($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\PrivateCatalog\V1beta1\Inputs::class);
        $this->inputs = $var;

        return $this;
    }

    /**
     * Output only. The current state of the asset reference.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.AssetReference.AssetValidationState validation_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getValidationStatus()
    {
        return $this->validation_status;
    }

    /**
     * Output only. The current state of the asset reference.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.AssetReference.AssetValidationState validation_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setValidationStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\PrivateCatalog\V1beta1\AssetReference\AssetValidationState::class);
        $this->validation_status = $var;

        return $this;
    }

    /**
     * Output only. The validation process metadata.
     *
     * Generated from protobuf field <code>.google.longrunning.Operation validation_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\LongRunning\Operation|null
     */
    public function getValidationOperation()
    {
        return $this->validation_operation;
    }

    public function hasValidationOperation()
    {
        return isset($this->validation_operation);
    }

    public function clearValidationOperation()
    {
        unset($this->validation_operation);
    }

    /**
     * Output only. The validation process metadata.
     *
     * Generated from protobuf field <code>.google.longrunning.Operation validation_operation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\LongRunning\Operation $var
     * @return $this
     */
    public function setValidationOperation($var)
    {
        GPBUtil::checkMessage($var, \Google\LongRunning\Operation::class);
        $this->validation_operation = $var;

        return $this;
    }

    /**
     * Output only. The asset resource name if an asset is hosted by Private Catalog.
     *
     * Generated from protobuf field <code>string asset = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getAsset()
    {
        return $this->readOneof(10);
    }

    public function hasAsset()
    {
        return $this->hasOneof(10);
    }

    /**
     * Output only. The asset resource name if an asset is hosted by Private Catalog.
     *
     * Generated from protobuf field <code>string asset = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setAsset($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Output only. The cloud storage object path.
     *
     * Generated from protobuf field <code>string gcs_path = 11 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     * @deprecated
     */
    public function getGcsPath()
    {
        @trigger_error('gcs_path is deprecated.', E_USER_DEPRECATED);
        return $this->readOneof(11);
    }

    public function hasGcsPath()
    {
        @trigger_error('gcs_path is deprecated.', E_USER_DEPRECATED);
        return $this->hasOneof(11);
    }

    /**
     * Output only. The cloud storage object path.
     *
     * Generated from protobuf field <code>string gcs_path = 11 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setGcsPath($var)
    {
        @trigger_error('gcs_path is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * Output only. The git source.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.GitSource git_source = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\PrivateCatalog\V1beta1\GitSource|null
     */
    public function getGitSource()
    {
        return $this->readOneof(15);
    }

    public function hasGitSource()
    {
        return $this->hasOneof(15);
    }

    /**
     * Output only. The git source.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.GitSource git_source = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\PrivateCatalog\V1beta1\GitSource $var
     * @return $this
     */
    public function setGitSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\PrivateCatalog\V1beta1\GitSource::class);
        $this->writeOneof(15, $var);

        return $this;
    }

    /**
     * Output only. The cloud storage source.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.GcsSource gcs_source = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\PrivateCatalog\V1beta1\GcsSource|null
     */
    public function getGcsSource()
    {
        return $this->gcs_source;
    }

    public function hasGcsSource()
    {
        return isset($this->gcs_source);
    }

    public function clearGcsSource()
    {
        unset($this->gcs_source);
    }

    /**
     * Output only. The cloud storage source.
     *
     * Generated from protobuf field <code>.google.cloud.privatecatalog.v1beta1.GcsSource gcs_source = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\PrivateCatalog\V1beta1\GcsSource $var
     * @return $this
     */
    public function setGcsSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\PrivateCatalog\V1beta1\GcsSource::class);
        $this->gcs_source = $var;

        return $this;
    }

    /**
     * Output only. The creation timestamp of the asset reference.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 12 [(.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. The creation timestamp of the asset reference.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 12 [(.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. The last update timestamp of the asset reference.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 13 [(.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. The last update timestamp of the asset reference.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 13 [(.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;
    }

    /**
     * The version of the source used for this asset reference.
     *
     * Generated from protobuf field <code>string version = 14 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getVersion()
    {
        @trigger_error('version is deprecated.', E_USER_DEPRECATED);
        return $this->version;
    }

    /**
     * The version of the source used for this asset reference.
     *
     * Generated from protobuf field <code>string version = 14 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setVersion($var)
    {
        @trigger_error('version is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->version = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getSource()
    {
        return $this->whichOneof("source");
    }

}

