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

namespace Google\Cloud\CloudDms\V1;

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

/**
 * Request message for 'ImportMappingRules' request.
 *
 * Generated from protobuf message <code>google.cloud.clouddms.v1.ImportMappingRulesRequest</code>
 */
class ImportMappingRulesRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of the conversion workspace resource to import the rules to
     * in the form of:
     * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * The format of the rules content file.
     *
     * Generated from protobuf field <code>.google.cloud.clouddms.v1.ImportRulesFileFormat rules_format = 2;</code>
     */
    private $rules_format = 0;
    /**
     * One or more rules files.
     *
     * Generated from protobuf field <code>repeated .google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile rules_files = 3;</code>
     */
    private $rules_files;
    /**
     * Should the conversion workspace be committed automatically after the
     * import operation.
     *
     * Generated from protobuf field <code>bool auto_commit = 6;</code>
     */
    private $auto_commit = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. Name of the conversion workspace resource to import the rules to
     *           in the form of:
     *           projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
     *     @type int $rules_format
     *           The format of the rules content file.
     *     @type array<\Google\Cloud\CloudDms\V1\ImportMappingRulesRequest\RulesFile>|\Google\Protobuf\Internal\RepeatedField $rules_files
     *           One or more rules files.
     *     @type bool $auto_commit
     *           Should the conversion workspace be committed automatically after the
     *           import operation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Clouddms\V1\Clouddms::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Name of the conversion workspace resource to import the rules to
     * in the form of:
     * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. Name of the conversion workspace resource to import the rules to
     * in the form of:
     * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * The format of the rules content file.
     *
     * Generated from protobuf field <code>.google.cloud.clouddms.v1.ImportRulesFileFormat rules_format = 2;</code>
     * @return int
     */
    public function getRulesFormat()
    {
        return $this->rules_format;
    }

    /**
     * The format of the rules content file.
     *
     * Generated from protobuf field <code>.google.cloud.clouddms.v1.ImportRulesFileFormat rules_format = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setRulesFormat($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\CloudDms\V1\ImportRulesFileFormat::class);
        $this->rules_format = $var;

        return $this;
    }

    /**
     * One or more rules files.
     *
     * Generated from protobuf field <code>repeated .google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile rules_files = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRulesFiles()
    {
        return $this->rules_files;
    }

    /**
     * One or more rules files.
     *
     * Generated from protobuf field <code>repeated .google.cloud.clouddms.v1.ImportMappingRulesRequest.RulesFile rules_files = 3;</code>
     * @param array<\Google\Cloud\CloudDms\V1\ImportMappingRulesRequest\RulesFile>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRulesFiles($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CloudDms\V1\ImportMappingRulesRequest\RulesFile::class);
        $this->rules_files = $arr;

        return $this;
    }

    /**
     * Should the conversion workspace be committed automatically after the
     * import operation.
     *
     * Generated from protobuf field <code>bool auto_commit = 6;</code>
     * @return bool
     */
    public function getAutoCommit()
    {
        return $this->auto_commit;
    }

    /**
     * Should the conversion workspace be committed automatically after the
     * import operation.
     *
     * Generated from protobuf field <code>bool auto_commit = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setAutoCommit($var)
    {
        GPBUtil::checkBool($var);
        $this->auto_commit = $var;

        return $this;
    }

}

