# 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::Web::Mgmt::V2018_02_01
  module Models
    #
    # Class representing a diagnostic analysis done on an application
    #
    class DiagnosticAnalysis < ProxyOnlyResource

      include MsRestAzure

      # @return [DateTime] Start time of the period
      attr_accessor :start_time

      # @return [DateTime] End time of the period
      attr_accessor :end_time

      # @return [Array<AbnormalTimePeriod>] List of time periods.
      attr_accessor :abnormal_time_periods

      # @return [Array<AnalysisData>] Data by each detector
      attr_accessor :payload

      # @return [Array<DetectorDefinition>] Data by each detector for detectors
      # that did not corelate
      attr_accessor :non_correlated_detectors


      #
      # Mapper for DiagnosticAnalysis class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'DiagnosticAnalysis',
          type: {
            name: 'Composite',
            class_name: 'DiagnosticAnalysis',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              kind: {
                client_side_validation: true,
                required: false,
                serialized_name: 'kind',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              start_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.startTime',
                type: {
                  name: 'DateTime'
                }
              },
              end_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.endTime',
                type: {
                  name: 'DateTime'
                }
              },
              abnormal_time_periods: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.abnormalTimePeriods',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'AbnormalTimePeriodElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'AbnormalTimePeriod'
                      }
                  }
                }
              },
              payload: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.payload',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'AnalysisDataElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'AnalysisData'
                      }
                  }
                }
              },
              non_correlated_detectors: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.nonCorrelatedDetectors',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'DetectorDefinitionElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'DetectorDefinition'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
