# Interface WidgetTool.DataMappingOrBuilder (0.9.0)

0.9.0 (latest) 0.7.0 0.4.0 0.3.0 0.1.0

    public static interface WidgetTool.DataMappingOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsFieldMappings(String key)

    public abstract boolean containsFieldMappings(String key)

Optional. A map of widget input parameter fields to the corresponding
output fields of the source tool.

`map<string, string> field_mappings = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getFieldMappings() (deprecated)

    public abstract Map<String,String> getFieldMappings()

Use [#getFieldMappingsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1.WidgetTool.DataMappingOrBuilder#com_google_cloud_ces_v1_WidgetTool_DataMappingOrBuilder_getFieldMappingsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getFieldMappingsCount()

    public abstract int getFieldMappingsCount()

Optional. A map of widget input parameter fields to the corresponding
output fields of the source tool.

`map<string, string> field_mappings = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getFieldMappingsMap()

    public abstract Map<String,String> getFieldMappingsMap()

Optional. A map of widget input parameter fields to the corresponding
output fields of the source tool.

`map<string, string> field_mappings = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getFieldMappingsOrDefault(String key, String defaultValue)

    public abstract String getFieldMappingsOrDefault(String key, String defaultValue)

Optional. A map of widget input parameter fields to the corresponding
output fields of the source tool.

`map<string, string> field_mappings = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getFieldMappingsOrThrow(String key)

    public abstract String getFieldMappingsOrThrow(String key)

Optional. A map of widget input parameter fields to the corresponding
output fields of the source tool.

`map<string, string> field_mappings = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getMode()

    public abstract WidgetTool.DataMapping.Mode getMode()

Optional. The mode of the data mapping.

`
.google.cloud.ces.v1.WidgetTool.DataMapping.Mode mode = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1.WidgetTool.DataMapping.Mode` | The mode. |

### getModeValue()

    public abstract int getModeValue()

Optional. The mode of the data mapping.

`
.google.cloud.ces.v1.WidgetTool.DataMapping.Mode mode = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for mode. |

### getPythonFunction()

    public abstract PythonFunction getPythonFunction()

Optional. Configuration for a Python function used to transform the
source tool's output into the widget's input format.

`
.google.cloud.ces.v1.PythonFunction python_function = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1.PythonFunction` | The pythonFunction. |

### getPythonFunctionOrBuilder()

    public abstract PythonFunctionOrBuilder getPythonFunctionOrBuilder()

Optional. Configuration for a Python function used to transform the
source tool's output into the widget's input format.

`
.google.cloud.ces.v1.PythonFunction python_function = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1.PythonFunctionOrBuilder` |   |

### getPythonScript() (deprecated)

    public abstract String getPythonScript()

**Deprecated.** *google.cloud.ces.v1.WidgetTool.DataMapping.python_script is deprecated. See
google/cloud/ces/v1/widget_tool.proto;l=66*

Deprecated: Use `python_function` instead.

`string python_script = 3 [deprecated = true];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The pythonScript. |

### getPythonScriptBytes() (deprecated)

    public abstract ByteString getPythonScriptBytes()

**Deprecated.** *google.cloud.ces.v1.WidgetTool.DataMapping.python_script is deprecated. See
google/cloud/ces/v1/widget_tool.proto;l=66*

Deprecated: Use `python_function` instead.

`string python_script = 3 [deprecated = true];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for pythonScript. |

### getSourceToolName()

    public abstract String getSourceToolName()

Optional. The resource name of the tool that provides the data for the
widget (e.g., a search tool or a custom function). Format:
`projects/{project}/locations/{location}/agents/{agent}/tools/{tool}`

`string source_tool_name = 1 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The sourceToolName. |

### getSourceToolNameBytes()

    public abstract ByteString getSourceToolNameBytes()

Optional. The resource name of the tool that provides the data for the
widget (e.g., a search tool or a custom function). Format:
`projects/{project}/locations/{location}/agents/{agent}/tools/{tool}`

`string source_tool_name = 1 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for sourceToolName. |

### hasPythonFunction()

    public abstract boolean hasPythonFunction()

Optional. Configuration for a Python function used to transform the
source tool's output into the widget's input format.

`
.google.cloud.ces.v1.PythonFunction python_function = 5 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the pythonFunction field is set. |