Class AlertPolicy.Condition.SqlCondition (3.57.0)

public static final class AlertPolicy.Condition.SqlCondition extends GeneratedMessageV3 implements AlertPolicy.Condition.SqlConditionOrBuilder

A condition that allows alerting policies to be defined using GoogleSQL. SQL conditions examine a sliding window of logs using GoogleSQL. Alert policies with SQL conditions may incur additional billing.

Protobuf type google.monitoring.v3.AlertPolicy.Condition.SqlCondition

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > AlertPolicy.Condition.SqlCondition

Static Fields

BOOLEAN_TEST_FIELD_NUMBER

public static final int BOOLEAN_TEST_FIELD_NUMBER
Field Value
Type Description
int

DAILY_FIELD_NUMBER

public static final int DAILY_FIELD_NUMBER
Field Value
Type Description
int

HOURLY_FIELD_NUMBER

public static final int HOURLY_FIELD_NUMBER
Field Value
Type Description
int

MINUTES_FIELD_NUMBER

public static final int MINUTES_FIELD_NUMBER
Field Value
Type Description
int

QUERY_FIELD_NUMBER

public static final int QUERY_FIELD_NUMBER
Field Value
Type Description
int

ROW_COUNT_TEST_FIELD_NUMBER

public static final int ROW_COUNT_TEST_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AlertPolicy.Condition.SqlCondition getDefaultInstance()
Returns
Type Description
AlertPolicy.Condition.SqlCondition

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AlertPolicy.Condition.SqlCondition.Builder newBuilder()
Returns
Type Description
AlertPolicy.Condition.SqlCondition.Builder

newBuilder(AlertPolicy.Condition.SqlCondition prototype)

public static AlertPolicy.Condition.SqlCondition.Builder newBuilder(AlertPolicy.Condition.SqlCondition prototype)
Parameter
Name Description
prototype AlertPolicy.Condition.SqlCondition
Returns
Type Description
AlertPolicy.Condition.SqlCondition.Builder

parseDelimitedFrom(InputStream input)

public static AlertPolicy.Condition.SqlCondition parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AlertPolicy.Condition.SqlCondition parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AlertPolicy.Condition.SqlCondition parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AlertPolicy.Condition.SqlCondition parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AlertPolicy.Condition.SqlCondition parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AlertPolicy.Condition.SqlCondition parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AlertPolicy.Condition.SqlCondition parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AlertPolicy.Condition.SqlCondition parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AlertPolicy.Condition.SqlCondition parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AlertPolicy.Condition.SqlCondition parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AlertPolicy.Condition.SqlCondition parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AlertPolicy.Condition.SqlCondition parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AlertPolicy.Condition.SqlCondition
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AlertPolicy.Condition.SqlCondition> parser()
Returns
Type Description
Parser<SqlCondition>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBooleanTest()

public AlertPolicy.Condition.SqlCondition.BooleanTest getBooleanTest()

Test the boolean value in the indicated column.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6;

Returns
Type Description
AlertPolicy.Condition.SqlCondition.BooleanTest

The booleanTest.

getBooleanTestOrBuilder()

public AlertPolicy.Condition.SqlCondition.BooleanTestOrBuilder getBooleanTestOrBuilder()

Test the boolean value in the indicated column.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6;

Returns
Type Description
AlertPolicy.Condition.SqlCondition.BooleanTestOrBuilder

getDaily()

public AlertPolicy.Condition.SqlCondition.Daily getDaily()

Schedule the query to execute every so many days.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4;

Returns
Type Description
AlertPolicy.Condition.SqlCondition.Daily

The daily.

getDailyOrBuilder()

public AlertPolicy.Condition.SqlCondition.DailyOrBuilder getDailyOrBuilder()

Schedule the query to execute every so many days.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4;

Returns
Type Description
AlertPolicy.Condition.SqlCondition.DailyOrBuilder

getDefaultInstanceForType()

public AlertPolicy.Condition.SqlCondition getDefaultInstanceForType()
Returns
Type Description
AlertPolicy.Condition.SqlCondition

getEvaluateCase()

public AlertPolicy.Condition.SqlCondition.EvaluateCase getEvaluateCase()
Returns
Type Description
AlertPolicy.Condition.SqlCondition.EvaluateCase

