# 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
    #
    # The data stored in JSON format.
    #
    class JsonFormat < DatasetStorageFormat

      include MsRestAzure


      def initialize
        @type = "JsonFormat"
      end

      attr_accessor :type

      # @return File pattern of JSON. To be more specific, the way of
      # separating a collection of JSON objects. The default value is
      # 'setOfObjects'. It is case-sensitive.
      attr_accessor :file_pattern

      # @return The character used to separate nesting levels. Default value is
      # '.' (dot). Type: string (or Expression with resultType string).
      attr_accessor :nesting_separator

      # @return The code page name of the preferred encoding. If not provided,
      # the default value is 'utf-8', unless the byte order mark (BOM) denotes
      # another Unicode encoding. The full list of supported values can be
      # found in the 'Name' column of the table of encodings in the following
      # reference: https://go.microsoft.com/fwlink/?linkid=861078. Type: string
      # (or Expression with resultType string).
      attr_accessor :encoding_name

      # @return The JSONPath of the JSON array element to be flattened.
      # Example: "$.ArrayPath". Type: string (or Expression with resultType
      # string).
      attr_accessor :json_node_reference

      # @return The JSONPath definition for each column mapping with a
      # customized column name to extract data from JSON file. For fields under
      # root object, start with "$"; for fields inside the array chosen by
      # jsonNodeReference property, start from the array element. Example:
      # {"Column1": "$.Column1Path", "Column2": "Column2PathInArray"}. Type:
      # object (or Expression with resultType object).
      attr_accessor :json_path_definition


      #
      # Mapper for JsonFormat class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'JsonFormat',
          type: {
            name: 'Composite',
            class_name: 'JsonFormat',
            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'
                      }
                  }
                }
              },
              serializer: {
                client_side_validation: true,
                required: false,
                serialized_name: 'serializer',
                type: {
                  name: 'Object'
                }
              },
              deserializer: {
                client_side_validation: true,
                required: false,
                serialized_name: 'deserializer',
                type: {
                  name: 'Object'
                }
              },
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              file_pattern: {
                client_side_validation: true,
                required: false,
                serialized_name: 'filePattern',
                type: {
                  name: 'Object'
                }
              },
              nesting_separator: {
                client_side_validation: true,
                required: false,
                serialized_name: 'nestingSeparator',
                type: {
                  name: 'Object'
                }
              },
              encoding_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'encodingName',
                type: {
                  name: 'Object'
                }
              },
              json_node_reference: {
                client_side_validation: true,
                required: false,
                serialized_name: 'jsonNodeReference',
                type: {
                  name: 'Object'
                }
              },
              json_path_definition: {
                client_side_validation: true,
                required: false,
                serialized_name: 'jsonPathDefinition',
                type: {
                  name: 'Object'
                }
              }
            }
          }
        }
      end
    end
  end
end
