google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
376 lines (375 loc) • 15.3 kB
TypeScript
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 { AccountBudgetProposalTypeEnum_AccountBudgetProposalType } from "../enums/account_budget_proposal_type";
import { SpendingLimitTypeEnum_SpendingLimitType } from "../enums/spending_limit_type";
import { TimeTypeEnum_TimeType } from "../enums/time_type";
import { AccountBudgetStatusEnum_AccountBudgetStatus } from "../enums/account_budget_status";
/**
* An account-level budget. It contains information about the budget itself,
* as well as the most recently approved changes to the budget and proposed
* changes that are pending approval. The proposed changes that are pending
* approval, if any, are found in 'pending_proposal'. Effective details about
* the budget are found in fields prefixed 'approved_', 'adjusted_' and those
* without a prefix. Since some effective details may differ from what the user
* had originally requested (for example, spending limit), these differences are
* juxtaposed through 'proposed_', 'approved_', and possibly 'adjusted_' fields.
*
* This resource is mutated using AccountBudgetProposal and cannot be mutated
* directly. A budget may have at most one pending proposal at any given time.
* It is read through pending_proposal.
*
* Once approved, a budget may be subject to adjustments, such as credit
* adjustments. Adjustments create differences between the 'approved' and
* 'adjusted' fields, which would otherwise be identical.
*
* @generated from protobuf message google.ads.googleads.v11.resources.AccountBudget
*/
export interface AccountBudget {
/**
* Output only. The resource name of the account-level budget.
* AccountBudget resource names have the form:
*
* `customers/{customer_id}/accountBudgets/{account_budget_id}`
*
* @generated from protobuf field: string resource_name = 1;
*/
resourceName: string;
/**
* Output only. The ID of the account-level budget.
*
* @generated from protobuf field: optional int64 id = 23;
*/
id?: bigint;
/**
* Output only. The resource name of the billing setup associated with this account-level
* budget. BillingSetup resource names have the form:
*
* `customers/{customer_id}/billingSetups/{billing_setup_id}`
*
* @generated from protobuf field: optional string billing_setup = 24;
*/
billingSetup?: string;
/**
* Output only. The status of this account-level budget.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.AccountBudgetStatusEnum.AccountBudgetStatus status = 4;
*/
status: AccountBudgetStatusEnum_AccountBudgetStatus;
/**
* Output only. The name of the account-level budget.
*
* @generated from protobuf field: optional string name = 25;
*/
name?: string;
/**
* Output only. The proposed start time of the account-level budget in
* yyyy-MM-dd HH:mm:ss format. If a start time type of NOW was proposed,
* this is the time of request.
*
* @generated from protobuf field: optional string proposed_start_date_time = 26;
*/
proposedStartDateTime?: string;
/**
* Output only. The approved start time of the account-level budget in yyyy-MM-dd HH:mm:ss
* format.
*
* For example, if a new budget is approved after the proposed start time,
* the approved start time is the time of approval.
*
* @generated from protobuf field: optional string approved_start_date_time = 27;
*/
approvedStartDateTime?: string;
/**
* Output only. The total adjustments amount.
*
* An example of an adjustment is courtesy credits.
*
* @generated from protobuf field: int64 total_adjustments_micros = 33;
*/
totalAdjustmentsMicros: bigint;
/**
* Output only. The value of Ads that have been served, in micros.
*
* This includes overdelivery costs, in which case a credit might be
* automatically applied to the budget (see total_adjustments_micros).
*
* @generated from protobuf field: int64 amount_served_micros = 34;
*/
amountServedMicros: bigint;
/**
* Output only. A purchase order number is a value that helps users reference this budget
* in their monthly invoices.
*
* @generated from protobuf field: optional string purchase_order_number = 35;
*/
purchaseOrderNumber?: string;
/**
* Output only. Notes associated with the budget.
*
* @generated from protobuf field: optional string notes = 36;
*/
notes?: string;
/**
* Output only. The pending proposal to modify this budget, if applicable.
*
* @generated from protobuf field: google.ads.googleads.v11.resources.AccountBudget.PendingAccountBudgetProposal pending_proposal = 22;
*/
pendingProposal?: AccountBudget_PendingAccountBudgetProposal;
/**
* @generated from protobuf oneof: proposed_end_time
*/
proposedEndTime: {
oneofKind: "proposedEndDateTime";
/**
* Output only. The proposed end time in yyyy-MM-dd HH:mm:ss format.
*
* @generated from protobuf field: string proposed_end_date_time = 28;
*/
proposedEndDateTime: string;
} | {
oneofKind: "proposedEndTimeType";
/**
* Output only. The proposed end time as a well-defined type, for example, FOREVER.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9;
*/
proposedEndTimeType: TimeTypeEnum_TimeType;
} | {
oneofKind: undefined;
};
/**
* @generated from protobuf oneof: approved_end_time
*/
approvedEndTime: {
oneofKind: "approvedEndDateTime";
/**
* Output only. The approved end time in yyyy-MM-dd HH:mm:ss format.
*
* @generated from protobuf field: string approved_end_date_time = 29;
*/
approvedEndDateTime: string;
} | {
oneofKind: "approvedEndTimeType";
/**
* Output only. The approved end time as a well-defined type, for example, FOREVER.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.TimeTypeEnum.TimeType approved_end_time_type = 11;
*/
approvedEndTimeType: TimeTypeEnum_TimeType;
} | {
oneofKind: undefined;
};
/**
* @generated from protobuf oneof: proposed_spending_limit
*/
proposedSpendingLimit: {
oneofKind: "proposedSpendingLimitMicros";
/**
* Output only. The proposed spending limit in micros. One million is equivalent to
* one unit.
*
* @generated from protobuf field: int64 proposed_spending_limit_micros = 30;
*/
proposedSpendingLimitMicros: bigint;
} | {
oneofKind: "proposedSpendingLimitType";
/**
* Output only. The proposed spending limit as a well-defined type, for example,
* INFINITE.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 13;
*/
proposedSpendingLimitType: SpendingLimitTypeEnum_SpendingLimitType;
} | {
oneofKind: undefined;
};
/**
* @generated from protobuf oneof: approved_spending_limit
*/
approvedSpendingLimit: {
oneofKind: "approvedSpendingLimitMicros";
/**
* Output only. The approved spending limit in micros. One million is equivalent to
* one unit. This will only be populated if the proposed spending limit
* is finite, and will always be greater than or equal to the
* proposed spending limit.
*
* @generated from protobuf field: int64 approved_spending_limit_micros = 31;
*/
approvedSpendingLimitMicros: bigint;
} | {
oneofKind: "approvedSpendingLimitType";
/**
* Output only. The approved spending limit as a well-defined type, for example,
* INFINITE. This will only be populated if the approved spending limit is
* INFINITE.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 15;
*/
approvedSpendingLimitType: SpendingLimitTypeEnum_SpendingLimitType;
} | {
oneofKind: undefined;
};
/**
* @generated from protobuf oneof: adjusted_spending_limit
*/
adjustedSpendingLimit: {
oneofKind: "adjustedSpendingLimitMicros";
/**
* Output only. The adjusted spending limit in micros. One million is equivalent to
* one unit.
*
* If the approved spending limit is finite, the adjusted
* spending limit may vary depending on the types of adjustments applied
* to this budget, if applicable.
*
* The different kinds of adjustments are described here:
* https://support.google.com/google-ads/answer/1704323
*
* For example, a debit adjustment reduces how much the account is
* allowed to spend.
*
* @generated from protobuf field: int64 adjusted_spending_limit_micros = 32;
*/
adjustedSpendingLimitMicros: bigint;
} | {
oneofKind: "adjustedSpendingLimitType";
/**
* Output only. The adjusted spending limit as a well-defined type, for example,
* INFINITE. This will only be populated if the adjusted spending limit is
* INFINITE, which is guaranteed to be true if the approved spending limit
* is INFINITE.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.SpendingLimitTypeEnum.SpendingLimitType adjusted_spending_limit_type = 17;
*/
adjustedSpendingLimitType: SpendingLimitTypeEnum_SpendingLimitType;
} | {
oneofKind: undefined;
};
}
/**
* A pending proposal associated with the enclosing account-level budget,
* if applicable.
*
* @generated from protobuf message google.ads.googleads.v11.resources.AccountBudget.PendingAccountBudgetProposal
*/
export interface AccountBudget_PendingAccountBudgetProposal {
/**
* Output only. The resource name of the proposal.
* AccountBudgetProposal resource names have the form:
*
* `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
*
* @generated from protobuf field: optional string account_budget_proposal = 12;
*/
accountBudgetProposal?: string;
/**
* Output only. The type of this proposal, for example, END to end the budget associated
* with this proposal.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2;
*/
proposalType: AccountBudgetProposalTypeEnum_AccountBudgetProposalType;
/**
* Output only. The name to assign to the account-level budget.
*
* @generated from protobuf field: optional string name = 13;
*/
name?: string;
/**
* Output only. The start time in yyyy-MM-dd HH:mm:ss format.
*
* @generated from protobuf field: optional string start_date_time = 14;
*/
startDateTime?: string;
/**
* Output only. A purchase order number is a value that helps users reference this budget
* in their monthly invoices.
*
* @generated from protobuf field: optional string purchase_order_number = 17;
*/
purchaseOrderNumber?: string;
/**
* Output only. Notes associated with this budget.
*
* @generated from protobuf field: optional string notes = 18;
*/
notes?: string;
/**
* Output only. The time when this account-level budget proposal was created.
* Formatted as yyyy-MM-dd HH:mm:ss.
*
* @generated from protobuf field: optional string creation_date_time = 19;
*/
creationDateTime?: string;
/**
* @generated from protobuf oneof: end_time
*/
endTime: {
oneofKind: "endDateTime";
/**
* Output only. The end time in yyyy-MM-dd HH:mm:ss format.
*
* @generated from protobuf field: string end_date_time = 15;
*/
endDateTime: string;
} | {
oneofKind: "endTimeType";
/**
* Output only. The end time as a well-defined type, for example, FOREVER.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.TimeTypeEnum.TimeType end_time_type = 6;
*/
endTimeType: TimeTypeEnum_TimeType;
} | {
oneofKind: undefined;
};
/**
* @generated from protobuf oneof: spending_limit
*/
spendingLimit: {
oneofKind: "spendingLimitMicros";
/**
* Output only. The spending limit in micros. One million is equivalent to
* one unit.
*
* @generated from protobuf field: int64 spending_limit_micros = 16;
*/
spendingLimitMicros: bigint;
} | {
oneofKind: "spendingLimitType";
/**
* Output only. The spending limit as a well-defined type, for example, INFINITE.
*
* @generated from protobuf field: google.ads.googleads.v11.enums.SpendingLimitTypeEnum.SpendingLimitType spending_limit_type = 8;
*/
spendingLimitType: SpendingLimitTypeEnum_SpendingLimitType;
} | {
oneofKind: undefined;
};
}
declare class AccountBudget$Type extends MessageType<AccountBudget> {
constructor();
create(value?: PartialMessage<AccountBudget>): AccountBudget;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccountBudget): AccountBudget;
internalBinaryWrite(message: AccountBudget, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.resources.AccountBudget
*/
export declare const AccountBudget: AccountBudget$Type;
declare class AccountBudget_PendingAccountBudgetProposal$Type extends MessageType<AccountBudget_PendingAccountBudgetProposal> {
constructor();
create(value?: PartialMessage<AccountBudget_PendingAccountBudgetProposal>): AccountBudget_PendingAccountBudgetProposal;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AccountBudget_PendingAccountBudgetProposal): AccountBudget_PendingAccountBudgetProposal;
internalBinaryWrite(message: AccountBudget_PendingAccountBudgetProposal, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.ads.googleads.v11.resources.AccountBudget.PendingAccountBudgetProposal
*/
export declare const AccountBudget_PendingAccountBudgetProposal: AccountBudget_PendingAccountBudgetProposal$Type;
export {};