# 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::IotHub::Mgmt::V2019_03_22_preview
  module Models
    #
    # The properties related to a storage container endpoint.
    #
    class RoutingStorageContainerProperties

      include MsRestAzure

      # @return [String] The connection string of the storage account.
      attr_accessor :connection_string

      # @return [String] The name that identifies this endpoint. The name can
      # only include alphanumeric characters, periods, underscores, hyphens and
      # has a maximum length of 64 characters. The following names are
      # reserved:  events, fileNotifications, $default. Endpoint names must be
      # unique across endpoint types.
      attr_accessor :name

      # @return [String] The subscription identifier of the storage account.
      attr_accessor :subscription_id

      # @return [String] The name of the resource group of the storage account.
      attr_accessor :resource_group

      # @return [String] The name of storage container in the storage account.
      attr_accessor :container_name

      # @return [String] File name format for the blob. Default format is
      # {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are
      # mandatory but can be reordered.
      attr_accessor :file_name_format

      # @return [Integer] Time interval at which blobs are written to storage.
      # Value should be between 60 and 720 seconds. Default value is 300
      # seconds.
      attr_accessor :batch_frequency_in_seconds

      # @return [Integer] Maximum number of bytes for each blob written to
      # storage. Value should be between 10485760(10MB) and 524288000(500MB).
      # Default value is 314572800(300MB).
      attr_accessor :max_chunk_size_in_bytes

      # @return [Enum] Encoding that is used to serialize messages to blobs.
      # Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value
      # is 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON'
      attr_accessor :encoding


      #
      # Mapper for RoutingStorageContainerProperties class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'RoutingStorageContainerProperties',
          type: {
            name: 'Composite',
            class_name: 'RoutingStorageContainerProperties',
            model_properties: {
              connection_string: {
                client_side_validation: true,
                required: true,
                serialized_name: 'connectionString',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: true,
                serialized_name: 'name',
                constraints: {
                  Pattern: '^[A-Za-z0-9-._]{1,64}$'
                },
                type: {
                  name: 'String'
                }
              },
              subscription_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'subscriptionId',
                type: {
                  name: 'String'
                }
              },
              resource_group: {
                client_side_validation: true,
                required: false,
                serialized_name: 'resourceGroup',
                type: {
                  name: 'String'
                }
              },
              container_name: {
                client_side_validation: true,
                required: true,
                serialized_name: 'containerName',
                type: {
                  name: 'String'
                }
              },
              file_name_format: {
                client_side_validation: true,
                required: false,
                serialized_name: 'fileNameFormat',
                type: {
                  name: 'String'
                }
              },
              batch_frequency_in_seconds: {
                client_side_validation: true,
                required: false,
                serialized_name: 'batchFrequencyInSeconds',
                constraints: {
                  InclusiveMaximum: 720,
                  InclusiveMinimum: 60
                },
                type: {
                  name: 'Number'
                }
              },
              max_chunk_size_in_bytes: {
                client_side_validation: true,
                required: false,
                serialized_name: 'maxChunkSizeInBytes',
                constraints: {
                  InclusiveMaximum: 524288000,
                  InclusiveMinimum: 10485760
                },
                type: {
                  name: 'Number'
                }
              },
              encoding: {
                client_side_validation: true,
                required: false,
                serialized_name: 'encoding',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
