bookmark_borderbookmark
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bir istek yönteminde isteğe bağlı alanlar kullanıldığında istek mesajı, yöntemin dışında oluşturulmalı ve tek bir parametre olarak iletilmelidir.
İsteğe bağlı istek başlıkları (ör. GoogleAdsService.Search yöntemindeki validate_only başlığı), anahtar kelime parametreleri olarak yöntem imzasında bulunmaz. Bu nedenle, doğrudan istek mesajında ayarlanmaları gerekir.
Bir istek nesnesi alanının zorunlu mu yoksa isteğe bağlı mı olduğunu belirlemek için hizmetler için protobuf tanımlarına bakabilir ve [(google.api.field_behavior) =
REQUIRED] ek açıklamasını içeren alanları arayabilirsiniz.
Aşağıda, GoogleAdsService.Search isteğinde isteğe bağlı validate_only alanını ayarlayan bir örnek verilmiştir:
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 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."]]],[]]