# 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
    #
    # Represents CostAllocation showback rule model
    #
    class CostAllocationDetailsKind < ShowbackRuleProperties

      include MsRestAzure


      def initialize
        @ruleType = "CostAllocation"
      end

      attr_accessor :ruleType

      # @return [CostAllocationPolicy] Cost allocation policy. Possible values
      # include: 'Proportional', 'Evenly', 'Fixed'
      attr_accessor :policy


      #
      # Mapper for CostAllocationDetailsKind class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'CostAllocation',
          type: {
            name: 'Composite',
            class_name: 'CostAllocationDetailsKind',
            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'
                }
              },
              ruleType: {
                client_side_validation: true,
                required: true,
                serialized_name: 'ruleType',
                type: {
                  name: 'String'
                }
              },
              policy: {
                client_side_validation: true,
                required: false,
                serialized_name: 'details.policy',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
