2.6.0 (latest) 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.2.0 1.1.0 1.0.0

    public sealed class MappingRule : IMessage<MappingRule>, IEquatable<MappingRule>, IDeepCloneable<MappingRule>, IBufferMessage, IMessage

Reference documentation and code samples for the Database Migration v1 API class MappingRule.

Definition of a transformation that is to be applied to a group of entities
in the source schema. Several such transformations can be applied to an
entity sequentially to define the corresponding entity in the target schema.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> MappingRule

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[MappingRule](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.MappingRule.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[MappingRule](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.MappingRule.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[MappingRule](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.MappingRule.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.CloudDms.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.md.txt)

## Assembly

Google.Cloud.CloudDms.V1.dll

## Constructors

### MappingRule()

    public MappingRule()

### MappingRule(MappingRule)

    public MappingRule(MappingRule other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `MappingRule` |

## Properties

### ConditionalColumnSetValue

    public ConditionalColumnSetValue ConditionalColumnSetValue { get; set; }

Optional. Rule to specify how the data contained in a column should be
transformed (such as trimmed, rounded, etc) provided that the data meets
certain criteria.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ConditionalColumnSetValue` |   |

### ConvertRowidColumn

    public ConvertRowIdToColumn ConvertRowidColumn { get; set; }

Optional. Rule to specify how multiple tables should be converted with an
additional rowid column.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ConvertRowIdToColumn` |   |

### DetailsCase

    public MappingRule.DetailsOneofCase DetailsCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MappingRuleDetailsOneofCase` |   |

### DisplayName

    public string DisplayName { get; set; }

Optional. A human readable name

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### EntityMove

    public EntityMove EntityMove { get; set; }

Optional. Rule to specify how multiple entities should be relocated into
a different schema.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `EntityMove` |   |

### Filter

    public MappingRuleFilter Filter { get; set; }

Required. The rule filter

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MappingRuleFilter` |   |

### FilterTableColumns

    public FilterTableColumns FilterTableColumns { get; set; }

Optional. Rule to specify the list of columns to include or exclude from
a table.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `FilterTableColumns` |   |

### MappingRuleName

    public MappingRuleName MappingRuleName { get; set; }

[MappingRuleName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.MappingRuleName.md.txt)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.MappingRule.md.txt#Google_Cloud_CloudDms_V1_MappingRule_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MappingRuleName` |   |

### MultiColumnDataTypeChange

    public MultiColumnDatatypeChange MultiColumnDataTypeChange { get; set; }

Optional. Rule to specify how multiple columns should be converted to a
different data type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MultiColumnDatatypeChange` |   |

### MultiEntityRename

    public MultiEntityRename MultiEntityRename { get; set; }

Optional. Rule to specify how multiple entities should be renamed.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MultiEntityRename` |   |

### Name

    public string Name { get; set; }

Full name of the mapping rule resource, in the form of:
projects/{project}/locations/{location}/conversionWorkspaces/{set}/mappingRule/{rule}.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### RevisionCreateTime

    public Timestamp RevisionCreateTime { get; set; }

Output only. The timestamp that the revision was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Timestamp` |   |

### RevisionId

    public string RevisionId { get; set; }

Output only. The revision ID of the mapping rule.
A new revision is committed whenever the mapping rule is changed in any
way. The format is an 8-character hexadecimal string.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### RuleOrder

    public long RuleOrder { get; set; }

Required. The order in which the rule is applied. Lower order rules are
applied before higher value rules so they may end up being overridden.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `long` |   |

### RuleScope

    public DatabaseEntityType RuleScope { get; set; }

Required. The rule scope

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DatabaseEntityType` |   |

### SetTablePrimaryKey

    public SetTablePrimaryKey SetTablePrimaryKey { get; set; }

Optional. Rule to specify the primary key for a table

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SetTablePrimaryKey` |   |

### SingleColumnChange

    public SingleColumnChange SingleColumnChange { get; set; }

Optional. Rule to specify how a single column is converted.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SingleColumnChange` |   |

### SingleEntityRename

    public SingleEntityRename SingleEntityRename { get; set; }

Optional. Rule to specify how a single entity should be renamed.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SingleEntityRename` |   |

### SinglePackageChange

    public SinglePackageChange SinglePackageChange { get; set; }

Optional. Rule to specify how a single package is converted.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SinglePackageChange` |   |

### SourceSqlChange

    public SourceSqlChange SourceSqlChange { get; set; }

Optional. Rule to change the sql code for an entity, for example,
function, procedure.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SourceSqlChange` |   |

### State

    public MappingRule.Types.State State { get; set; }

Optional. The mapping rule state

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MappingRuleTypesState` |   |