google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
105 lines • 6.56 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DynamicSearchAdsSearchTermView = void 0;
const runtime_1 = require("@protobuf-ts/runtime");
const runtime_2 = require("@protobuf-ts/runtime");
const runtime_3 = require("@protobuf-ts/runtime");
const runtime_4 = require("@protobuf-ts/runtime");
const runtime_5 = require("@protobuf-ts/runtime");
// @generated message type with reflection information, may provide speed optimized methods
class DynamicSearchAdsSearchTermView$Type extends runtime_5.MessageType {
constructor() {
super("google.ads.googleads.v11.resources.DynamicSearchAdsSearchTermView", [
{ no: 1, name: "resource_name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "google.api.field_behavior": ["OUTPUT_ONLY"], "google.api.resource_reference": { type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView" } } },
{ no: 9, name: "search_term", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "google.api.field_behavior": ["OUTPUT_ONLY"] } },
{ no: 10, name: "headline", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "google.api.field_behavior": ["OUTPUT_ONLY"] } },
{ no: 11, name: "landing_page", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "google.api.field_behavior": ["OUTPUT_ONLY"] } },
{ no: 12, name: "page_url", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "google.api.field_behavior": ["OUTPUT_ONLY"] } },
{ no: 13, name: "has_negative_keyword", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/, options: { "google.api.field_behavior": ["OUTPUT_ONLY"] } },
{ no: 14, name: "has_matching_keyword", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/, options: { "google.api.field_behavior": ["OUTPUT_ONLY"] } },
{ no: 15, name: "has_negative_url", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/, options: { "google.api.field_behavior": ["OUTPUT_ONLY"] } }
], { "google.api.resource": { type: "googleads.googleapis.com/DynamicSearchAdsSearchTermView", pattern: ["customers/{customer_id}/dynamicSearchAdsSearchTermViews/{ad_group_id}~{search_term_fingerprint}~{headline_fingerprint}~{landing_page_fingerprint}~{page_url_fingerprint}"] } });
}
create(value) {
const message = { resourceName: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string resource_name */ 1:
message.resourceName = reader.string();
break;
case /* optional string search_term */ 9:
message.searchTerm = reader.string();
break;
case /* optional string headline */ 10:
message.headline = reader.string();
break;
case /* optional string landing_page */ 11:
message.landingPage = reader.string();
break;
case /* optional string page_url */ 12:
message.pageUrl = reader.string();
break;
case /* optional bool has_negative_keyword */ 13:
message.hasNegativeKeyword = reader.bool();
break;
case /* optional bool has_matching_keyword */ 14:
message.hasMatchingKeyword = reader.bool();
break;
case /* optional bool has_negative_url */ 15:
message.hasNegativeUrl = reader.bool();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* string resource_name = 1; */
if (message.resourceName !== "")
writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.resourceName);
/* optional string search_term = 9; */
if (message.searchTerm !== undefined)
writer.tag(9, runtime_1.WireType.LengthDelimited).string(message.searchTerm);
/* optional string headline = 10; */
if (message.headline !== undefined)
writer.tag(10, runtime_1.WireType.LengthDelimited).string(message.headline);
/* optional string landing_page = 11; */
if (message.landingPage !== undefined)
writer.tag(11, runtime_1.WireType.LengthDelimited).string(message.landingPage);
/* optional string page_url = 12; */
if (message.pageUrl !== undefined)
writer.tag(12, runtime_1.WireType.LengthDelimited).string(message.pageUrl);
/* optional bool has_negative_keyword = 13; */
if (message.hasNegativeKeyword !== undefined)
writer.tag(13, runtime_1.WireType.Varint).bool(message.hasNegativeKeyword);
/* optional bool has_matching_keyword = 14; */
if (message.hasMatchingKeyword !== undefined)
writer.tag(14, runtime_1.WireType.Varint).bool(message.hasMatchingKeyword);
/* optional bool has_negative_url = 15; */
if (message.hasNegativeUrl !== undefined)
writer.tag(15, runtime_1.WireType.Varint).bool(message.hasNegativeUrl);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.resources.DynamicSearchAdsSearchTermView
*/
exports.DynamicSearchAdsSearchTermView = new DynamicSearchAdsSearchTermView$Type();
//# sourceMappingURL=dynamic_search_ads_search_term_view.js.map