# Source code for azure.mgmt.consumption.models.reservation_detail_py3

    # coding=utf-8
    # --------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for
    # license information.
    #
    # Code generated by Microsoft (R) AutoRest Code Generator.
    # Changes may cause incorrect behavior and will be lost if the code is
    # regenerated.
    # --------------------------------------------------------------------------

    from .resource_py3 import Resource

    class ReservationDetail(Resource):
        """reservation detail resource.

        Variables are only populated by the server, and will be ignored when
        sending a request.

        :ivar id: Resource Id.
        :vartype id: str
        :ivar name: Resource name.
        :vartype name: str
        :ivar type: Resource type.
        :vartype type: str
        :ivar tags: Resource tags.
        :vartype tags: dict[str, str]
        :ivar reservation_order_id: 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.
        :vartype reservation_order_id: str
        :ivar reservation_id: The reservation ID is the identifier of a
         reservation within a reservation order. Each reservation is the grouping
         for applying the benefit scope and also specifies the number of instances
         to which the reservation benefit can be applied to.
        :vartype reservation_id: str
        :ivar sku_name: This is the ARM Sku name. It can be used to join with the
         serviceType field in additional info in usage records.
        :vartype sku_name: str
        :ivar reserved_hours: This is the total hours reserved for the day. E.g.
         if reservation for 1 instance was made on 1 PM, this will be 11 hours for
         that day and 24 hours from subsequent days.
        :vartype reserved_hours: decimal.Decimal
        :ivar usage_date: The date on which consumption occurred.
        :vartype usage_date: datetime
        :ivar used_hours: This is the total hours used by the instance.
        :vartype used_hours: decimal.Decimal
        :ivar instance_id: This identifier is the name of the resource or the
         fully qualified Resource ID.
        :vartype instance_id: str
        :ivar total_reserved_quantity: This is the total count of instances that
         are reserved for the reservationId.
        :vartype total_reserved_quantity: decimal.Decimal
        """

        _validation = {
            'id': {'readonly': True},
            'name': {'readonly': True},
            'type': {'readonly': True},
            'tags': {'readonly': True},
            'reservation_order_id': {'readonly': True},
            'reservation_id': {'readonly': True},
            'sku_name': {'readonly': True},
            'reserved_hours': {'readonly': True},
            'usage_date': {'readonly': True},
            'used_hours': {'readonly': True},
            'instance_id': {'readonly': True},
            'total_reserved_quantity': {'readonly': True},
        }

        _attribute_map = {
            'id': {'key': 'id', 'type': 'str'},
            'name': {'key': 'name', 'type': 'str'},
            'type': {'key': 'type', 'type': 'str'},
            'tags': {'key': 'tags', 'type': '{str}'},
            'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'},
            'reservation_id': {'key': 'properties.reservationId', 'type': 'str'},
            'sku_name': {'key': 'properties.skuName', 'type': 'str'},
            'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'},
            'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'},
            'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'},
            'instance_id': {'key': 'properties.instanceId', 'type': 'str'},
            'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'},
        }

        def __init__(self, **kwargs) -> None:
            super(ReservationDetail, self).__init__(**kwargs)
            self.reservation_order_id = None
            self.reservation_id = None
            self.sku_name = None
            self.reserved_hours = None
            self.usage_date = None
            self.used_hours = None
            self.instance_id = None
            self.total_reserved_quantity = None