@google-cloud/monitoring
Version:
Stackdriver Monitoring API client for Node.js
939 lines (752 loc) • 1.4 MB
TypeScript
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import type {protobuf as $protobuf} from "google-gax";
import Long = require("long");
/** Namespace google. */
export namespace google {
/** Namespace monitoring. */
namespace monitoring {
/** Namespace v3. */
namespace v3 {
/** Properties of an AlertPolicy. */
interface IAlertPolicy {
/** AlertPolicy name */
name?: (string|null);
/** AlertPolicy displayName */
displayName?: (string|null);
/** AlertPolicy documentation */
documentation?: (google.monitoring.v3.AlertPolicy.IDocumentation|null);
/** AlertPolicy userLabels */
userLabels?: ({ [k: string]: string }|null);
/** AlertPolicy conditions */
conditions?: (google.monitoring.v3.AlertPolicy.ICondition[]|null);
/** AlertPolicy combiner */
combiner?: (google.monitoring.v3.AlertPolicy.ConditionCombinerType|keyof typeof google.monitoring.v3.AlertPolicy.ConditionCombinerType|null);
/** AlertPolicy enabled */
enabled?: (google.protobuf.IBoolValue|null);
/** AlertPolicy validity */
validity?: (google.rpc.IStatus|null);
/** AlertPolicy notificationChannels */
notificationChannels?: (string[]|null);
/** AlertPolicy creationRecord */
creationRecord?: (google.monitoring.v3.IMutationRecord|null);
/** AlertPolicy mutationRecord */
mutationRecord?: (google.monitoring.v3.IMutationRecord|null);
/** AlertPolicy alertStrategy */
alertStrategy?: (google.monitoring.v3.AlertPolicy.IAlertStrategy|null);
/** AlertPolicy severity */
severity?: (google.monitoring.v3.AlertPolicy.Severity|keyof typeof google.monitoring.v3.AlertPolicy.Severity|null);
}
/** Represents an AlertPolicy. */
class AlertPolicy implements IAlertPolicy {
/**
* Constructs a new AlertPolicy.
* @param [properties] Properties to set
*/
constructor(properties?: google.monitoring.v3.IAlertPolicy);
/** AlertPolicy name. */
public name: string;
/** AlertPolicy displayName. */
public displayName: string;
/** AlertPolicy documentation. */
public documentation?: (google.monitoring.v3.AlertPolicy.IDocumentation|null);
/** AlertPolicy userLabels. */
public userLabels: { [k: string]: string };
/** AlertPolicy conditions. */
public conditions: google.monitoring.v3.AlertPolicy.ICondition[];
/** AlertPolicy combiner. */
public combiner: (google.monitoring.v3.AlertPolicy.ConditionCombinerType|keyof typeof google.monitoring.v3.AlertPolicy.ConditionCombinerType);
/** AlertPolicy enabled. */
public enabled?: (google.protobuf.IBoolValue|null);
/** AlertPolicy validity. */
public validity?: (google.rpc.IStatus|null);
/** AlertPolicy notificationChannels. */
public notificationChannels: string[];
/** AlertPolicy creationRecord. */
public creationRecord?: (google.monitoring.v3.IMutationRecord|null);
/** AlertPolicy mutationRecord. */
public mutationRecord?: (google.monitoring.v3.IMutationRecord|null);
/** AlertPolicy alertStrategy. */
public alertStrategy?: (google.monitoring.v3.AlertPolicy.IAlertStrategy|null);
/** AlertPolicy severity. */
public severity: (google.monitoring.v3.AlertPolicy.Severity|keyof typeof google.monitoring.v3.AlertPolicy.Severity);
/**
* Creates a new AlertPolicy instance using the specified properties.
* @param [properties] Properties to set
* @returns AlertPolicy instance
*/
public static create(properties?: google.monitoring.v3.IAlertPolicy): google.monitoring.v3.AlertPolicy;
/**
* Encodes the specified AlertPolicy message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages.
* @param message AlertPolicy message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.monitoring.v3.IAlertPolicy, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified AlertPolicy message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.verify|verify} messages.
* @param message AlertPolicy message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.monitoring.v3.IAlertPolicy, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an AlertPolicy message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns AlertPolicy
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy;
/**
* Decodes an AlertPolicy message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns AlertPolicy
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy;
/**
* Verifies an AlertPolicy message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates an AlertPolicy message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns AlertPolicy
*/
public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy;
/**
* Creates a plain object from an AlertPolicy message. Also converts values to other types if specified.
* @param message AlertPolicy
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.monitoring.v3.AlertPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this AlertPolicy to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for AlertPolicy
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace AlertPolicy {
/** Properties of a Documentation. */
interface IDocumentation {
/** Documentation content */
content?: (string|null);
/** Documentation mimeType */
mimeType?: (string|null);
/** Documentation subject */
subject?: (string|null);
/** Documentation links */
links?: (google.monitoring.v3.AlertPolicy.Documentation.ILink[]|null);
}
/** Represents a Documentation. */
class Documentation implements IDocumentation {
/**
* Constructs a new Documentation.
* @param [properties] Properties to set
*/
constructor(properties?: google.monitoring.v3.AlertPolicy.IDocumentation);
/** Documentation content. */
public content: string;
/** Documentation mimeType. */
public mimeType: string;
/** Documentation subject. */
public subject: string;
/** Documentation links. */
public links: google.monitoring.v3.AlertPolicy.Documentation.ILink[];
/**
* Creates a new Documentation instance using the specified properties.
* @param [properties] Properties to set
* @returns Documentation instance
*/
public static create(properties?: google.monitoring.v3.AlertPolicy.IDocumentation): google.monitoring.v3.AlertPolicy.Documentation;
/**
* Encodes the specified Documentation message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages.
* @param message Documentation message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.monitoring.v3.AlertPolicy.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Documentation message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.verify|verify} messages.
* @param message Documentation message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.IDocumentation, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Documentation message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Documentation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Documentation;
/**
* Decodes a Documentation message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Documentation
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Documentation;
/**
* Verifies a Documentation message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Documentation message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Documentation
*/
public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Documentation;
/**
* Creates a plain object from a Documentation message. Also converts values to other types if specified.
* @param message Documentation
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.monitoring.v3.AlertPolicy.Documentation, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Documentation to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Documentation
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace Documentation {
/** Properties of a Link. */
interface ILink {
/** Link displayName */
displayName?: (string|null);
/** Link url */
url?: (string|null);
}
/** Represents a Link. */
class Link implements ILink {
/**
* Constructs a new Link.
* @param [properties] Properties to set
*/
constructor(properties?: google.monitoring.v3.AlertPolicy.Documentation.ILink);
/** Link displayName. */
public displayName: string;
/** Link url. */
public url: string;
/**
* Creates a new Link instance using the specified properties.
* @param [properties] Properties to set
* @returns Link instance
*/
public static create(properties?: google.monitoring.v3.AlertPolicy.Documentation.ILink): google.monitoring.v3.AlertPolicy.Documentation.Link;
/**
* Encodes the specified Link message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.Link.verify|verify} messages.
* @param message Link message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.monitoring.v3.AlertPolicy.Documentation.ILink, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Link message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Documentation.Link.verify|verify} messages.
* @param message Link message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Documentation.ILink, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Link message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Link
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Documentation.Link;
/**
* Decodes a Link message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Link
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Documentation.Link;
/**
* Verifies a Link message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Link message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Link
*/
public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Documentation.Link;
/**
* Creates a plain object from a Link message. Also converts values to other types if specified.
* @param message Link
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.monitoring.v3.AlertPolicy.Documentation.Link, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Link to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Link
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}
/** Properties of a Condition. */
interface ICondition {
/** Condition name */
name?: (string|null);
/** Condition displayName */
displayName?: (string|null);
/** Condition conditionThreshold */
conditionThreshold?: (google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null);
/** Condition conditionAbsent */
conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null);
/** Condition conditionMatchedLog */
conditionMatchedLog?: (google.monitoring.v3.AlertPolicy.Condition.ILogMatch|null);
/** Condition conditionMonitoringQueryLanguage */
conditionMonitoringQueryLanguage?: (google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition|null);
/** Condition conditionPrometheusQueryLanguage */
conditionPrometheusQueryLanguage?: (google.monitoring.v3.AlertPolicy.Condition.IPrometheusQueryLanguageCondition|null);
/** Condition conditionSql */
conditionSql?: (google.monitoring.v3.AlertPolicy.Condition.ISqlCondition|null);
}
/** Represents a Condition. */
class Condition implements ICondition {
/**
* Constructs a new Condition.
* @param [properties] Properties to set
*/
constructor(properties?: google.monitoring.v3.AlertPolicy.ICondition);
/** Condition name. */
public name: string;
/** Condition displayName. */
public displayName: string;
/** Condition conditionThreshold. */
public conditionThreshold?: (google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold|null);
/** Condition conditionAbsent. */
public conditionAbsent?: (google.monitoring.v3.AlertPolicy.Condition.IMetricAbsence|null);
/** Condition conditionMatchedLog. */
public conditionMatchedLog?: (google.monitoring.v3.AlertPolicy.Condition.ILogMatch|null);
/** Condition conditionMonitoringQueryLanguage. */
public conditionMonitoringQueryLanguage?: (google.monitoring.v3.AlertPolicy.Condition.IMonitoringQueryLanguageCondition|null);
/** Condition conditionPrometheusQueryLanguage. */
public conditionPrometheusQueryLanguage?: (google.monitoring.v3.AlertPolicy.Condition.IPrometheusQueryLanguageCondition|null);
/** Condition conditionSql. */
public conditionSql?: (google.monitoring.v3.AlertPolicy.Condition.ISqlCondition|null);
/** Condition condition. */
public condition?: ("conditionThreshold"|"conditionAbsent"|"conditionMatchedLog"|"conditionMonitoringQueryLanguage"|"conditionPrometheusQueryLanguage"|"conditionSql");
/**
* Creates a new Condition instance using the specified properties.
* @param [properties] Properties to set
* @returns Condition instance
*/
public static create(properties?: google.monitoring.v3.AlertPolicy.ICondition): google.monitoring.v3.AlertPolicy.Condition;
/**
* Encodes the specified Condition message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages.
* @param message Condition message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.monitoring.v3.AlertPolicy.ICondition, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Condition message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.verify|verify} messages.
* @param message Condition message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.ICondition, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Condition message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Condition
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition;
/**
* Decodes a Condition message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Condition
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition;
/**
* Verifies a Condition message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Condition message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Condition
*/
public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition;
/**
* Creates a plain object from a Condition message. Also converts values to other types if specified.
* @param message Condition
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.monitoring.v3.AlertPolicy.Condition, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Condition to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Condition
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace Condition {
/** Properties of a Trigger. */
interface ITrigger {
/** Trigger count */
count?: (number|null);
/** Trigger percent */
percent?: (number|null);
}
/** Represents a Trigger. */
class Trigger implements ITrigger {
/**
* Constructs a new Trigger.
* @param [properties] Properties to set
*/
constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.ITrigger);
/** Trigger count. */
public count?: (number|null);
/** Trigger percent. */
public percent?: (number|null);
/** Trigger type. */
public type?: ("count"|"percent");
/**
* Creates a new Trigger instance using the specified properties.
* @param [properties] Properties to set
* @returns Trigger instance
*/
public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.ITrigger): google.monitoring.v3.AlertPolicy.Condition.Trigger;
/**
* Encodes the specified Trigger message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages.
* @param message Trigger message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.monitoring.v3.AlertPolicy.Condition.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.Trigger.verify|verify} messages.
* @param message Trigger message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Trigger message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Trigger
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.Trigger;
/**
* Decodes a Trigger message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Trigger
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.Trigger;
/**
* Verifies a Trigger message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Trigger message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Trigger
*/
public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.Trigger;
/**
* Creates a plain object from a Trigger message. Also converts values to other types if specified.
* @param message Trigger
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.Trigger, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Trigger to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Trigger
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** EvaluationMissingData enum. */
enum EvaluationMissingData {
EVALUATION_MISSING_DATA_UNSPECIFIED = 0,
EVALUATION_MISSING_DATA_INACTIVE = 1,
EVALUATION_MISSING_DATA_ACTIVE = 2,
EVALUATION_MISSING_DATA_NO_OP = 3
}
/** Properties of a MetricThreshold. */
interface IMetricThreshold {
/** MetricThreshold filter */
filter?: (string|null);
/** MetricThreshold aggregations */
aggregations?: (google.monitoring.v3.IAggregation[]|null);
/** MetricThreshold denominatorFilter */
denominatorFilter?: (string|null);
/** MetricThreshold denominatorAggregations */
denominatorAggregations?: (google.monitoring.v3.IAggregation[]|null);
/** MetricThreshold forecastOptions */
forecastOptions?: (google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.IForecastOptions|null);
/** MetricThreshold comparison */
comparison?: (google.monitoring.v3.ComparisonType|keyof typeof google.monitoring.v3.ComparisonType|null);
/** MetricThreshold thresholdValue */
thresholdValue?: (number|null);
/** MetricThreshold duration */
duration?: (google.protobuf.IDuration|null);
/** MetricThreshold trigger */
trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null);
/** MetricThreshold evaluationMissingData */
evaluationMissingData?: (google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData|keyof typeof google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData|null);
}
/** Represents a MetricThreshold. */
class MetricThreshold implements IMetricThreshold {
/**
* Constructs a new MetricThreshold.
* @param [properties] Properties to set
*/
constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold);
/** MetricThreshold filter. */
public filter: string;
/** MetricThreshold aggregations. */
public aggregations: google.monitoring.v3.IAggregation[];
/** MetricThreshold denominatorFilter. */
public denominatorFilter: string;
/** MetricThreshold denominatorAggregations. */
public denominatorAggregations: google.monitoring.v3.IAggregation[];
/** MetricThreshold forecastOptions. */
public forecastOptions?: (google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.IForecastOptions|null);
/** MetricThreshold comparison. */
public comparison: (google.monitoring.v3.ComparisonType|keyof typeof google.monitoring.v3.ComparisonType);
/** MetricThreshold thresholdValue. */
public thresholdValue: number;
/** MetricThreshold duration. */
public duration?: (google.protobuf.IDuration|null);
/** MetricThreshold trigger. */
public trigger?: (google.monitoring.v3.AlertPolicy.Condition.ITrigger|null);
/** MetricThreshold evaluationMissingData. */
public evaluationMissingData: (google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData|keyof typeof google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData);
/**
* Creates a new MetricThreshold instance using the specified properties.
* @param [properties] Properties to set
* @returns MetricThreshold instance
*/
public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold;
/**
* Encodes the specified MetricThreshold message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages.
* @param message MetricThreshold message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified MetricThreshold message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.verify|verify} messages.
* @param message MetricThreshold message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.IMetricThreshold, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a MetricThreshold message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns MetricThreshold
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold;
/**
* Decodes a MetricThreshold message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns MetricThreshold
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold;
/**
* Verifies a MetricThreshold message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a MetricThreshold message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns MetricThreshold
*/
public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold;
/**
* Creates a plain object from a MetricThreshold message. Also converts values to other types if specified.
* @param message MetricThreshold
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.MetricThreshold, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this MetricThreshold to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for MetricThreshold
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace MetricThreshold {
/** Properties of a ForecastOptions. */
interface IForecastOptions {
/** ForecastOptions forecastHorizon */
forecastHorizon?: (google.protobuf.IDuration|null);
}
/** Represents a ForecastOptions. */
class ForecastOptions implements IForecastOptions {
/**
* Constructs a new ForecastOptions.
* @param [properties] Properties to set
*/
constructor(properties?: google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.IForecastOptions);
/** ForecastOptions forecastHorizon. */
public forecastHorizon?: (google.protobuf.IDuration|null);
/**
* Creates a new ForecastOptions instance using the specified properties.
* @param [properties] Properties to set
* @returns ForecastOptions instance
*/
public static create(properties?: google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.IForecastOptions): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions;
/**
* Encodes the specified ForecastOptions message. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions.verify|verify} messages.
* @param message ForecastOptions message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.IForecastOptions, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ForecastOptions message, length delimited. Does not implicitly {@link google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions.verify|verify} messages.
* @param message ForecastOptions message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.IForecastOptions, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ForecastOptions message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ForecastOptions
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions;
/**
* Decodes a ForecastOptions message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ForecastOptions
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions;
/**
* Verifies a ForecastOptions message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a ForecastOptions message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ForecastOptions
*/
public static fromObject(object: { [k: string]: any }): google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions;
/**
* Creates a plain object from a ForecastOptions message. Also converts values to other types if specified.
* @param message ForecastOptions
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this ForecastOptions to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for ForecastOptions
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}
/** Properties of a MetricAbsence. */
interface IMetricAbsence {
/** MetricAbsence filter */
filter?: (string|null);
/** MetricAbsence aggregations */
aggregations?: (google.monitoring.v3.IAggregation[]|null);
/** MetricAbsence duration */
duration?: (google.protobuf.IDuration|null);