השיטה CreateLease
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
בקשה
CreateLeaseRequest
הערך המוחזר
CreateLeaseResponse
דרישות:
השותף צריך ליצור את lease_id בבק-אנד ולהגדיר אותו ב-CreateLeaseResponse.
חובה להגדיר את lease_expiration_time ב-CreateLeaseResponse.
אם השדה resources מצוין ב-CreateLeaseRequest, הוא חייב להיות מוגדר ב-CreateLeaseResponse ולהיות זהה ל-CreateLeaseRequest.
צריך להגדיר את כל השדות האחרים ב-CreateLeaseResponse כך שיתאימו ל-CreateLeaseRequest.
קודי שגיאה קנוניים של gRPC
INVALID_ARGUMENT (מזהה סוחר לא תקין, מזהה שירות לא תקין, הפניה ללקוח לא תקינה או הגדרת משבצת זמן לא תקינה)
ALREADY_EXISTS (אם ללקוח כבר יש חוזה שכירות על המיקום)
RESOURCE_EXHAUSTED (אם משבצת הזמן לא זמינה)
// 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.messageCreateLeaseRequest{optionfeatures.(pb.java).nest_in_file_class=YES;// The lease to be created with information about the appointment slotLeaselease=1;}// Response for the [ext.maps.booking.partner.v0.CreateLease] RPC with the// created [ext.maps.booking.partner.v0.Lease]messageCreateLeaseResponse{optionfeatures.(pb.java).nest_in_file_class=YES;// The created [ext.maps.booking.partner.v0.Lease]Leaselease=1;}
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2026-02-18 (שעון UTC)."],[],["The `CreateLeaseRequest` initiates a lease creation, and `CreateLeaseResponse` returns the created lease. The partner backend must generate the `lease_id` and `lease_expiration_time` in the response. If `resources` is in the request, it must be mirrored in the response. All other response fields should mirror the request. Potential gRPC errors include `INVALID_ARGUMENT`, `ALREADY_EXISTS` if a lease exists, or `RESOURCE_EXHAUSTED` if the slot is unavailable. The response might adjust the expiration time.\n"]]