google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
241 lines (240 loc) • 10.2 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 { Distribution_Exemplar } from "../../distribution";
/**
* Distribution represents a frequency distribution of double-valued sample
* points. It contains the size of the population of sample points plus
* additional optional information:
*
* * the arithmetic mean of the samples
* * the minimum and maximum of the samples
* * the sum-squared-deviation of the samples, used to compute variance
* * a histogram of the values of the sample points
*
* @generated from protobuf message google.api.servicecontrol.v1.Distribution
*/
export interface Distribution {
/**
* The total number of samples in the distribution. Must be >= 0.
*
* @generated from protobuf field: int64 count = 1;
*/
count: bigint;
/**
* The arithmetic mean of the samples in the distribution. If `count` is
* zero then this field must be zero.
*
* @generated from protobuf field: double mean = 2;
*/
mean: number;
/**
* The minimum of the population of values. Ignored if `count` is zero.
*
* @generated from protobuf field: double minimum = 3;
*/
minimum: number;
/**
* The maximum of the population of values. Ignored if `count` is zero.
*
* @generated from protobuf field: double maximum = 4;
*/
maximum: number;
/**
* The sum of squared deviations from the mean:
* Sum[i=1..count]((x_i - mean)^2)
* where each x_i is a sample values. If `count` is zero then this field
* must be zero, otherwise validation of the request fails.
*
* @generated from protobuf field: double sum_of_squared_deviation = 5;
*/
sumOfSquaredDeviation: number;
/**
* The number of samples in each histogram bucket. `bucket_counts` are
* optional. If present, they must sum to the `count` value.
*
* The buckets are defined below in `bucket_option`. There are N buckets.
* `bucket_counts[0]` is the number of samples in the underflow bucket.
* `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples
* in each of the finite buckets. And `bucket_counts[N] is the number
* of samples in the overflow bucket. See the comments of `bucket_option`
* below for more details.
*
* Any suffix of trailing zeros may be omitted.
*
* @generated from protobuf field: repeated int64 bucket_counts = 6;
*/
bucketCounts: bigint[];
/**
* @generated from protobuf oneof: bucket_option
*/
bucketOption: {
oneofKind: "linearBuckets";
/**
* Buckets with constant width.
*
* @generated from protobuf field: google.api.servicecontrol.v1.Distribution.LinearBuckets linear_buckets = 7;
*/
linearBuckets: Distribution_LinearBuckets;
} | {
oneofKind: "exponentialBuckets";
/**
* Buckets with exponentially growing width.
*
* @generated from protobuf field: google.api.servicecontrol.v1.Distribution.ExponentialBuckets exponential_buckets = 8;
*/
exponentialBuckets: Distribution_ExponentialBuckets;
} | {
oneofKind: "explicitBuckets";
/**
* Buckets with arbitrary user-provided width.
*
* @generated from protobuf field: google.api.servicecontrol.v1.Distribution.ExplicitBuckets explicit_buckets = 9;
*/
explicitBuckets: Distribution_ExplicitBuckets;
} | {
oneofKind: undefined;
};
/**
* Example points. Must be in increasing order of `value` field.
*
* @generated from protobuf field: repeated google.api.Distribution.Exemplar exemplars = 10;
*/
exemplars: Distribution_Exemplar[];
}
/**
* Describing buckets with constant width.
*
* @generated from protobuf message google.api.servicecontrol.v1.Distribution.LinearBuckets
*/
export interface Distribution_LinearBuckets {
/**
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
* @generated from protobuf field: int32 num_finite_buckets = 1;
*/
numFiniteBuckets: number;
/**
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
* Must be strictly positive.
*
* @generated from protobuf field: double width = 2;
*/
width: number;
/**
* The i'th linear bucket covers the interval
* [offset + (i-1) * width, offset + i * width)
* where i ranges from 1 to num_finite_buckets, inclusive.
*
* @generated from protobuf field: double offset = 3;
*/
offset: number;
}
/**
* Describing buckets with exponentially growing width.
*
* @generated from protobuf message google.api.servicecontrol.v1.Distribution.ExponentialBuckets
*/
export interface Distribution_ExponentialBuckets {
/**
* The number of finite buckets. With the underflow and overflow buckets,
* the total number of buckets is `num_finite_buckets` + 2.
* See comments on `bucket_options` for details.
*
* @generated from protobuf field: int32 num_finite_buckets = 1;
*/
numFiniteBuckets: number;
/**
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be larger than 1.0.
*
* @generated from protobuf field: double growth_factor = 2;
*/
growthFactor: number;
/**
* The i'th exponential bucket covers the interval
* [scale * growth_factor^(i-1), scale * growth_factor^i)
* where i ranges from 1 to num_finite_buckets inclusive.
* Must be > 0.
*
* @generated from protobuf field: double scale = 3;
*/
scale: number;
}
/**
* Describing buckets with arbitrary user-provided width.
*
* @generated from protobuf message google.api.servicecontrol.v1.Distribution.ExplicitBuckets
*/
export interface Distribution_ExplicitBuckets {
/**
* 'bound' is a list of strictly increasing boundaries between
* buckets. Note that a list of length N-1 defines N buckets because
* of fenceposting. See comments on `bucket_options` for details.
*
* The i'th finite bucket covers the interval
* [bound[i-1], bound[i])
* where i ranges from 1 to bound_size() - 1. Note that there are no
* finite buckets at all if 'bound' only contains a single element; in
* that special case the single bound defines the boundary between the
* underflow and overflow buckets.
*
* bucket number lower bound upper bound
* i == 0 (underflow) -inf bound[i]
* 0 < i < bound_size() bound[i-1] bound[i]
* i == bound_size() (overflow) bound[i-1] +inf
*
* @generated from protobuf field: repeated double bounds = 1;
*/
bounds: number[];
}
declare class Distribution$Type extends MessageType<Distribution> {
constructor();
create(value?: PartialMessage<Distribution>): Distribution;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Distribution): Distribution;
internalBinaryWrite(message: Distribution, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.servicecontrol.v1.Distribution
*/
export declare const Distribution: Distribution$Type;
declare class Distribution_LinearBuckets$Type extends MessageType<Distribution_LinearBuckets> {
constructor();
create(value?: PartialMessage<Distribution_LinearBuckets>): Distribution_LinearBuckets;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Distribution_LinearBuckets): Distribution_LinearBuckets;
internalBinaryWrite(message: Distribution_LinearBuckets, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.servicecontrol.v1.Distribution.LinearBuckets
*/
export declare const Distribution_LinearBuckets: Distribution_LinearBuckets$Type;
declare class Distribution_ExponentialBuckets$Type extends MessageType<Distribution_ExponentialBuckets> {
constructor();
create(value?: PartialMessage<Distribution_ExponentialBuckets>): Distribution_ExponentialBuckets;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Distribution_ExponentialBuckets): Distribution_ExponentialBuckets;
internalBinaryWrite(message: Distribution_ExponentialBuckets, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.servicecontrol.v1.Distribution.ExponentialBuckets
*/
export declare const Distribution_ExponentialBuckets: Distribution_ExponentialBuckets$Type;
declare class Distribution_ExplicitBuckets$Type extends MessageType<Distribution_ExplicitBuckets> {
constructor();
create(value?: PartialMessage<Distribution_ExplicitBuckets>): Distribution_ExplicitBuckets;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Distribution_ExplicitBuckets): Distribution_ExplicitBuckets;
internalBinaryWrite(message: Distribution_ExplicitBuckets, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message google.api.servicecontrol.v1.Distribution.ExplicitBuckets
*/
export declare const Distribution_ExplicitBuckets: Distribution_ExplicitBuckets$Type;
export {};