getHourly()

public AlertPolicy.Condition.SqlCondition.Hourly getHourly()

Schedule the query to execute every so many hours.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3;

Returns
Type Description
AlertPolicy.Condition.SqlCondition.Hourly

The hourly.

getHourlyOrBuilder()

public AlertPolicy.Condition.SqlCondition.HourlyOrBuilder getHourlyOrBuilder()

Schedule the query to execute every so many hours.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3;

Returns
Type Description
AlertPolicy.Condition.SqlCondition.HourlyOrBuilder

getMinutes()

public AlertPolicy.Condition.SqlCondition.Minutes getMinutes()

Schedule the query to execute every so many minutes.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2;

Returns
Type Description
AlertPolicy.Condition.SqlCondition.Minutes

The minutes.

getMinutesOrBuilder()

public AlertPolicy.Condition.SqlCondition.MinutesOrBuilder getMinutesOrBuilder()

Schedule the query to execute every so many minutes.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2;

Returns
Type Description
AlertPolicy.Condition.SqlCondition.MinutesOrBuilder

getParserForType()

public Parser<AlertPolicy.Condition.SqlCondition> getParserForType()
Returns
Type Description
Parser<SqlCondition>
Overrides

getQuery()

public String getQuery()

Required. The Log Analytics SQL query to run, as a string. The query must conform to the required shape. Specifically, the query must not try to filter the input by time. A filter will automatically be applied to filter the input so that the query receives all rows received since the last time the query was run.

For example, the following query extracts all log entries containing an HTTP request:

 SELECT
   timestamp, log_name, severity, http_request, resource, labels
 FROM
   my-project.global._Default._AllLogs
 WHERE
   http_request IS NOT NULL

string query = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The query.

getQueryBytes()

public ByteString getQueryBytes()

Required. The Log Analytics SQL query to run, as a string. The query must conform to the required shape. Specifically, the query must not try to filter the input by time. A filter will automatically be applied to filter the input so that the query receives all rows received since the last time the query was run.

For example, the following query extracts all log entries containing an HTTP request:

 SELECT
   timestamp, log_name, severity, http_request, resource, labels
 FROM
   my-project.global._Default._AllLogs
 WHERE
   http_request IS NOT NULL

string query = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for query.

getRowCountTest()

public AlertPolicy.Condition.SqlCondition.RowCountTest getRowCountTest()

Test the row count against a threshold.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5;

Returns
Type Description
AlertPolicy.Condition.SqlCondition.RowCountTest

The rowCountTest.

getRowCountTestOrBuilder()

public AlertPolicy.Condition.SqlCondition.RowCountTestOrBuilder getRowCountTestOrBuilder()

Test the row count against a threshold.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5;

Returns
Type Description
AlertPolicy.Condition.SqlCondition.RowCountTestOrBuilder

getScheduleCase()

public AlertPolicy.Condition.SqlCondition.ScheduleCase getScheduleCase()
Returns
Type Description
AlertPolicy.Condition.SqlCondition.ScheduleCase

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasBooleanTest()

public boolean hasBooleanTest()

Test the boolean value in the indicated column.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6;

Returns
Type Description
boolean

Whether the booleanTest field is set.

hasDaily()

public boolean hasDaily()

Schedule the query to execute every so many days.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4;

Returns
Type Description
boolean

Whether the daily field is set.

hasHourly()

public boolean hasHourly()

Schedule the query to execute every so many hours.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3;

Returns
Type Description
boolean

Whether the hourly field is set.

hasMinutes()

public boolean hasMinutes()

Schedule the query to execute every so many minutes.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2;

Returns
Type Description
boolean

Whether the minutes field is set.

hasRowCountTest()

public boolean hasRowCountTest()

Test the row count against a threshold.

.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5;

Returns
Type Description
boolean

Whether the rowCountTest field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AlertPolicy.Condition.SqlCondition.Builder newBuilderForType()
Returns
Type Description
AlertPolicy.Condition.SqlCondition.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AlertPolicy.Condition.SqlCondition.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AlertPolicy.Condition.SqlCondition.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AlertPolicy.Condition.SqlCondition.Builder toBuilder()
Returns
Type Description
AlertPolicy.Condition.SqlCondition.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException