Package com.google.monitoring.v3
Class AlertPolicy.Condition.SqlCondition.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.SqlCondition.Builder>
com.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Builder
- All Implemented Interfaces:
AlertPolicy.Condition.SqlConditionOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- AlertPolicy.Condition.SqlCondition
public static final class AlertPolicy.Condition.SqlCondition.Builder
extends com.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.SqlCondition.Builder>
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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Test the boolean value in the indicated column.Schedule the query to execute every so many days.Schedule the query to execute every so many hours.Schedule the query to execute every so many minutes.Required.Test the row count against a threshold.Test the boolean value in the indicated column.Test the boolean value in the indicated column.Test the boolean value in the indicated column.getDaily()Schedule the query to execute every so many days.Schedule the query to execute every so many days.Schedule the query to execute every so many days.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorSchedule the query to execute every so many hours.Schedule the query to execute every so many hours.Schedule the query to execute every so many hours.Schedule the query to execute every so many minutes.Schedule the query to execute every so many minutes.Schedule the query to execute every so many minutes.getQuery()Required.com.google.protobuf.ByteStringRequired.Test the row count against a threshold.Test the row count against a threshold.Test the row count against a threshold.booleanTest the boolean value in the indicated column.booleanhasDaily()Schedule the query to execute every so many days.booleanSchedule the query to execute every so many hours.booleanSchedule the query to execute every so many minutes.booleanTest the row count against a threshold.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanTest the boolean value in the indicated column.Schedule the query to execute every so many days.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Schedule the query to execute every so many hours.Schedule the query to execute every so many minutes.Test the row count against a threshold.Test the boolean value in the indicated column.setBooleanTest(AlertPolicy.Condition.SqlCondition.BooleanTest.Builder builderForValue) Test the boolean value in the indicated column.Schedule the query to execute every so many days.setDaily(AlertPolicy.Condition.SqlCondition.Daily.Builder builderForValue) Schedule the query to execute every so many days.Schedule the query to execute every so many hours.setHourly(AlertPolicy.Condition.SqlCondition.Hourly.Builder builderForValue) Schedule the query to execute every so many hours.Schedule the query to execute every so many minutes.setMinutes(AlertPolicy.Condition.SqlCondition.Minutes.Builder builderForValue) Schedule the query to execute every so many minutes.Required.setQueryBytes(com.google.protobuf.ByteString value) Required.Test the row count against a threshold.setRowCountTest(AlertPolicy.Condition.SqlCondition.RowCountTest.Builder builderForValue) Test the row count against a threshold.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.SqlCondition.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.SqlCondition.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.SqlCondition.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AlertPolicy.Condition.SqlCondition.Builder>
-
mergeFrom
public AlertPolicy.Condition.SqlCondition.Builder mergeFrom(AlertPolicy.Condition.SqlCondition other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<AlertPolicy.Condition.SqlCondition.Builder>
-
mergeFrom
public AlertPolicy.Condition.SqlCondition.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AlertPolicy.Condition.SqlCondition.Builder>- Throws:
IOException
-
getScheduleCase
- Specified by:
getScheduleCasein interfaceAlertPolicy.Condition.SqlConditionOrBuilder
-
clearSchedule
-
getEvaluateCase
- Specified by:
getEvaluateCasein interfaceAlertPolicy.Condition.SqlConditionOrBuilder
-
clearEvaluate
-
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];- Specified by:
getQueryin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- The query.
-
getQueryBytes
public com.google.protobuf.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];- Specified by:
getQueryBytesin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- The bytes for query.
-
setQuery
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];- Parameters:
value- The query to set.- Returns:
- This builder for chaining.
-
clearQuery
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:
- This builder for chaining.
-
setQueryBytes
public AlertPolicy.Condition.SqlCondition.Builder setQueryBytes(com.google.protobuf.ByteString value) 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];- Parameters:
value- The bytes for query to set.- Returns:
- This builder for chaining.
-
hasMinutes
public boolean hasMinutes()Schedule the query to execute every so many minutes.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2;- Specified by:
hasMinutesin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- Whether the minutes field is set.
-
getMinutes
Schedule the query to execute every so many minutes.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2;- Specified by:
getMinutesin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- The minutes.
-
setMinutes
public AlertPolicy.Condition.SqlCondition.Builder setMinutes(AlertPolicy.Condition.SqlCondition.Minutes value) Schedule the query to execute every so many minutes.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2; -
setMinutes
public AlertPolicy.Condition.SqlCondition.Builder setMinutes(AlertPolicy.Condition.SqlCondition.Minutes.Builder builderForValue) Schedule the query to execute every so many minutes.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2; -
mergeMinutes
public AlertPolicy.Condition.SqlCondition.Builder mergeMinutes(AlertPolicy.Condition.SqlCondition.Minutes value) Schedule the query to execute every so many minutes.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2; -
clearMinutes
Schedule the query to execute every so many minutes.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2; -
getMinutesBuilder
Schedule the query to execute every so many minutes.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2; -
getMinutesOrBuilder
Schedule the query to execute every so many minutes.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Minutes minutes = 2;- Specified by:
getMinutesOrBuilderin interfaceAlertPolicy.Condition.SqlConditionOrBuilder
-
hasHourly
public boolean hasHourly()Schedule the query to execute every so many hours.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3;- Specified by:
hasHourlyin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- Whether the hourly field is set.
-
getHourly
Schedule the query to execute every so many hours.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3;- Specified by:
getHourlyin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- The hourly.
-
setHourly
public AlertPolicy.Condition.SqlCondition.Builder setHourly(AlertPolicy.Condition.SqlCondition.Hourly value) Schedule the query to execute every so many hours.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3; -
setHourly
public AlertPolicy.Condition.SqlCondition.Builder setHourly(AlertPolicy.Condition.SqlCondition.Hourly.Builder builderForValue) Schedule the query to execute every so many hours.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3; -
mergeHourly
public AlertPolicy.Condition.SqlCondition.Builder mergeHourly(AlertPolicy.Condition.SqlCondition.Hourly value) Schedule the query to execute every so many hours.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3; -
clearHourly
Schedule the query to execute every so many hours.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3; -
getHourlyBuilder
Schedule the query to execute every so many hours.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3; -
getHourlyOrBuilder
Schedule the query to execute every so many hours.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Hourly hourly = 3;- Specified by:
getHourlyOrBuilderin interfaceAlertPolicy.Condition.SqlConditionOrBuilder
-
hasDaily
public boolean hasDaily()Schedule the query to execute every so many days.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4;- Specified by:
hasDailyin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- Whether the daily field is set.
-
getDaily
Schedule the query to execute every so many days.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4;- Specified by:
getDailyin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- The daily.
-
setDaily
public AlertPolicy.Condition.SqlCondition.Builder setDaily(AlertPolicy.Condition.SqlCondition.Daily value) Schedule the query to execute every so many days.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4; -
setDaily
public AlertPolicy.Condition.SqlCondition.Builder setDaily(AlertPolicy.Condition.SqlCondition.Daily.Builder builderForValue) Schedule the query to execute every so many days.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4; -
mergeDaily
public AlertPolicy.Condition.SqlCondition.Builder mergeDaily(AlertPolicy.Condition.SqlCondition.Daily value) Schedule the query to execute every so many days.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4; -
clearDaily
Schedule the query to execute every so many days.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4; -
getDailyBuilder
Schedule the query to execute every so many days.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4; -
getDailyOrBuilder
Schedule the query to execute every so many days.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.Daily daily = 4;- Specified by:
getDailyOrBuilderin interfaceAlertPolicy.Condition.SqlConditionOrBuilder
-
hasRowCountTest
public boolean hasRowCountTest()Test the row count against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5;- Specified by:
hasRowCountTestin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- Whether the rowCountTest field is set.
-
getRowCountTest
Test the row count against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5;- Specified by:
getRowCountTestin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- The rowCountTest.
-
setRowCountTest
public AlertPolicy.Condition.SqlCondition.Builder setRowCountTest(AlertPolicy.Condition.SqlCondition.RowCountTest value) Test the row count against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5; -
setRowCountTest
public AlertPolicy.Condition.SqlCondition.Builder setRowCountTest(AlertPolicy.Condition.SqlCondition.RowCountTest.Builder builderForValue) Test the row count against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5; -
mergeRowCountTest
public AlertPolicy.Condition.SqlCondition.Builder mergeRowCountTest(AlertPolicy.Condition.SqlCondition.RowCountTest value) Test the row count against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5; -
clearRowCountTest
Test the row count against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5; -
getRowCountTestBuilder
Test the row count against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5; -
getRowCountTestOrBuilder
Test the row count against a threshold.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.RowCountTest row_count_test = 5;- Specified by:
getRowCountTestOrBuilderin interfaceAlertPolicy.Condition.SqlConditionOrBuilder
-
hasBooleanTest
public boolean hasBooleanTest()Test the boolean value in the indicated column.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6;- Specified by:
hasBooleanTestin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- Whether the booleanTest field is set.
-
getBooleanTest
Test the boolean value in the indicated column.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6;- Specified by:
getBooleanTestin interfaceAlertPolicy.Condition.SqlConditionOrBuilder- Returns:
- The booleanTest.
-
setBooleanTest
public AlertPolicy.Condition.SqlCondition.Builder setBooleanTest(AlertPolicy.Condition.SqlCondition.BooleanTest value) Test the boolean value in the indicated column.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6; -
setBooleanTest
public AlertPolicy.Condition.SqlCondition.Builder setBooleanTest(AlertPolicy.Condition.SqlCondition.BooleanTest.Builder builderForValue) Test the boolean value in the indicated column.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6; -
mergeBooleanTest
public AlertPolicy.Condition.SqlCondition.Builder mergeBooleanTest(AlertPolicy.Condition.SqlCondition.BooleanTest value) Test the boolean value in the indicated column.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6; -
clearBooleanTest
Test the boolean value in the indicated column.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6; -
getBooleanTestBuilder
Test the boolean value in the indicated column.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6; -
getBooleanTestOrBuilder
Test the boolean value in the indicated column.
.google.monitoring.v3.AlertPolicy.Condition.SqlCondition.BooleanTest boolean_test = 6;- Specified by:
getBooleanTestOrBuilderin interfaceAlertPolicy.Condition.SqlConditionOrBuilder
-