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

namespace Google\Cloud\DataCatalog\Lineage\V1;

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

/**
 * Origin of a process.
 *
 * Generated from protobuf message <code>google.cloud.datacatalog.lineage.v1.Origin</code>
 */
class Origin extends \Google\Protobuf\Internal\Message
{
    /**
     * Type of the source.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1;</code>
     */
    protected $source_type = 0;
    /**
     * If the source_type isn't CUSTOM, the value of this field should be a GCP
     * resource name of the system, which reports lineage. The project and
     * location parts of the resource name must match the project and location of
     * the lineage resource being created. Examples:
     * - `{source_type: COMPOSER, name:
     *   "projects/foo/locations/us/environments/bar"}`
     * - `{source_type: BIGQUERY, name: "projects/foo/locations/eu"}`
     * - `{source_type: CUSTOM,   name: "myCustomIntegration"}`
     *
     * Generated from protobuf field <code>string name = 2;</code>
     */
    protected $name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $source_type
     *           Type of the source.
     *     @type string $name
     *           If the source_type isn't CUSTOM, the value of this field should be a GCP
     *           resource name of the system, which reports lineage. The project and
     *           location parts of the resource name must match the project and location of
     *           the lineage resource being created. Examples:
     *           - `{source_type: COMPOSER, name:
     *             "projects/foo/locations/us/environments/bar"}`
     *           - `{source_type: BIGQUERY, name: "projects/foo/locations/eu"}`
     *           - `{source_type: CUSTOM,   name: "myCustomIntegration"}`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datacatalog\Lineage\V1\Lineage::initOnce();
        parent::__construct($data);
    }

    /**
     * Type of the source.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1;</code>
     * @return int
     */
    public function getSourceType()
    {
        return $this->source_type;
    }

    /**
     * Type of the source.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.lineage.v1.Origin.SourceType source_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setSourceType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DataCatalog\Lineage\V1\Origin\SourceType::class);
        $this->source_type = $var;

        return $this;
    }

    /**
     * If the source_type isn't CUSTOM, the value of this field should be a GCP
     * resource name of the system, which reports lineage. The project and
     * location parts of the resource name must match the project and location of
     * the lineage resource being created. Examples:
     * - `{source_type: COMPOSER, name:
     *   "projects/foo/locations/us/environments/bar"}`
     * - `{source_type: BIGQUERY, name: "projects/foo/locations/eu"}`
     * - `{source_type: CUSTOM,   name: "myCustomIntegration"}`
     *
     * Generated from protobuf field <code>string name = 2;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * If the source_type isn't CUSTOM, the value of this field should be a GCP
     * resource name of the system, which reports lineage. The project and
     * location parts of the resource name must match the project and location of
     * the lineage resource being created. Examples:
     * - `{source_type: COMPOSER, name:
     *   "projects/foo/locations/us/environments/bar"}`
     * - `{source_type: BIGQUERY, name: "projects/foo/locations/eu"}`
     * - `{source_type: CUSTOM,   name: "myCustomIntegration"}`
     *
     * Generated from protobuf field <code>string name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}

