İstek
CreateLeaseRequest
Döndürülen değer
CreateLeaseResponse
Koşullar:
- lease_id, iş ortağı arka ucu tarafından oluşturulmalı ve CreateLeaseResponse'ta ayarlanmalıdır.
- lease_expiration_time, CreateLeaseResponse'ta ayarlanmalıdır.
- Kaynak alanı CreateLeaseRequest'te belirtilmişse CreateLeaseResponse'ta ayarlanması ve CreateLeaseRequest ile eşleşmesi gerekir.
- CreateLeaseResponse'taki diğer tüm alanlar ayarlanmalı ve CreateLeaseRequest ile eşleşmelidir.
Standart gRPC hata kodları
INVALID_ARGUMENT
(geçersiz satıcı kimliği, hizmet kimliği, istemci referansı veya slot süresi spesifikasyonu)ALREADY_EXISTS
(istemcinin slotla ilgili zaten kiralama hizmeti varsa)RESOURCE_EXHAUSTED
(alan yoksa)
// Request to create a [ext.maps.booking.partner.v0.Lease] for a slot in the // inventory. The expiration time in the returned Lease may be modified by the // backend, e.g. if the requested lease period is too long. message CreateLeaseRequest { // The lease to be created with information about the appointment slot Lease lease = 1; } // Response for the [ext.maps.booking.partner.v0.CreateLease] RPC with the // created [ext.maps.booking.partner.v0.Lease] message CreateLeaseResponse { // The created [ext.maps.booking.partner.v0.Lease] Lease lease = 1; }