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

namespace Google\Cloud\CloudDms\V1;

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

/**
 * Synonym's parent is a schema.
 *
 * Generated from protobuf message <code>google.cloud.clouddms.v1.SynonymEntity</code>
 */
class SynonymEntity extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the entity for which the synonym is being created (the source).
     *
     * Generated from protobuf field <code>string source_entity = 1;</code>
     */
    protected $source_entity = '';
    /**
     * The type of the entity for which the synonym is being created
     * (usually a table or a sequence).
     *
     * Generated from protobuf field <code>.google.cloud.clouddms.v1.DatabaseEntityType source_type = 2;</code>
     */
    protected $source_type = 0;
    /**
     * Custom engine specific features.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct custom_features = 3;</code>
     */
    protected $custom_features = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $source_entity
     *           The name of the entity for which the synonym is being created (the source).
     *     @type int $source_type
     *           The type of the entity for which the synonym is being created
     *           (usually a table or a sequence).
     *     @type \Google\Protobuf\Struct $custom_features
     *           Custom engine specific features.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Clouddms\V1\ConversionworkspaceResources::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the entity for which the synonym is being created (the source).
     *
     * Generated from protobuf field <code>string source_entity = 1;</code>
     * @return string
     */
    public function getSourceEntity()
    {
        return $this->source_entity;
    }

    /**
     * The name of the entity for which the synonym is being created (the source).
     *
     * Generated from protobuf field <code>string source_entity = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceEntity($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_entity = $var;

        return $this;
    }

    /**
     * The type of the entity for which the synonym is being created
     * (usually a table or a sequence).
     *
     * Generated from protobuf field <code>.google.cloud.clouddms.v1.DatabaseEntityType source_type = 2;</code>
     * @return int
     */
    public function getSourceType()
    {
        return $this->source_type;
    }

    /**
     * The type of the entity for which the synonym is being created
     * (usually a table or a sequence).
     *
     * Generated from protobuf field <code>.google.cloud.clouddms.v1.DatabaseEntityType source_type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setSourceType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\CloudDms\V1\DatabaseEntityType::class);
        $this->source_type = $var;

        return $this;
    }

    /**
     * Custom engine specific features.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct custom_features = 3;</code>
     * @return \Google\Protobuf\Struct|null
     */
    public function getCustomFeatures()
    {
        return $this->custom_features;
    }

    public function hasCustomFeatures()
    {
        return isset($this->custom_features);
    }

    public function clearCustomFeatures()
    {
        unset($this->custom_features);
    }

    /**
     * Custom engine specific features.
     *
     * Generated from protobuf field <code>.google.protobuf.Struct custom_features = 3;</code>
     * @param \Google\Protobuf\Struct $var
     * @return $this
     */
    public function setCustomFeatures($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
        $this->custom_features = $var;

        return $this;
    }

}

