google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
265 lines (264 loc) • 12.2 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 { FieldMask } from "../../google/protobuf/field_mask";
import { AccessRoleEnum_AccessRole } from "../enums/access_role";
import { Customer } from "../resources/customer";
import { ResponseContentTypeEnum_ResponseContentType } from "../enums/response_content_type";
/**
* Request message for [CustomerService.MutateCustomer][google.ads.googleads.v11.services.CustomerService.MutateCustomer].
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCustomerRequest
*/
export interface MutateCustomerRequest {
/**
* Required. The ID of the customer being modified.
*
* @generated from protobuf field: string customer_id = 1;
*/
customerId: string;
/**
* Required. The operation to perform on the customer
*
* @generated from protobuf field: google.ads.googleads.v11.services.CustomerOperation operation = 4;
*/
operation?: CustomerOperation;
/**
* If true, the request is validated but not executed. Only errors are
* returned, not results.
*
* @generated from protobuf field: bool validate_only = 5;
*/
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 = 6;
*/
responseContentType: ResponseContentTypeEnum_ResponseContentType;
}
/**
* Request message for [CustomerService.CreateCustomerClient][google.ads.googleads.v11.services.CustomerService.CreateCustomerClient].
*
* @generated from protobuf message google.ads.googleads.v11.services.CreateCustomerClientRequest
*/
export interface CreateCustomerClientRequest {
/**
* Required. The ID of the Manager under whom client customer is being created.
*
* @generated from protobuf field: string customer_id = 1;
*/
customerId: string;
/**
* Required. The new client customer to create. The resource name on this customer
* will be ignored.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.Customer customer_client = 2;
*/
customerClient?: Customer;
/**
* Email address of the user who should be invited on the created client
* customer. Accessible only to customers on the allow-list.
*
* @generated from protobuf field: optional string email_address = 5;
*/
emailAddress?: string;
/**
* The proposed role of user on the created client customer.
* Accessible only to customers on the allow-list.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.AccessRoleEnum.AccessRole access_role = 4;
*/
accessRole: AccessRoleEnum_AccessRole;
/**
* If true, the request is validated but not executed. Only errors are
* returned, not results.
*
* @generated from protobuf field: bool validate_only = 6;
*/
validateOnly: boolean;
}
/**
* A single update on a customer.
*
* @generated from protobuf message google.ads.googleads.v11.services.CustomerOperation
*/
export interface CustomerOperation {
/**
* Mutate operation. Only updates are supported for customer.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.Customer update = 1;
*/
update?: Customer;
/**
* FieldMask that determines which resource fields are modified in an update.
*
* @generated from protobuf field: google.protobuf.FieldMask update_mask = 2;
*/
updateMask?: FieldMask;
}
/**
* Response message for CreateCustomerClient mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.CreateCustomerClientResponse
*/
export interface CreateCustomerClientResponse {
/**
* The resource name of the newly created customer. Customer resource names
* have the form: `customers/{customer_id}`.
*
* @generated from protobuf field: string resource_name = 2;
*/
resourceName: string;
/**
* Link for inviting user to access the created customer. Accessible to
* allowlisted customers only.
*
* @generated from protobuf field: string invitation_link = 3;
*/
invitationLink: string;
}
/**
* Response message for customer mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCustomerResponse
*/
export interface MutateCustomerResponse {
/**
* Result for the mutate.
*
* @generated from protobuf field: google.ads.googleads.v11.services.MutateCustomerResult result = 2;
*/
result?: MutateCustomerResult;
}
/**
* The result for the customer mutate.
*
* @generated from protobuf message google.ads.googleads.v11.services.MutateCustomerResult
*/
export interface MutateCustomerResult {
/**
* Returned for successful operations.
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
/**
* The mutated customer with only mutable fields after mutate. The fields will
* only be returned when response_content_type is set to "MUTABLE_RESOURCE".
*
* @generated from protobuf field: google.ads.googleads.v11.resources.Customer customer = 2;
*/
customer?: Customer;
}
/**
* Request message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v11.services.CustomerService.ListAccessibleCustomers].
*
* @generated from protobuf message google.ads.googleads.v11.services.ListAccessibleCustomersRequest
*/
export interface ListAccessibleCustomersRequest {
}
/**
* Response message for [CustomerService.ListAccessibleCustomers][google.ads.googleads.v11.services.CustomerService.ListAccessibleCustomers].
*
* @generated from protobuf message google.ads.googleads.v11.services.ListAccessibleCustomersResponse
*/
export interface ListAccessibleCustomersResponse {
/**
* Resource name of customers directly accessible by the
* user authenticating the call.
*
* @generated from protobuf field: repeated string resource_names = 1;
*/
resourceNames: string[];
}
declare class MutateCustomerRequest$Type extends MessageType<MutateCustomerRequest> {
constructor();
create(value?: PartialMessage<MutateCustomerRequest>): MutateCustomerRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCustomerRequest): MutateCustomerRequest;
internalBinaryWrite(message: MutateCustomerRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCustomerRequest
*/
export declare const MutateCustomerRequest: MutateCustomerRequest$Type;
declare class CreateCustomerClientRequest$Type extends MessageType<CreateCustomerClientRequest> {
constructor();
create(value?: PartialMessage<CreateCustomerClientRequest>): CreateCustomerClientRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateCustomerClientRequest): CreateCustomerClientRequest;
internalBinaryWrite(message: CreateCustomerClientRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.CreateCustomerClientRequest
*/
export declare const CreateCustomerClientRequest: CreateCustomerClientRequest$Type;
declare class CustomerOperation$Type extends MessageType<CustomerOperation> {
constructor();
create(value?: PartialMessage<CustomerOperation>): CustomerOperation;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CustomerOperation): CustomerOperation;
internalBinaryWrite(message: CustomerOperation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.CustomerOperation
*/
export declare const CustomerOperation: CustomerOperation$Type;
declare class CreateCustomerClientResponse$Type extends MessageType<CreateCustomerClientResponse> {
constructor();
create(value?: PartialMessage<CreateCustomerClientResponse>): CreateCustomerClientResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateCustomerClientResponse): CreateCustomerClientResponse;
internalBinaryWrite(message: CreateCustomerClientResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.CreateCustomerClientResponse
*/
export declare const CreateCustomerClientResponse: CreateCustomerClientResponse$Type;
declare class MutateCustomerResponse$Type extends MessageType<MutateCustomerResponse> {
constructor();
create(value?: PartialMessage<MutateCustomerResponse>): MutateCustomerResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCustomerResponse): MutateCustomerResponse;
internalBinaryWrite(message: MutateCustomerResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCustomerResponse
*/
export declare const MutateCustomerResponse: MutateCustomerResponse$Type;
declare class MutateCustomerResult$Type extends MessageType<MutateCustomerResult> {
constructor();
create(value?: PartialMessage<MutateCustomerResult>): MutateCustomerResult;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MutateCustomerResult): MutateCustomerResult;
internalBinaryWrite(message: MutateCustomerResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.MutateCustomerResult
*/
export declare const MutateCustomerResult: MutateCustomerResult$Type;
declare class ListAccessibleCustomersRequest$Type extends MessageType<ListAccessibleCustomersRequest> {
constructor();
create(value?: PartialMessage<ListAccessibleCustomersRequest>): ListAccessibleCustomersRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAccessibleCustomersRequest): ListAccessibleCustomersRequest;
internalBinaryWrite(message: ListAccessibleCustomersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.ListAccessibleCustomersRequest
*/
export declare const ListAccessibleCustomersRequest: ListAccessibleCustomersRequest$Type;
declare class ListAccessibleCustomersResponse$Type extends MessageType<ListAccessibleCustomersResponse> {
constructor();
create(value?: PartialMessage<ListAccessibleCustomersResponse>): ListAccessibleCustomersResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAccessibleCustomersResponse): ListAccessibleCustomersResponse;
internalBinaryWrite(message: ListAccessibleCustomersResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.services.ListAccessibleCustomersResponse
*/
export declare const ListAccessibleCustomersResponse: ListAccessibleCustomersResponse$Type;
/**
* @generated ServiceType for protobuf service google.ads.googleads.v11.services.CustomerService
*/
export declare const CustomerService: ServiceType;
export {};