# 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::Reservations::Mgmt::V2019_04_01_preview
  module Models
    #
    # Model object.
    #
    #
    class ReservationOrderResponse

      include MsRestAzure

      # @return [Integer]
      attr_accessor :etag

      # @return [String] Identifier of the reservation
      attr_accessor :id

      # @return [String] Name of the reservation
      attr_accessor :name

      # @return [String] Friendly name for user to easily identified the
      # reservation.
      attr_accessor :display_name

      # @return [DateTime] This is the DateTime when the reservation was
      # initially requested for purchase.
      attr_accessor :request_date_time

      # @return [DateTime] This is the DateTime when the reservation was
      # created.
      attr_accessor :created_date_time

      # @return [Date] This is the date when the Reservation will expire.
      attr_accessor :expiry_date

      # @return [Integer]
      attr_accessor :original_quantity

      # @return [ReservationTerm] Possible values include: 'P1Y', 'P3Y'
      attr_accessor :term

      # @return [String] Current state of the reservation.
      attr_accessor :provisioning_state

      # @return [ReservationBillingPlan] Possible values include: 'Upfront',
      # 'Monthly'
      attr_accessor :billing_plan

      # @return [ReservationOrderBillingPlanInformation]
      attr_accessor :plan_information

      # @return [Array<ReservationResponse>]
      attr_accessor :reservations

      # @return [String] Type of resource. "Microsoft.Capacity/reservations"
      attr_accessor :type


      #
      # Mapper for ReservationOrderResponse class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ReservationOrderResponse',
          type: {
            name: 'Composite',
            class_name: 'ReservationOrderResponse',
            model_properties: {
              etag: {
                client_side_validation: true,
                required: false,
                serialized_name: 'etag',
                type: {
                  name: 'Number'
                }
              },
              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'
                }
              },
              display_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.displayName',
                type: {
                  name: 'String'
                }
              },
              request_date_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.requestDateTime',
                type: {
                  name: 'DateTime'
                }
              },
              created_date_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.createdDateTime',
                type: {
                  name: 'DateTime'
                }
              },
              expiry_date: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.expiryDate',
                type: {
                  name: 'Date'
                }
              },
              original_quantity: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.originalQuantity',
                type: {
                  name: 'Number'
                }
              },
              term: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.term',
                type: {
                  name: 'String'
                }
              },
              provisioning_state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.provisioningState',
                type: {
                  name: 'String'
                }
              },
              billing_plan: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.billingPlan',
                type: {
                  name: 'String'
                }
              },
              plan_information: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.planInformation',
                type: {
                  name: 'Composite',
                  class_name: 'ReservationOrderBillingPlanInformation'
                }
              },
              reservations: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.reservations',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ReservationResponseElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ReservationResponse'
                      }
                  }
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
