# 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::V2020_09_01
  module Models
    #
    # Represents a recommendation result generated by the recommendation
    # engine.
    #
    class Recommendation < ProxyOnlyResource

      include MsRestAzure

      # @return [DateTime] Timestamp when this instance was created.
      attr_accessor :creation_time

      # @return A GUID value that each recommendation object is associated
      # with.
      attr_accessor :recommendation_id

      # @return [String] Full ARM resource ID string that this recommendation
      # object is associated with.
      attr_accessor :resource_id

      # @return [ResourceScopeType] Name of a resource type this recommendation
      # applies, e.g. Subscription, ServerFarm, Site. Possible values include:
      # 'ServerFarm', 'Subscription', 'WebSite'
      attr_accessor :resource_scope

      # @return [String] Unique name of the rule.
      attr_accessor :rule_name

      # @return [String] UI friendly name of the rule (may not be unique).
      attr_accessor :display_name

      # @return [String] Recommendation text.
      attr_accessor :message

      # @return [NotificationLevel] Level indicating how critical this
      # recommendation can impact. Possible values include: 'Critical',
      # 'Warning', 'Information', 'NonUrgentSuggestion'
      attr_accessor :level

      # @return [Channels] List of channels that this recommendation can apply.
      # Possible values include: 'Notification', 'Api', 'Email', 'Webhook',
      # 'All'
      attr_accessor :channels

      # @return [Array<String>] The list of category tags that this
      # recommendation belongs to.
      attr_accessor :category_tags

      # @return [String] Name of action recommended by this object.
      attr_accessor :action_name

      # @return [Integer] True if this recommendation is still valid (i.e.
      # "actionable"). False if it is invalid.
      attr_accessor :enabled

      # @return [Array<String>] The list of states of this recommendation. If
      # it's null then it should be considered "Active".
      attr_accessor :states

      # @return [DateTime] The beginning time in UTC of a range that the
      # recommendation refers to.
      attr_accessor :start_time

      # @return [DateTime] The end time in UTC of a range that the
      # recommendation refers to.
      attr_accessor :end_time

      # @return [DateTime] When to notify this recommendation next in UTC. Null
      # means that this will never be notified anymore.
      attr_accessor :next_notification_time

      # @return [DateTime] Date and time in UTC when this notification expires.
      attr_accessor :notification_expiration_time

      # @return [DateTime] Last timestamp in UTC this instance was actually
      # notified. Null means that this recommendation hasn't been notified yet.
      attr_accessor :notified_time

      # @return [Float] A metric value measured by the rule.
      attr_accessor :score

      # @return [Boolean] True if this is associated with a dynamically added
      # rule
      attr_accessor :is_dynamic

      # @return [String] Extension name of the portal if exists.
      attr_accessor :extension_name

      # @return [String] Deep link to a blade on the portal.
      attr_accessor :blade_name

      # @return [String] Forward link to an external document associated with
      # the rule.
      attr_accessor :forward_link


      #
      # Mapper for Recommendation class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Recommendation',
          type: {
            name: 'Composite',
            class_name: 'Recommendation',
            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'
                }
              },
              system_data: {
                client_side_validation: true,
                required: false,
                serialized_name: 'systemData',
                type: {
                  name: 'Composite',
                  class_name: 'SystemData'
                }
              },
              creation_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.creationTime',
                type: {
                  name: 'DateTime'
                }
              },
              recommendation_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.recommendationId',
                type: {
                  name: 'String'
                }
              },
              resource_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.resourceId',
                type: {
                  name: 'String'
                }
              },
              resource_scope: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.resourceScope',
                type: {
                  name: 'String'
                }
              },
              rule_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.ruleName',
                type: {
                  name: 'String'
                }
              },
              display_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.displayName',
                type: {
                  name: 'String'
                }
              },
              message: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.message',
                type: {
                  name: 'String'
                }
              },
              level: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.level',
                type: {
                  name: 'Enum',
                  module: 'NotificationLevel'
                }
              },
              channels: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.channels',
                type: {
                  name: 'Enum',
                  module: 'Channels'
                }
              },
              category_tags: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.categoryTags',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              action_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.actionName',
                type: {
                  name: 'String'
                }
              },
              enabled: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.enabled',
                type: {
                  name: 'Number'
                }
              },
              states: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.states',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      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'
                }
              },
              next_notification_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.nextNotificationTime',
                type: {
                  name: 'DateTime'
                }
              },
              notification_expiration_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.notificationExpirationTime',
                type: {
                  name: 'DateTime'
                }
              },
              notified_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.notifiedTime',
                type: {
                  name: 'DateTime'
                }
              },
              score: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.score',
                type: {
                  name: 'Double'
                }
              },
              is_dynamic: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.isDynamic',
                type: {
                  name: 'Boolean'
                }
              },
              extension_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.extensionName',
                type: {
                  name: 'String'
                }
              },
              blade_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.bladeName',
                type: {
                  name: 'String'
                }
              },
              forward_link: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.forwardLink',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
