# 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::ADHybridHealthService::Mgmt::V2014_01_01
  module Models
    #
    # The alert details indicating an issue with service or server.
    #
    class Alert

      include MsRestAzure

      # @return The alert Id.
      attr_accessor :alert_id

      # @return [Level] The alert level which indicates the severity of the
      # alert. Possible values include: 'Warning', 'Error', 'PreWarning'
      attr_accessor :level

      # @return [State] The alert state which can be either active or resolved
      # with multiple resolution types. Possible values include: 'Active',
      # 'ResolvedByPositiveResult', 'ResolvedManually', 'ResolvedByTimer',
      # 'ResolvedByStateChange'
      attr_accessor :state

      # @return [String] The alert short name.
      attr_accessor :short_name

      # @return [String] The display name for the alert.
      attr_accessor :display_name

      # @return [String] The alert description.
      attr_accessor :description

      # @return [String] The alert remediation.
      attr_accessor :remediation

      # @return [Array<HelpLink>] The help links to get more information
      # related to the alert.
      attr_accessor :related_links

      # @return [String] The scope of the alert. Indicates if it is a service
      # or a server related alert.
      attr_accessor :scope

      # @return [Array<AdditionalInformation>] Additional information related
      # to the alert.
      attr_accessor :additional_information

      # @return [DateTime] The date and time,in UTC,when the alert was created.
      attr_accessor :created_date

      # @return [DateTime] The date and time, in UTC, when the alert was
      # resolved.
      attr_accessor :resolved_date

      # @return [DateTime] The date and time, in UTC, when the alert was last
      # updated.
      attr_accessor :last_updated

      # @return [String] The monitoring role type for which the alert was
      # raised.
      attr_accessor :monitor_role_type

      # @return [Array<Item>] The active alert properties.
      attr_accessor :active_alert_properties

      # @return [Array<Item>] The resolved alert properties.
      attr_accessor :resolved_alert_properties

      # @return The tenant Id.
      attr_accessor :tenant_id

      # @return The service Id.
      attr_accessor :service_id

      # @return The server Id.
      attr_accessor :service_member_id


      #
      # Mapper for Alert class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Alert',
          type: {
            name: 'Composite',
            class_name: 'Alert',
            model_properties: {
              alert_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'alertId',
                type: {
                  name: 'String'
                }
              },
              level: {
                client_side_validation: true,
                required: false,
                serialized_name: 'level',
                type: {
                  name: 'String'
                }
              },
              state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'state',
                type: {
                  name: 'String'
                }
              },
              short_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'shortName',
                type: {
                  name: 'String'
                }
              },
              display_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'displayName',
                type: {
                  name: 'String'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'description',
                type: {
                  name: 'String'
                }
              },
              remediation: {
                client_side_validation: true,
                required: false,
                serialized_name: 'remediation',
                type: {
                  name: 'String'
                }
              },
              related_links: {
                client_side_validation: true,
                required: false,
                serialized_name: 'relatedLinks',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'HelpLinkElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'HelpLink'
                      }
                  }
                }
              },
              scope: {
                client_side_validation: true,
                required: false,
                serialized_name: 'scope',
                type: {
                  name: 'String'
                }
              },
              additional_information: {
                client_side_validation: true,
                required: false,
                serialized_name: 'additionalInformation',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'AdditionalInformationElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'AdditionalInformation'
                      }
                  }
                }
              },
              created_date: {
                client_side_validation: true,
                required: false,
                serialized_name: 'createdDate',
                type: {
                  name: 'DateTime'
                }
              },
              resolved_date: {
                client_side_validation: true,
                required: false,
                serialized_name: 'resolvedDate',
                type: {
                  name: 'DateTime'
                }
              },
              last_updated: {
                client_side_validation: true,
                required: false,
                serialized_name: 'lastUpdated',
                type: {
                  name: 'DateTime'
                }
              },
              monitor_role_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'monitorRoleType',
                type: {
                  name: 'String'
                }
              },
              active_alert_properties: {
                client_side_validation: true,
                required: false,
                serialized_name: 'activeAlertProperties',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ItemElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'Item'
                      }
                  }
                }
              },
              resolved_alert_properties: {
                client_side_validation: true,
                required: false,
                serialized_name: 'resolvedAlertProperties',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ItemElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'Item'
                      }
                  }
                }
              },
              tenant_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tenantId',
                type: {
                  name: 'String'
                }
              },
              service_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'serviceId',
                type: {
                  name: 'String'
                }
              },
              service_member_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'serviceMemberId',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
