# 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::MachineLearning::Mgmt::V2017_01_01
  module Models
    #
    # Swagger 2.0 schema for a column within the data table representing a web
    # service input or output. See Swagger specification:
    # http://swagger.io/specification/
    #
    class ColumnSpecification

      include MsRestAzure

      # @return [ColumnType] Data type of the column. Possible values include:
      # 'Boolean', 'Integer', 'Number', 'String'
      attr_accessor :type

      # @return [ColumnFormat] Additional format information for the data type.
      # Possible values include: 'Byte', 'Char', 'Complex64', 'Complex128',
      # 'Date-time', 'Date-timeOffset', 'Double', 'Duration', 'Float', 'Int8',
      # 'Int16', 'Int32', 'Int64', 'Uint8', 'Uint16', 'Uint32', 'Uint64'
      attr_accessor :format

      # @return If the data type is categorical, this provides the list of
      # accepted categories.
      attr_accessor :enum

      # @return [Boolean] Flag indicating if the type supports null values or
      # not.
      attr_accessor :x_ms_isnullable

      # @return [Boolean] Flag indicating whether the categories are treated as
      # an ordered set or not, if this is a categorical column.
      attr_accessor :x_ms_isordered


      #
      # Mapper for ColumnSpecification class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ColumnSpecification',
          type: {
            name: 'Composite',
            class_name: 'ColumnSpecification',
            model_properties: {
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              format: {
                client_side_validation: true,
                required: false,
                serialized_name: 'format',
                type: {
                  name: 'String'
                }
              },
              enum: {
                client_side_validation: true,
                required: false,
                serialized_name: 'enum',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              x_ms_isnullable: {
                client_side_validation: true,
                required: false,
                serialized_name: 'x-ms-isnullable',
                type: {
                  name: 'Boolean'
                }
              },
              x_ms_isordered: {
                client_side_validation: true,
                required: false,
                serialized_name: 'x-ms-isordered',
                type: {
                  name: 'Boolean'
                }
              }
            }
          }
        }
      end
    end
  end
end
