Interface Mapping.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Mapping.Builder,Mapping>, SdkBuilder<Mapping.Builder,Mapping>, SdkPojo
Enclosing class:
Mapping

@Mutable @NotThreadSafe public static interface Mapping.Builder extends SdkPojo, CopyableBuilder<Mapping.Builder,Mapping>
  • Method Details

    • toKey

      Mapping.Builder toKey(String toKey)

      After the apply mapping, what the name of the column should be. Can be the same as FromPath.

      Parameters:
      toKey - After the apply mapping, what the name of the column should be. Can be the same as FromPath.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • fromPath

      Mapping.Builder fromPath(Collection<String> fromPath)

      The table or column to be modified.

      Parameters:
      fromPath - The table or column to be modified.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • fromPath

      Mapping.Builder fromPath(String... fromPath)

      The table or column to be modified.

      Parameters:
      fromPath - The table or column to be modified.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • fromType

      Mapping.Builder fromType(String fromType)

      The type of the data to be modified.

      Parameters:
      fromType - The type of the data to be modified.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toType

      Mapping.Builder toType(String toType)

      The data type that the data is to be modified to.

      Parameters:
      toType - The data type that the data is to be modified to.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dropped

      Mapping.Builder dropped(Boolean dropped)

      If true, then the column is removed.

      Parameters:
      dropped - If true, then the column is removed.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • children

      Mapping.Builder children(Collection<Mapping> children)

      Only applicable to nested data structures. If you want to change the parent structure, but also one of its children, you can fill out this data strucutre. It is also Mapping, but its FromPath will be the parent's FromPath plus the FromPath from this structure.

      For the children part, suppose you have the structure:

      { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }

      You can specify a Mapping that looks like:

      { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }

      Parameters:
      children - Only applicable to nested data structures. If you want to change the parent structure, but also one of its children, you can fill out this data strucutre. It is also Mapping, but its FromPath will be the parent's FromPath plus the FromPath from this structure.

      For the children part, suppose you have the structure:

      { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }

      You can specify a Mapping that looks like:

      { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • children

      Mapping.Builder children(Mapping... children)

      Only applicable to nested data structures. If you want to change the parent structure, but also one of its children, you can fill out this data strucutre. It is also Mapping, but its FromPath will be the parent's FromPath plus the FromPath from this structure.

      For the children part, suppose you have the structure:

      { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }

      You can specify a Mapping that looks like:

      { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }

      Parameters:
      children - Only applicable to nested data structures. If you want to change the parent structure, but also one of its children, you can fill out this data strucutre. It is also Mapping, but its FromPath will be the parent's FromPath plus the FromPath from this structure.

      For the children part, suppose you have the structure:

      { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }

      You can specify a Mapping that looks like:

      { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • children

      Mapping.Builder children(Consumer<Mapping.Builder>... children)

      Only applicable to nested data structures. If you want to change the parent structure, but also one of its children, you can fill out this data strucutre. It is also Mapping, but its FromPath will be the parent's FromPath plus the FromPath from this structure.

      For the children part, suppose you have the structure:

      { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }

      You can specify a Mapping that looks like:

      { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", "Dropped": false, }] }

      This is a convenience method that creates an instance of the Mapping.Builder avoiding the need to create one manually via Mapping.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to children(List<Mapping>).

      Parameters:
      children - a consumer that will call methods on Mapping.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: