# 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::Monitor::Mgmt::V2015_05_01
  module Models
    #
    # Properties that define a favorite that is associated to an Application
    # Insights component.
    #
    class ApplicationInsightsComponentFavorite

      include MsRestAzure

      # @return [String] The user-defined name of the favorite.
      attr_accessor :name

      # @return [String] Configuration of this particular favorite, which are
      # driven by the Azure portal UX. Configuration data is a string
      # containing valid JSON
      attr_accessor :config

      # @return [String] This instance's version of the data model. This can
      # change as new features are added that can be marked favorite. Current
      # examples include MetricsExplorer (ME) and Search.
      attr_accessor :version

      # @return [String] Internally assigned unique id of the favorite
      # definition.
      attr_accessor :favorite_id

      # @return [FavoriteType] Enum indicating if this favorite definition is
      # owned by a specific user or is shared between all users with access to
      # the Application Insights component. Possible values include: 'shared',
      # 'user'
      attr_accessor :favorite_type

      # @return [String] The source of the favorite definition.
      attr_accessor :source_type

      # @return [String] Date and time in UTC of the last modification that was
      # made to this favorite definition.
      attr_accessor :time_modified

      # @return [Array<String>] A list of 0 or more tags that are associated
      # with this favorite definition
      attr_accessor :tags

      # @return [String] Favorite category, as defined by the user at creation
      # time.
      attr_accessor :category

      # @return [Boolean] Flag denoting wether or not this favorite was
      # generated from a template.
      attr_accessor :is_generated_from_template

      # @return [String] Unique user id of the specific user that owns this
      # favorite.
      attr_accessor :user_id


      #
      # Mapper for ApplicationInsightsComponentFavorite class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ApplicationInsightsComponentFavorite',
          type: {
            name: 'Composite',
            class_name: 'ApplicationInsightsComponentFavorite',
            model_properties: {
              name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'Name',
                type: {
                  name: 'String'
                }
              },
              config: {
                client_side_validation: true,
                required: false,
                serialized_name: 'Config',
                type: {
                  name: 'String'
                }
              },
              version: {
                client_side_validation: true,
                required: false,
                serialized_name: 'Version',
                type: {
                  name: 'String'
                }
              },
              favorite_id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'FavoriteId',
                type: {
                  name: 'String'
                }
              },
              favorite_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'FavoriteType',
                type: {
                  name: 'Enum',
                  module: 'FavoriteType'
                }
              },
              source_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'SourceType',
                type: {
                  name: 'String'
                }
              },
              time_modified: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'TimeModified',
                type: {
                  name: 'String'
                }
              },
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'Tags',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              category: {
                client_side_validation: true,
                required: false,
                serialized_name: 'Category',
                type: {
                  name: 'String'
                }
              },
              is_generated_from_template: {
                client_side_validation: true,
                required: false,
                serialized_name: 'IsGeneratedFromTemplate',
                type: {
                  name: 'Boolean'
                }
              },
              user_id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'UserId',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
