# 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::Consumption::Mgmt::V2019_06_01
  module Models
    #
    # Reservation transaction resource.
    #
    class ReservationTransaction < Resource

      include MsRestAzure

      # @return [DateTime] The date of the transaction
      attr_accessor :event_date

      # @return [String] The reservation order ID is the identifier for a
      # reservation purchase. Each reservation order ID represents a single
      # purchase transaction. A reservation order contains reservations. The
      # reservation order specifies the VM size and region for the
      # reservations.
      attr_accessor :reservation_order_id

      # @return [String] The description of the transaction.
      attr_accessor :description

      # @return [String] The type of the transaction (Purchase, Cancel, etc.)
      attr_accessor :event_type

      # @return The quantity of the transaction.
      attr_accessor :quantity

      # @return The charge of the transaction.
      attr_accessor :amount

      # @return [String] The ISO currency in which the transaction is charged,
      # for example, USD.
      attr_accessor :currency

      # @return [String] The name of the reservation order.
      attr_accessor :reservation_order_name

      # @return [String] The purchasing enrollment.
      attr_accessor :purchasing_enrollment

      # @return The subscription guid that makes the transaction.
      attr_accessor :purchasing_subscription_guid

      # @return [String] The subscription name that makes the transaction.
      attr_accessor :purchasing_subscription_name

      # @return [String] This is the ARM Sku name. It can be used to join with
      # the serviceType field in additional info in usage records.
      attr_accessor :arm_sku_name

      # @return [String] This is the term of the transaction.
      attr_accessor :term

      # @return [String] The region of the transaction.
      attr_accessor :region

      # @return [String] The name of the account that makes the transaction.
      attr_accessor :account_name

      # @return [String] The email of the account owner that makes the
      # transaction.
      attr_accessor :account_owner_email

      # @return [String] The department name.
      attr_accessor :department_name

      # @return [String] The cost center of this department if it is a
      # department and a cost center is provided.
      attr_accessor :cost_center

      # @return [String] The current enrollment.
      attr_accessor :current_enrollment


      #
      # Mapper for ReservationTransaction class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ReservationTransaction',
          type: {
            name: 'Composite',
            class_name: 'ReservationTransaction',
            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'
                }
              },
              tags: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'tags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              event_date: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.eventDate',
                type: {
                  name: 'DateTime'
                }
              },
              reservation_order_id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.reservationOrderId',
                type: {
                  name: 'String'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.description',
                type: {
                  name: 'String'
                }
              },
              event_type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.eventType',
                type: {
                  name: 'String'
                }
              },
              quantity: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.quantity',
                type: {
                  name: 'Number'
                }
              },
              amount: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.amount',
                type: {
                  name: 'Number'
                }
              },
              currency: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.currency',
                type: {
                  name: 'String'
                }
              },
              reservation_order_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.reservationOrderName',
                type: {
                  name: 'String'
                }
              },
              purchasing_enrollment: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.purchasingEnrollment',
                type: {
                  name: 'String'
                }
              },
              purchasing_subscription_guid: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.purchasingSubscriptionGuid',
                type: {
                  name: 'String'
                }
              },
              purchasing_subscription_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.purchasingSubscriptionName',
                type: {
                  name: 'String'
                }
              },
              arm_sku_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.armSkuName',
                type: {
                  name: 'String'
                }
              },
              term: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.term',
                type: {
                  name: 'String'
                }
              },
              region: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.region',
                type: {
                  name: 'String'
                }
              },
              account_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.accountName',
                type: {
                  name: 'String'
                }
              },
              account_owner_email: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.accountOwnerEmail',
                type: {
                  name: 'String'
                }
              },
              department_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.departmentName',
                type: {
                  name: 'String'
                }
              },
              cost_center: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.costCenter',
                type: {
                  name: 'String'
                }
              },
              current_enrollment: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.currentEnrollment',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
