# 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::CognitiveServices::AnomalyDetector::V1_0
  module Models
    #
    # Model object.
    #
    #
    class EntireDetectResponse

      include MsRestAzure

      # @return [Integer] Frequency extracted from the series, zero means no
      # recurrent pattern has been found.
      attr_accessor :period

      # @return [Array<Float>] ExpectedValues contain expected value for each
      # input point. The index of the array is consistent with the input
      # series.
      attr_accessor :expected_values

      # @return [Array<Float>] UpperMargins contain upper margin of each input
      # point. UpperMargin is used to calculate upperBoundary, which equals to
      # expectedValue + (100 - marginScale)*upperMargin. Anomalies in response
      # can be filtered by upperBoundary and lowerBoundary. By adjusting
      # marginScale value, less significant anomalies can be filtered in client
      # side. The index of the array is consistent with the input series.
      attr_accessor :upper_margins

      # @return [Array<Float>] LowerMargins contain lower margin of each input
      # point. LowerMargin is used to calculate lowerBoundary, which equals to
      # expectedValue - (100 - marginScale)*lowerMargin. Points between the
      # boundary can be marked as normal ones in client side. The index of the
      # array is consistent with the input series.
      attr_accessor :lower_margins

      # @return [Array<Boolean>] IsAnomaly contains anomaly properties for each
      # input point. True means an anomaly either negative or positive has been
      # detected. The index of the array is consistent with the input series.
      attr_accessor :is_anomaly

      # @return [Array<Boolean>] IsNegativeAnomaly contains anomaly status in
      # negative direction for each input point. True means a negative anomaly
      # has been detected. A negative anomaly means the point is detected as an
      # anomaly and its real value is smaller than the expected one. The index
      # of the array is consistent with the input series.
      attr_accessor :is_negative_anomaly

      # @return [Array<Boolean>] IsPositiveAnomaly contain anomaly status in
      # positive direction for each input point. True means a positive anomaly
      # has been detected. A positive anomaly means the point is detected as an
      # anomaly and its real value is larger than the expected one. The index
      # of the array is consistent with the input series.
      attr_accessor :is_positive_anomaly


      #
      # Mapper for EntireDetectResponse class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'EntireDetectResponse',
          type: {
            name: 'Composite',
            class_name: 'EntireDetectResponse',
            model_properties: {
              period: {
                client_side_validation: true,
                required: true,
                serialized_name: 'period',
                type: {
                  name: 'Number'
                }
              },
              expected_values: {
                client_side_validation: true,
                required: true,
                serialized_name: 'expectedValues',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'FloatElementType',
                      type: {
                        name: 'Double'
                      }
                  }
                }
              },
              upper_margins: {
                client_side_validation: true,
                required: true,
                serialized_name: 'upperMargins',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'FloatElementType',
                      type: {
                        name: 'Double'
                      }
                  }
                }
              },
              lower_margins: {
                client_side_validation: true,
                required: true,
                serialized_name: 'lowerMargins',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'FloatElementType',
                      type: {
                        name: 'Double'
                      }
                  }
                }
              },
              is_anomaly: {
                client_side_validation: true,
                required: true,
                serialized_name: 'isAnomaly',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'BooleanElementType',
                      type: {
                        name: 'Boolean'
                      }
                  }
                }
              },
              is_negative_anomaly: {
                client_side_validation: true,
                required: true,
                serialized_name: 'isNegativeAnomaly',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'BooleanElementType',
                      type: {
                        name: 'Boolean'
                      }
                  }
                }
              },
              is_positive_anomaly: {
                client_side_validation: true,
                required: true,
                serialized_name: 'isPositiveAnomaly',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'BooleanElementType',
                      type: {
                        name: 'Boolean'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
