google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
173 lines (172 loc) • 8.53 kB
TypeScript
import { ServiceType } from "@protobuf-ts/runtime-rpc";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { Status } from "../../google/rpc/status";
import { CustomerNegativeCriterion } from "../resources/customer_negative_criterion";
import { ResponseContentTypeEnum_ResponseContentType } from "../enums/response_content_type";
/**
* Request message for
* [CustomerNegativeCriterionService.MutateCustomerNegativeCriteria][google.ads.googleads.v11.services.CustomerNegativeCriterionService.MutateCustomerNegativeCriteria].
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCustomerNegativeCriteriaRequest
*/
export interface MutateCustomerNegativeCriteriaRequest {
/**
* Required. The ID of the customer whose criteria are being modified.
*
* @generated from protobuf field: string customer_id = 1;
*/
customerId: string;
/**
* Required. The list of operations to perform on individual criteria.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.services.CustomerNegativeCriterionOperation operations = 2;
*/
operations: CustomerNegativeCriterionOperation[];
/**
* If true, successful operations will be carried out and invalid
* operations will return errors. If false, all operations will be carried
* out in one transaction if and only if they are all valid.
* Default is false.
*
* @generated from protobuf field: bool partial_failure = 3;
*/
partialFailure: boolean;
/**
* If true, the request is validated but not executed. Only errors are
* returned, not results.
*
* @generated from protobuf field: bool validate_only = 4;
*/
validateOnly: boolean;
/**
* The response content type setting. Determines whether the mutable resource
* or just the resource name should be returned post mutation.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.ResponseContentTypeEnum.ResponseContentType response_content_type = 5;
*/
responseContentType: ResponseContentTypeEnum_ResponseContentType;
}
/**
* A single operation (create or remove) on a customer level negative criterion.
*
* @generated from protobuf message google.ads.googleads.v11.services.CustomerNegativeCriterionOperation
*/
export interface CustomerNegativeCriterionOperation {
/**
* @generated from protobuf oneof: operation
*/
operation: {
oneofKind: "create";
/**
* Create operation: No resource name is expected for the new criterion.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.CustomerNegativeCriterion create = 1;
*/
create: CustomerNegativeCriterion;
} | {
oneofKind: "remove";
/**
* Remove operation: A resource name for the removed criterion is expected,
* in this format:
*
* `customers/{customer_id}/customerNegativeCriteria/{criterion_id}`
*
* @generated from protobuf field: string remove = 2;
*/
remove: string;
} | {
oneofKind: undefined;
};
}
/**
* Response message for customer negative criterion mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCustomerNegativeCriteriaResponse
*/
export interface MutateCustomerNegativeCriteriaResponse {
/**
* Errors that pertain to operation failures in the partial failure mode.
* Returned only when partial_failure = true and all errors occur inside the
* operations. If any errors occur outside the operations (for example, auth
* errors), we return an RPC level error.
*
* @generated from protobuf field: google.rpc.Status partial_failure_error = 3;
*/
partialFailureError?: Status;
/**
* All results for the mutate.
*
* @generated from protobuf field: repeated google.ads.googleads.v11.services.MutateCustomerNegativeCriteriaResult results = 2;
*/
results: MutateCustomerNegativeCriteriaResult[];
}
/**
* The result for the criterion mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCustomerNegativeCriteriaResult
*/
export interface MutateCustomerNegativeCriteriaResult {
/**
* Returned for successful operations.
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
/**
* The mutated criterion with only mutable fields after mutate. The field will
* only be returned when response_content_type is set to "MUTABLE_RESOURCE".
*
* @generated from protobuf field: google.ads.googleads.v11.resources.CustomerNegativeCriterion customer_negative_criterion = 2;
*/
customerNegativeCriterion?: CustomerNegativeCriterion;
}
declare class MutateCustomerNegativeCriteriaRequest$Type extends MessageType<MutateCustomerNegativeCriteriaRequest> {
constructor();
create(value?: PartialMessage<MutateCustomerNegativeCriteriaRequest>): MutateCustomerNegativeCriteriaRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCustomerNegativeCriteriaRequest): MutateCustomerNegativeCriteriaRequest;
internalBinaryWrite(message: MutateCustomerNegativeCriteriaRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCustomerNegativeCriteriaRequest
*/
export declare const MutateCustomerNegativeCriteriaRequest: MutateCustomerNegativeCriteriaRequest$Type;
declare class CustomerNegativeCriterionOperation$Type extends MessageType<CustomerNegativeCriterionOperation> {
constructor();
create(value?: PartialMessage<CustomerNegativeCriterionOperation>): CustomerNegativeCriterionOperation;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CustomerNegativeCriterionOperation): CustomerNegativeCriterionOperation;
internalBinaryWrite(message: CustomerNegativeCriterionOperation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.CustomerNegativeCriterionOperation
*/
export declare const CustomerNegativeCriterionOperation: CustomerNegativeCriterionOperation$Type;
declare class MutateCustomerNegativeCriteriaResponse$Type extends MessageType<MutateCustomerNegativeCriteriaResponse> {
constructor();
create(value?: PartialMessage<MutateCustomerNegativeCriteriaResponse>): MutateCustomerNegativeCriteriaResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCustomerNegativeCriteriaResponse): MutateCustomerNegativeCriteriaResponse;
internalBinaryWrite(message: MutateCustomerNegativeCriteriaResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCustomerNegativeCriteriaResponse
*/
export declare const MutateCustomerNegativeCriteriaResponse: MutateCustomerNegativeCriteriaResponse$Type;
declare class MutateCustomerNegativeCriteriaResult$Type extends MessageType<MutateCustomerNegativeCriteriaResult> {
constructor();
create(value?: PartialMessage<MutateCustomerNegativeCriteriaResult>): MutateCustomerNegativeCriteriaResult;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCustomerNegativeCriteriaResult): MutateCustomerNegativeCriteriaResult;
internalBinaryWrite(message: MutateCustomerNegativeCriteriaResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCustomerNegativeCriteriaResult
*/
export declare const MutateCustomerNegativeCriteriaResult: MutateCustomerNegativeCriteriaResult$Type;
/**
* @generated ServiceType for protobuf service google.ads.googleads.v11.services.CustomerNegativeCriterionService
*/
export declare const CustomerNegativeCriterionService: ServiceType;
export {};