This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class FieldSource extends com.google.api.client.json.GenericJson { + + /** + * The alias name for a field that has already been aliased within a different ProjectedField type + * elsewhere in the query model. The alias must be defined in the QueryBuilderConfig's + * field_sources list, otherwise the model is invalid. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String aliasRef; + + /** + * The type of the selected field. This comes from the schema. Can be one of the BigQuery data + * types: - STRING - INT64 - FLOAT64 - BOOL - TIMESTAMP - DATE - RECORD - JSON + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String columnType; + + /** + * The fully qualified, dot-delimited path to the selected atomic field (the leaf value). This + * path is used for primary selection and actions like drill-down or projection.The path + * components should match the exact field names or keys as they appear in the underlying data + * schema. For JSON fields, this means respecting the original casing (e.g., camelCase or + * snake_case as present in the JSON).To reference field names containing special characters + * (e.g., hyphens, spaces), enclose the individual path segment in backticks (`).Examples: * + * json_payload.labels.message * json_payload.request_id * httpRequest.status * json_payload.\my- + * custom-field`.value *jsonPayload.`my key with spaces`.data` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String field; + + /** + * Whether the field is a JSON field, or has a parent that is a JSON field. This value is used to + * determine JSON extractions in generated SQL queries. Note that this is_json flag may be true + * when the column_type is not JSON if the parent is a JSON field. Ex: - A json_payload.message + * field might have is_json=true, since the 'json_payload' parent is of type JSON, and + * columnType='STRING' if the 'message' field is of type STRING. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Boolean isJson; + + /** + * The dot-delimited path of the parent container that holds the target field.This path defines + * the structural hierarchy and is essential for correctly generating SQL when field keys contain + * special characters (e.g., dots or brackets).Example: json_payload.labels (This points to the + * 'labels' object). This is an empty string if the target field is at the root level. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String parentPath; + + /** + * A projected field option for when a user wants to use a field with some additional + * transformations such as casting or extractions. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private ProjectedField projectedField; + + /** + * The alias name for a field that has already been aliased within a different ProjectedField type + * elsewhere in the query model. The alias must be defined in the QueryBuilderConfig's + * field_sources list, otherwise the model is invalid. + * @return value or {@code null} for none + */ + public java.lang.String getAliasRef() { + return aliasRef; + } + + /** + * The alias name for a field that has already been aliased within a different ProjectedField type + * elsewhere in the query model. The alias must be defined in the QueryBuilderConfig's + * field_sources list, otherwise the model is invalid. + * @param aliasRef aliasRef or {@code null} for none + */ + public FieldSource setAliasRef(java.lang.String aliasRef) { + this.aliasRef = aliasRef; + return this; + } + + /** + * The type of the selected field. This comes from the schema. Can be one of the BigQuery data + * types: - STRING - INT64 - FLOAT64 - BOOL - TIMESTAMP - DATE - RECORD - JSON + * @return value or {@code null} for none + */ + public java.lang.String getColumnType() { + return columnType; + } + + /** + * The type of the selected field. This comes from the schema. Can be one of the BigQuery data + * types: - STRING - INT64 - FLOAT64 - BOOL - TIMESTAMP - DATE - RECORD - JSON + * @param columnType columnType or {@code null} for none + */ + public FieldSource setColumnType(java.lang.String columnType) { + this.columnType = columnType; + return this; + } + + /** + * The fully qualified, dot-delimited path to the selected atomic field (the leaf value). This + * path is used for primary selection and actions like drill-down or projection.The path + * components should match the exact field names or keys as they appear in the underlying data + * schema. For JSON fields, this means respecting the original casing (e.g., camelCase or + * snake_case as present in the JSON).To reference field names containing special characters + * (e.g., hyphens, spaces), enclose the individual path segment in backticks (`).Examples: * + * json_payload.labels.message * json_payload.request_id * httpRequest.status * json_payload.\my- + * custom-field`.value *jsonPayload.`my key with spaces`.data` + * @return value or {@code null} for none + */ + public java.lang.String getField() { + return field; + } + + /** + * The fully qualified, dot-delimited path to the selected atomic field (the leaf value). This + * path is used for primary selection and actions like drill-down or projection.The path + * components should match the exact field names or keys as they appear in the underlying data + * schema. For JSON fields, this means respecting the original casing (e.g., camelCase or + * snake_case as present in the JSON).To reference field names containing special characters + * (e.g., hyphens, spaces), enclose the individual path segment in backticks (`).Examples: * + * json_payload.labels.message * json_payload.request_id * httpRequest.status * json_payload.\my- + * custom-field`.value *jsonPayload.`my key with spaces`.data` + * @param field field or {@code null} for none + */ + public FieldSource setField(java.lang.String field) { + this.field = field; + return this; + } + + /** + * Whether the field is a JSON field, or has a parent that is a JSON field. This value is used to + * determine JSON extractions in generated SQL queries. Note that this is_json flag may be true + * when the column_type is not JSON if the parent is a JSON field. Ex: - A json_payload.message + * field might have is_json=true, since the 'json_payload' parent is of type JSON, and + * columnType='STRING' if the 'message' field is of type STRING. + * @return value or {@code null} for none + */ + public java.lang.Boolean getIsJson() { + return isJson; + } + + /** + * Whether the field is a JSON field, or has a parent that is a JSON field. This value is used to + * determine JSON extractions in generated SQL queries. Note that this is_json flag may be true + * when the column_type is not JSON if the parent is a JSON field. Ex: - A json_payload.message + * field might have is_json=true, since the 'json_payload' parent is of type JSON, and + * columnType='STRING' if the 'message' field is of type STRING. + * @param isJson isJson or {@code null} for none + */ + public FieldSource setIsJson(java.lang.Boolean isJson) { + this.isJson = isJson; + return this; + } + + /** + * The dot-delimited path of the parent container that holds the target field.This path defines + * the structural hierarchy and is essential for correctly generating SQL when field keys contain + * special characters (e.g., dots or brackets).Example: json_payload.labels (This points to the + * 'labels' object). This is an empty string if the target field is at the root level. + * @return value or {@code null} for none + */ + public java.lang.String getParentPath() { + return parentPath; + } + + /** + * The dot-delimited path of the parent container that holds the target field.This path defines + * the structural hierarchy and is essential for correctly generating SQL when field keys contain + * special characters (e.g., dots or brackets).Example: json_payload.labels (This points to the + * 'labels' object). This is an empty string if the target field is at the root level. + * @param parentPath parentPath or {@code null} for none + */ + public FieldSource setParentPath(java.lang.String parentPath) { + this.parentPath = parentPath; + return this; + } + + /** + * A projected field option for when a user wants to use a field with some additional + * transformations such as casting or extractions. + * @return value or {@code null} for none + */ + public ProjectedField getProjectedField() { + return projectedField; + } + + /** + * A projected field option for when a user wants to use a field with some additional + * transformations such as casting or extractions. + * @param projectedField projectedField or {@code null} for none + */ + public FieldSource setProjectedField(ProjectedField projectedField) { + this.projectedField = projectedField; + return this; + } + + @Override + public FieldSource set(String fieldName, Object value) { + return (FieldSource) super.set(fieldName, value); + } + + @Override + public FieldSource clone() { + return (FieldSource) super.clone(); + } + +} diff --git a/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/FilterExpression.java b/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/FilterExpression.java new file mode 100644 index 00000000000..8670bbbf8e1 --- /dev/null +++ b/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/FilterExpression.java @@ -0,0 +1,165 @@ +/* + * 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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.logging.v2.model; + +/** + * This is a leaf of the FilterPredicate. Ex: { field: json_payload.message.error_code, + * filter_value: {numeric_value: 400}, comparator: EQUAL_TO} The field will be schema field that is + * selected using the . annotation to display the drill down value. The value will be the user + * inputted text that the filter is comparing against. + * + *This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class FilterExpression extends com.google.api.client.json.GenericJson { + + /** + * The comparison type to use for the filter. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String comparator; + + /** + * Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private FieldSource fieldSource; + + /** + * The field. This will be the field that is set as the Right Hand Side of the filter. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private FieldSource fieldSourceValue; + + /** + * Determines if the NOT flag should be added to the comparator. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Boolean isNegation; + + /** + * The Value will be used to hold user defined constants set as the Right Hand Side of the filter. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Object literalValue; + + /** + * The comparison type to use for the filter. + * @return value or {@code null} for none + */ + public java.lang.String getComparator() { + return comparator; + } + + /** + * The comparison type to use for the filter. + * @param comparator comparator or {@code null} for none + */ + public FilterExpression setComparator(java.lang.String comparator) { + this.comparator = comparator; + return this; + } + + /** + * Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value. + * @return value or {@code null} for none + */ + public FieldSource getFieldSource() { + return fieldSource; + } + + /** + * Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value. + * @param fieldSource fieldSource or {@code null} for none + */ + public FilterExpression setFieldSource(FieldSource fieldSource) { + this.fieldSource = fieldSource; + return this; + } + + /** + * The field. This will be the field that is set as the Right Hand Side of the filter. + * @return value or {@code null} for none + */ + public FieldSource getFieldSourceValue() { + return fieldSourceValue; + } + + /** + * The field. This will be the field that is set as the Right Hand Side of the filter. + * @param fieldSourceValue fieldSourceValue or {@code null} for none + */ + public FilterExpression setFieldSourceValue(FieldSource fieldSourceValue) { + this.fieldSourceValue = fieldSourceValue; + return this; + } + + /** + * Determines if the NOT flag should be added to the comparator. + * @return value or {@code null} for none + */ + public java.lang.Boolean getIsNegation() { + return isNegation; + } + + /** + * Determines if the NOT flag should be added to the comparator. + * @param isNegation isNegation or {@code null} for none + */ + public FilterExpression setIsNegation(java.lang.Boolean isNegation) { + this.isNegation = isNegation; + return this; + } + + /** + * The Value will be used to hold user defined constants set as the Right Hand Side of the filter. + * @return value or {@code null} for none + */ + public java.lang.Object getLiteralValue() { + return literalValue; + } + + /** + * The Value will be used to hold user defined constants set as the Right Hand Side of the filter. + * @param literalValue literalValue or {@code null} for none + */ + public FilterExpression setLiteralValue(java.lang.Object literalValue) { + this.literalValue = literalValue; + return this; + } + + @Override + public FilterExpression set(String fieldName, Object value) { + return (FilterExpression) super.set(fieldName, value); + } + + @Override + public FilterExpression clone() { + return (FilterExpression) super.clone(); + } + +} diff --git a/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/FilterPredicate.java b/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/FilterPredicate.java new file mode 100644 index 00000000000..bf68b09296b --- /dev/null +++ b/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/FilterPredicate.java @@ -0,0 +1,123 @@ +/* + * 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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.logging.v2.model; + +/** + * A filter for a query. This equates to the WHERE clause in SQL. + * + *This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class FilterPredicate extends com.google.api.client.json.GenericJson { + + /** + * The children of the filter predicate. This equates to the branches of the filter predicate that + * could contain further nested leaves. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.ListThis is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class FunctionApplication extends com.google.api.client.json.GenericJson { + + /** + * Optional. Parameters to be applied to the aggregation. Aggregations that support or require + * parameters are listed above. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.ListThis is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see: @@ -31,16 +30,48 @@ public final class OpsAnalyticsQuery extends com.google.api.client.json.GenericJson { /** - * Required. A logs analytics SQL query, which generally follows BigQuery format.This is the SQL - * query that appears in the Log Analytics UI's query editor. + * Optional. A query builder configuration used in Log Analytics.If both query_builder and + * sql_query_text fields are set, then the sql_query_text will be used, if its non-empty. At least + * one of the two fields must be set. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private QueryBuilderConfig queryBuilder; + + /** + * Optional. A Log Analytics SQL query in text format.If both sql_query_text and query_builder + * fields are set, then the sql_query_text will be used, if its non-empty. At least one of the two + * fields must be set. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String sqlQueryText; /** - * Required. A logs analytics SQL query, which generally follows BigQuery format.This is the SQL - * query that appears in the Log Analytics UI's query editor. + * Optional. A query builder configuration used in Log Analytics.If both query_builder and + * sql_query_text fields are set, then the sql_query_text will be used, if its non-empty. At least + * one of the two fields must be set. + * @return value or {@code null} for none + */ + public QueryBuilderConfig getQueryBuilder() { + return queryBuilder; + } + + /** + * Optional. A query builder configuration used in Log Analytics.If both query_builder and + * sql_query_text fields are set, then the sql_query_text will be used, if its non-empty. At least + * one of the two fields must be set. + * @param queryBuilder queryBuilder or {@code null} for none + */ + public OpsAnalyticsQuery setQueryBuilder(QueryBuilderConfig queryBuilder) { + this.queryBuilder = queryBuilder; + return this; + } + + /** + * Optional. A Log Analytics SQL query in text format.If both sql_query_text and query_builder + * fields are set, then the sql_query_text will be used, if its non-empty. At least one of the two + * fields must be set. * @return value or {@code null} for none */ public java.lang.String getSqlQueryText() { @@ -48,8 +79,9 @@ public java.lang.String getSqlQueryText() { } /** - * Required. A logs analytics SQL query, which generally follows BigQuery format.This is the SQL - * query that appears in the Log Analytics UI's query editor. + * Optional. A Log Analytics SQL query in text format.If both sql_query_text and query_builder + * fields are set, then the sql_query_text will be used, if its non-empty. At least one of the two + * fields must be set. * @param sqlQueryText sqlQueryText or {@code null} for none */ public OpsAnalyticsQuery setSqlQueryText(java.lang.String sqlQueryText) { diff --git a/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/ProjectedField.java b/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/ProjectedField.java new file mode 100644 index 00000000000..d6a875ea6f2 --- /dev/null +++ b/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/ProjectedField.java @@ -0,0 +1,259 @@ +/* + * 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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.logging.v2.model; + +/** + * Represents a field selected in the query, analogous to an item in a SQL SELECT clause. It + * specifies the source field and optionally applies transformations like aggregation, casting, + * regex extraction, or assigns an alias. Use ProjectedField when you need more than just the raw + * source field name (for which you might use FieldSource directly in QueryBuilderConfig's + * field_sources list if no transformations or specific operation type are needed). + * + *
This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ProjectedField extends com.google.api.client.json.GenericJson { + + /** + * The alias name for the field. Valid alias examples are: - single word alias: TestAlias - + * numbers in an alias: Alias123 - multi word alias should be enclosed in quotes: "Test Alias" + * Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias + * starting with a number: 1stAlias + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String alias; + + /** + * The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - + * TIMESTAMP - DATETIME - INT - FLOAT + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String cast; + + /** + * The field name. This will be the field that is selected using the dot notation to display the + * drill down value. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String field; + + /** + * Specifies the role of this field (direct selection, grouping, or aggregation). + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String operation; + + /** + * The re2 extraction for the field. This will be used to extract the value from the field using + * REGEXP_EXTRACT. More information on re2 can be found here: + * https://github.com/google/re2/wiki/Syntax. Meta characters like +?()| will need to be escaped. + * Examples: - ".(autoscaler.*)$" will be converted to + * REGEXP_EXTRACT(JSON_VALUE(field),"request(.*(autoscaler.*)$)")in SQL. - "\(test_value\)$" will + * be converted to REGEXP_EXTRACT(JSON_VALUE(field),"request(\(test_value\)$)") in SQL. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String regexExtraction; + + /** + * The function to apply to the field. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private FunctionApplication sqlAggregationFunction; + + /** + * The truncation granularity when grouping by a time/date field. This will be used to truncate + * the field to the granularity specified. This can be either a date or a time granularity found + * at https://cloud.google.com/bigquery/docs/reference/standard- + * sql/timestamp_functions#timestamp_trunc_granularity_date and + * https://cloud.google.com/bigquery/docs/reference/standard- + * sql/timestamp_functions#timestamp_trunc_granularity_time respectively. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String truncationGranularity; + + /** + * The alias name for the field. Valid alias examples are: - single word alias: TestAlias - + * numbers in an alias: Alias123 - multi word alias should be enclosed in quotes: "Test Alias" + * Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias + * starting with a number: 1stAlias + * @return value or {@code null} for none + */ + public java.lang.String getAlias() { + return alias; + } + + /** + * The alias name for the field. Valid alias examples are: - single word alias: TestAlias - + * numbers in an alias: Alias123 - multi word alias should be enclosed in quotes: "Test Alias" + * Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias + * starting with a number: 1stAlias + * @param alias alias or {@code null} for none + */ + public ProjectedField setAlias(java.lang.String alias) { + this.alias = alias; + return this; + } + + /** + * The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - + * TIMESTAMP - DATETIME - INT - FLOAT + * @return value or {@code null} for none + */ + public java.lang.String getCast() { + return cast; + } + + /** + * The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - + * TIMESTAMP - DATETIME - INT - FLOAT + * @param cast cast or {@code null} for none + */ + public ProjectedField setCast(java.lang.String cast) { + this.cast = cast; + return this; + } + + /** + * The field name. This will be the field that is selected using the dot notation to display the + * drill down value. + * @return value or {@code null} for none + */ + public java.lang.String getField() { + return field; + } + + /** + * The field name. This will be the field that is selected using the dot notation to display the + * drill down value. + * @param field field or {@code null} for none + */ + public ProjectedField setField(java.lang.String field) { + this.field = field; + return this; + } + + /** + * Specifies the role of this field (direct selection, grouping, or aggregation). + * @return value or {@code null} for none + */ + public java.lang.String getOperation() { + return operation; + } + + /** + * Specifies the role of this field (direct selection, grouping, or aggregation). + * @param operation operation or {@code null} for none + */ + public ProjectedField setOperation(java.lang.String operation) { + this.operation = operation; + return this; + } + + /** + * The re2 extraction for the field. This will be used to extract the value from the field using + * REGEXP_EXTRACT. More information on re2 can be found here: + * https://github.com/google/re2/wiki/Syntax. Meta characters like +?()| will need to be escaped. + * Examples: - ".(autoscaler.*)$" will be converted to + * REGEXP_EXTRACT(JSON_VALUE(field),"request(.*(autoscaler.*)$)")in SQL. - "\(test_value\)$" will + * be converted to REGEXP_EXTRACT(JSON_VALUE(field),"request(\(test_value\)$)") in SQL. + * @return value or {@code null} for none + */ + public java.lang.String getRegexExtraction() { + return regexExtraction; + } + + /** + * The re2 extraction for the field. This will be used to extract the value from the field using + * REGEXP_EXTRACT. More information on re2 can be found here: + * https://github.com/google/re2/wiki/Syntax. Meta characters like +?()| will need to be escaped. + * Examples: - ".(autoscaler.*)$" will be converted to + * REGEXP_EXTRACT(JSON_VALUE(field),"request(.*(autoscaler.*)$)")in SQL. - "\(test_value\)$" will + * be converted to REGEXP_EXTRACT(JSON_VALUE(field),"request(\(test_value\)$)") in SQL. + * @param regexExtraction regexExtraction or {@code null} for none + */ + public ProjectedField setRegexExtraction(java.lang.String regexExtraction) { + this.regexExtraction = regexExtraction; + return this; + } + + /** + * The function to apply to the field. + * @return value or {@code null} for none + */ + public FunctionApplication getSqlAggregationFunction() { + return sqlAggregationFunction; + } + + /** + * The function to apply to the field. + * @param sqlAggregationFunction sqlAggregationFunction or {@code null} for none + */ + public ProjectedField setSqlAggregationFunction(FunctionApplication sqlAggregationFunction) { + this.sqlAggregationFunction = sqlAggregationFunction; + return this; + } + + /** + * The truncation granularity when grouping by a time/date field. This will be used to truncate + * the field to the granularity specified. This can be either a date or a time granularity found + * at https://cloud.google.com/bigquery/docs/reference/standard- + * sql/timestamp_functions#timestamp_trunc_granularity_date and + * https://cloud.google.com/bigquery/docs/reference/standard- + * sql/timestamp_functions#timestamp_trunc_granularity_time respectively. + * @return value or {@code null} for none + */ + public java.lang.String getTruncationGranularity() { + return truncationGranularity; + } + + /** + * The truncation granularity when grouping by a time/date field. This will be used to truncate + * the field to the granularity specified. This can be either a date or a time granularity found + * at https://cloud.google.com/bigquery/docs/reference/standard- + * sql/timestamp_functions#timestamp_trunc_granularity_date and + * https://cloud.google.com/bigquery/docs/reference/standard- + * sql/timestamp_functions#timestamp_trunc_granularity_time respectively. + * @param truncationGranularity truncationGranularity or {@code null} for none + */ + public ProjectedField setTruncationGranularity(java.lang.String truncationGranularity) { + this.truncationGranularity = truncationGranularity; + return this; + } + + @Override + public ProjectedField set(String fieldName, Object value) { + return (ProjectedField) super.set(fieldName, value); + } + + @Override + public ProjectedField clone() { + return (ProjectedField) super.clone(); + } + +} diff --git a/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/QueryBuilderConfig.java b/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/QueryBuilderConfig.java new file mode 100644 index 00000000000..a11f23400ae --- /dev/null +++ b/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/QueryBuilderConfig.java @@ -0,0 +1,213 @@ +/* + * 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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.logging.v2.model; + +/** + * Defines a structured query configuration that can be used instead of writing raw SQL. This + * configuration represents the components of a SQL query (FROM, SELECT, WHERE, ORDER BY, LIMIT) and + * is typically converted into an executable query (e.g., BigQuery SQL) by the backend service to + * retrieve data for analysis or visualization. + * + *This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class QueryBuilderConfig extends com.google.api.client.json.GenericJson { + + /** + * Defines the items to include in the query result, analogous to a SQL SELECT clause. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.ListThis is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class SortOrderParameter extends com.google.api.client.json.GenericJson { + + /** + * The field to sort on. Can be one of the FieldSource types: field name, alias ref, variable ref, + * or a literal value. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private FieldSource fieldSource; + + /** + * The sort order to use for the query. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String sortOrderDirection; + + /** + * The field to sort on. Can be one of the FieldSource types: field name, alias ref, variable ref, + * or a literal value. + * @return value or {@code null} for none + */ + public FieldSource getFieldSource() { + return fieldSource; + } + + /** + * The field to sort on. Can be one of the FieldSource types: field name, alias ref, variable ref, + * or a literal value. + * @param fieldSource fieldSource or {@code null} for none + */ + public SortOrderParameter setFieldSource(FieldSource fieldSource) { + this.fieldSource = fieldSource; + return this; + } + + /** + * The sort order to use for the query. + * @return value or {@code null} for none + */ + public java.lang.String getSortOrderDirection() { + return sortOrderDirection; + } + + /** + * The sort order to use for the query. + * @param sortOrderDirection sortOrderDirection or {@code null} for none + */ + public SortOrderParameter setSortOrderDirection(java.lang.String sortOrderDirection) { + this.sortOrderDirection = sortOrderDirection; + return this; + } + + @Override + public SortOrderParameter set(String fieldName, Object value) { + return (SortOrderParameter) super.set(fieldName, value); + } + + @Override + public SortOrderParameter clone() { + return (SortOrderParameter) super.clone(); + } + +} diff --git a/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/SummaryField.java b/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/SummaryField.java index 933d396643d..6a0188bb66f 100644 --- a/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/SummaryField.java +++ b/clients/google-api-services-logging/v2/2.0.0/com/google/api/services/logging/v2/model/SummaryField.java @@ -18,8 +18,8 @@ /** * A field from the LogEntry that is added to the summary line - * (https://cloud.google.com/logging/docs/view/logs-explorer-interface#add-summary-fields) for a - * query in the Logs Explorer. + * (https://docs.cloud.google.com/logging/docs/view/logs-explorer-interface#preferences) for a query + * in the Logs Explorer. * * This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see:
diff --git a/clients/google-api-services-logging/v2/2.0.0/pom.xml b/clients/google-api-services-logging/v2/2.0.0/pom.xml
index 0715895a498..4d4cc8f7697 100644
--- a/clients/google-api-services-logging/v2/2.0.0/pom.xml
+++ b/clients/google-api-services-logging/v2/2.0.0/pom.xml
@@ -8,8 +8,8 @@