# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::DataFactory::Mgmt::V2018_06_01
  module Models
    #
    # A copy activity tabular translator.
    #
    class TabularTranslator < CopyTranslator

      include MsRestAzure


      def initialize
        @type = "TabularTranslator"
      end

      attr_accessor :type

      # @return Column mappings. Example: "UserId: MyUserId, Group: MyGroup,
      # Name: MyName" Type: string (or Expression with resultType string). This
      # property will be retired. Please use mappings property.
      attr_accessor :column_mappings

      # @return The schema mapping to map between tabular data and hierarchical
      # data. Example: {"Column1": "$.Column1", "Column2":
      # "$.Column2.Property1", "Column3": "$.Column2.Property2"}. Type: object
      # (or Expression with resultType object). This property will be retired.
      # Please use mappings property.
      attr_accessor :schema_mapping

      # @return The JSON Path of the Nested Array that is going to do
      # cross-apply. Type: object (or Expression with resultType object).
      attr_accessor :collection_reference

      # @return Whether to map complex (array and object) values to simple
      # strings in json format. Type: boolean (or Expression with resultType
      # boolean).
      attr_accessor :map_complex_values_to_string

      # @return Column mappings with logical types. Tabular->tabular example:
      # [{"source":{"name":"CustomerName","type":"String"},"sink":{"name":"ClientName","type":"String"}},{"source":{"name":"CustomerAddress","type":"String"},"sink":{"name":"ClientAddress","type":"String"}}].
      # Hierarchical->tabular example:
      # [{"source":{"path":"$.CustomerName","type":"String"},"sink":{"name":"ClientName","type":"String"}},{"source":{"path":"$.CustomerAddress","type":"String"},"sink":{"name":"ClientAddress","type":"String"}}].
      # Type: object (or Expression with resultType object).
      attr_accessor :mappings

      # @return Whether to enable the advanced type conversion feature in the
      # Copy activity. Type: boolean (or Expression with resultType boolean).
      attr_accessor :type_conversion

      # @return [TypeConversionSettings] Type conversion settings
      attr_accessor :type_conversion_settings


      #
      # Mapper for TabularTranslator class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'TabularTranslator',
          type: {
            name: 'Composite',
            class_name: 'TabularTranslator',
            model_properties: {
              additional_properties: {
                client_side_validation: true,
                required: false,
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              column_mappings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'columnMappings',
                type: {
                  name: 'Object'
                }
              },
              schema_mapping: {
                client_side_validation: true,
                required: false,
                serialized_name: 'schemaMapping',
                type: {
                  name: 'Object'
                }
              },
              collection_reference: {
                client_side_validation: true,
                required: false,
                serialized_name: 'collectionReference',
                type: {
                  name: 'Object'
                }
              },
              map_complex_values_to_string: {
                client_side_validation: true,
                required: false,
                serialized_name: 'mapComplexValuesToString',
                type: {
                  name: 'Object'
                }
              },
              mappings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'mappings',
                type: {
                  name: 'Object'
                }
              },
              type_conversion: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeConversion',
                type: {
                  name: 'Object'
                }
              },
              type_conversion_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeConversionSettings',
                type: {
                  name: 'Composite',
                  class_name: 'TypeConversionSettings'
                }
              }
            }
          }
        }
      end
    end
  end
end
