bookmark_borderbookmark
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
כשמשתמשים בשדות אופציונליים בשיטת בקשה, צריך ליצור את הודעת הבקשה מחוץ לשיטה ולהעביר אותה כפרמטר יחיד.
כותרות בקשה אופציונליות, למשל הכותרת validate_only בשיטה GoogleAdsService.Search, לא מופיעות בחתימת השיטה כפרמטרים של מילות מפתח, ולכן צריך להגדיר אותן ישירות בהודעת הבקשה.
כדי לקבוע אם שדה של אובייקט בקשה הוא חובה או אופציונלי, אפשר לעיין בהגדרות ה-protobuf לשירותים ולחפש שדות שמכילים את ההערה [(google.api.field_behavior) =
REQUIRED].
[[["התוכן קל להבנה","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"]],["עדכון אחרון: 2025-03-29 (שעון UTC)."],[[["When using optional fields in Google Ads API requests, construct the request message separately and pass it as a single parameter to the method."],["Optional request headers like `validate_only` are set directly on the request message, not as keyword parameters in the method signature."],["You can identify required or optional request fields by checking the protobuf definitions and looking for the `[(google.api.field_behavior) = REQUIRED]` annotation."],["To use optional fields, create an instance of the request message type, populate its fields including the optional ones, and then pass it to the API method."]]],[]]