# 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 properties of a showback rule.
    #
    class ShowbackRuleProperties

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["CustomPrice"] = "CustomPriceDetailsKind"
      @@discriminatorMap["CostAllocation"] = "CostAllocationDetailsKind"

      def initialize
        @ruleType = "ShowbackRuleProperties"
      end

      attr_accessor :ruleType

      # @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


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