<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Options to configure rule type ConvertROWIDToColumn.
 * The rule is used to add column rowid to destination tables based on an Oracle
 * rowid function/property.
 * The rule filter field can refer to one or more entities.
 * The rule scope can be one of: Table.
 * This rule requires additional filter to be specified beyond the basic rule
 * filter field, which is whether or not to work on tables which already have a
 * primary key defined.
 *
 * Generated from protobuf message <code>google.cloud.clouddms.v1.ConvertRowIdToColumn</code>
 */
class ConvertRowIdToColumn extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Only work on tables without primary key defined
     *
     * Generated from protobuf field <code>bool only_if_no_primary_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $only_if_no_primary_key = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $only_if_no_primary_key
     *           Required. Only work on tables without primary key defined
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Clouddms\V1\ConversionworkspaceResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Only work on tables without primary key defined
     *
     * Generated from protobuf field <code>bool only_if_no_primary_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return bool
     */
    public function getOnlyIfNoPrimaryKey()
    {
        return $this->only_if_no_primary_key;
    }

    /**
     * Required. Only work on tables without primary key defined
     *
     * Generated from protobuf field <code>bool only_if_no_primary_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param bool $var
     * @return $this
     */
    public function setOnlyIfNoPrimaryKey($var)
    {
        GPBUtil::checkBool($var);
        $this->only_if_no_primary_key = $var;

        return $this;
    }

}

