# 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::CostManagement::Mgmt::V2019_03_01_preview
  module Models
    #
    # The showback rule model definition
    #
    class ShowbackRule

      include MsRestAzure

      # @return [String] Rule id
      attr_accessor :id

      # @return [String] Rule name
      attr_accessor :name

      # @return [String] Rule type
      attr_accessor :type

      # @return [String] Description of a showback rule.
      attr_accessor :description

      # @return [ShowbackRuleStatus] The current status of the showback rule.
      # Possible values include: 'NotActive', 'Active'
      attr_accessor :status

      # @return [Integer] The current version of showback rule.
      attr_accessor :version

      # @return [Array<Scope>] List of authorized assigned scopes.
      attr_accessor :scopes

      # @return [DateTime] The time when the showback rule was created.
      attr_accessor :creation_time

      # @return [DateTime] The current time when showback rule was deprecate.
      attr_accessor :deprecation_time

      # @return [DateTime] The current status when showback rule was modified.
      attr_accessor :modification_time

      # @return [String] Polymorphic Discriminator
      attr_accessor :ruleType


      #
      # Mapper for ShowbackRule class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ShowbackRule',
          type: {
            name: 'Composite',
            class_name: 'ShowbackRule',
            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'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.description',
                type: {
                  name: 'String'
                }
              },
              status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.status',
                type: {
                  name: 'String'
                }
              },
              version: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.version',
                type: {
                  name: 'Number'
                }
              },
              scopes: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.scopes',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ScopeElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'Scope'
                      }
                  }
                }
              },
              creation_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.creationTime',
                type: {
                  name: 'DateTime'
                }
              },
              deprecation_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.deprecationTime',
                type: {
                  name: 'DateTime'
                }
              },
              modification_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.modificationTime',
                type: {
                  name: 'DateTime'
                }
              },
              ruleType: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.ruleType',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
