การสร้างสัญญาเช่าเป็นขั้นตอนแรกเมื่อจองการนัดหมาย แบ็กเอนด์ของพาร์ทเนอร์
จะยืนยันว่าช่วงเวลาที่ขอสำหรับการนัดหมายนั้นถูกต้องและยัง
พร้อมให้บริการ ภายใน พาร์ทเนอร์จะสร้างการระงับชั่วคราวสำหรับช่วงเวลาที่ขอ
ซึ่งตั้งค่าให้หมดอายุโดยอัตโนมัติที่ lease_expiration_time
ระบบแบ็กเอนด์ได้รับอนุญาตให้แก้ไข lease_expiration_time เช่น หาก
ระยะเวลาเช่าที่ขอมีความยาวมากเกินไป ระบบจะส่งคืนสัญญาเช่าที่สร้างขึ้นไปยังไคลเอ็นต์
// Temporary lease for an inventory slot message Lease { option features.(pb.java).nest_in_file_class = YES; // ID of the lease. Ignored when creating a lease. string lease_id = 1; // ID of the merchant for the slot string merchant_id = 2; // ID of the merchant service string service_id = 3; // Start time of the appointment slot google.protobuf.Timestamp start_time = 4; // Duration of the appointment slot google.protobuf.Duration duration = 5; // Opaque tag that identifies the availability slot and matches the value // provided in the availability feed. string availability_tag = 8; // The set of resources that disambiguates the appointment slot, e.g. by // indicating the staff member and room selected by the user. Resources resources = 9; // Unique identifier for this lease, chosen by the client. Serves as an // idempotency token for [ext.maps.booking.partner.v0.CreateLease] requests. string client_reference = 6; // Expiration time of the lease google.protobuf.Timestamp lease_expiration_time = 7; } // Reference to a [ext.maps.booking.partner.v0.Lease] that has been created via // [ext.maps.booking.partner.v0.CreateLease] message LeaseReference { option features.(pb.java).nest_in_file_class = YES; // Lease ID string lease_id = 1; }