Debian Codegraph @

docs/dyn/logging_v2.projects.locations.savedQueries.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="logging_v2.html">Cloud Logging API</a> . <a href="logging_v2.projects.html">projects</a> . <a href="logging_v2.projects.locations.html">locations</a> . <a href="logging_v2.projects.locations.savedQueries.html">savedQueries</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#create">create(parent, body=None, savedQueryId=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Creates a new SavedQuery for the user making the request.</p>
83 <p class="toc_element">
84 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
85 <p class="firstline">Deletes an existing SavedQuery that was created by the user making the request.</p>
86 <p class="toc_element">
87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88 <p class="firstline">Returns all data associated with the requested query.</p>
89 <p class="toc_element">
90 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Lists the SavedQueries that were created by the user making the request.</p>
92 <p class="toc_element">
93 <code><a href="#list_next">list_next()</a></code></p>
94 <p class="firstline">Retrieves the next page of results.</p>
95 <p class="toc_element">
96 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Updates an existing SavedQuery.</p>
98 <h3>Method Details</h3>
99 <div class="method">
100 <code class="details" id="close">close()</code>
101 <pre>Close httplib2 connections.</pre>
102 </div>
103
104 <div class="method">
105 <code class="details" id="create">create(parent, body=None, savedQueryId=None, x__xgafv=None)</code>
106 <pre>Creates a new SavedQuery for the user making the request.
107
108 Args:
109 parent: string, Required. The parent resource in which to create the saved query: &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]&quot; &quot;organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]&quot; &quot;billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]&quot; &quot;folders/[FOLDER_ID]/locations/[LOCATION_ID]&quot; For example: &quot;projects/my-project/locations/global&quot; &quot;organizations/123456789/locations/us-central1&quot; (required)
110 body: object, The request body.
111 The object takes the form of:
112
113 { # Describes a query that has been saved by a user.
114 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was created.
115 &quot;description&quot;: &quot;A String&quot;, # Optional. A human readable description of the saved query.
116 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user specified title for the SavedQuery.
117 &quot;loggingQuery&quot;: { # Describes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results. # Logging query that can be executed in Logs Explorer or via Logging API.
118 &quot;filter&quot;: &quot;A String&quot;, # Required. An advanced query using the Logging Query Language (https://docs.cloud.google.com/logging/docs/view/logging-query-language). The maximum length of the filter is 20000 characters.
119 &quot;summaryFieldEnd&quot;: 42, # Characters will be counted from the end of the string.
120 &quot;summaryFieldStart&quot;: 42, # Characters will be counted from the start of the string.
121 &quot;summaryFields&quot;: [ # Optional. The set of summary fields to display for this saved query.
122 { # A field from the LogEntry that is added to the summary line (https://docs.cloud.google.com/logging/docs/view/logs-explorer-interface#preferences) for a query in the Logs Explorer.
123 &quot;field&quot;: &quot;A String&quot;, # Optional. The field from the LogEntry to include in the summary line, for example resource.type or jsonPayload.name.
124 },
125 ],
126 },
127 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the saved query.In the format: &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; For a list of supported locations, see Supported Regions (https://docs.cloud.google.com/logging/docs/region-support#bucket-regions)After the saved query is created, the location cannot be changed.If the user doesn&#x27;t provide a QUERY_ID, the system will generate an alphanumeric ID.
128 &quot;opsAnalyticsQuery&quot;: { # Describes a query that can be run in Log Analytics. # Analytics query that can be executed in Log Analytics.
129 &quot;queryBuilder&quot;: { # 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. # 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.
130 &quot;fieldSources&quot;: [ # Defines the items to include in the query result, analogous to a SQL SELECT clause.
131 { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema.
132 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
133 &quot;columnType&quot;: &quot;A String&quot;, # 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
134 &quot;field&quot;: &quot;A String&quot;, # 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`
135 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
136 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
137 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
138 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
139 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
140 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
141 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
142 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
143 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
144 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
145 &quot;&quot;,
146 ],
147 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
148 },
149 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
150 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
151 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
152 # Object with schema name: FieldSource
153 ],
154 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
155 },
156 },
157 },
158 ],
159 &quot;filter&quot;: { # A filter for a query. This equates to the WHERE clause in SQL. # The filter to use for the query. This equates to the WHERE clause in SQL.
160 &quot;childPredicates&quot;: [ # The children of the filter predicate. This equates to the branches of the filter predicate that could contain further nested leaves.
161 # Object with schema name: FilterPredicate
162 ],
163 &quot;leafPredicate&quot;: { # 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. # The leaves of the filter predicate. This equates to the last leaves of the filter predicate associated with an operator.
164 &quot;comparator&quot;: &quot;A String&quot;, # The comparison type to use for the filter.
165 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
166 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
167 &quot;columnType&quot;: &quot;A String&quot;, # 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
168 &quot;field&quot;: &quot;A String&quot;, # 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`
169 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
170 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
171 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
172 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
173 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
174 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
175 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
176 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
177 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
178 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
179 &quot;&quot;,
180 ],
181 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
182 },
183 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
184 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
185 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
186 # Object with schema name: FieldSource
187 ],
188 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
189 },
190 },
191 },
192 &quot;fieldSourceValue&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field. This will be the field that is set as the Right Hand Side of the filter.
193 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
194 &quot;columnType&quot;: &quot;A String&quot;, # 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
195 &quot;field&quot;: &quot;A String&quot;, # 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`
196 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
197 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
198 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
199 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
200 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
201 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
202 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
203 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
204 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
205 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
206 &quot;&quot;,
207 ],
208 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
209 },
210 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
211 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
212 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
213 # Object with schema name: FieldSource
214 ],
215 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
216 },
217 },
218 },
219 &quot;isNegation&quot;: True or False, # Determines if the NOT flag should be added to the comparator.
220 &quot;literalValue&quot;: &quot;&quot;, # The Value will be used to hold user defined constants set as the Right Hand Side of the filter.
221 },
222 &quot;operatorType&quot;: &quot;A String&quot;, # The operator type for the filter. Currently there is no support for multiple levels of nesting, so this will be a single value with no joining of different operator types
223 },
224 &quot;limit&quot;: &quot;A String&quot;, # The limit to use for the query. This equates to the LIMIT clause in SQL. A limit of 0 will be treated as not enabled.
225 &quot;orderBys&quot;: [ # The sort orders to use for the query. This equates to the ORDER BY clause in SQL.
226 { # A sort order for a query based on a column.
227 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field to sort on. Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
228 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
229 &quot;columnType&quot;: &quot;A String&quot;, # 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
230 &quot;field&quot;: &quot;A String&quot;, # 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`
231 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
232 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
233 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
234 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
235 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
236 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
237 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
238 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
239 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
240 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
241 &quot;&quot;,
242 ],
243 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
244 },
245 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
246 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
247 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
248 # Object with schema name: FieldSource
249 ],
250 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
251 },
252 },
253 },
254 &quot;sortOrderDirection&quot;: &quot;A String&quot;, # The sort order to use for the query.
255 },
256 ],
257 &quot;resourceNames&quot;: [ # Required. The view/resource to query. For now only a single view/resource will be sent, but there are plans to allow multiple views in the future. Marking as repeated for that purpose. Example: - &quot;projects/123/locations/global/buckets/456/views/_Default&quot; - &quot;projects/123/locations/global/metricBuckets/456/views/_Default&quot;
258 &quot;A String&quot;,
259 ],
260 &quot;searchTerm&quot;: &quot;A String&quot;, # The plain text search to use for the query. There is no support for multiple search terms. This uses the SEARCH functionality in BigQuery. For example, a search_term = &#x27;ERROR&#x27; would result in the following SQL:SELECT * FROM resource WHERE SEARCH(resource, &#x27;ERROR&#x27;) LIMIT 100
261 },
262 &quot;sqlQueryText&quot;: &quot;A String&quot;, # 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.
263 },
264 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was last updated.
265 &quot;visibility&quot;: &quot;A String&quot;, # Required. The visibility status of this query, which determines its ownership.
266 }
267
268 savedQueryId: string, Optional. The ID to use for the saved query, which will become the final component of the saved query&#x27;s resource name.If the saved_query_id is not provided, the system will generate an alphanumeric ID.The saved_query_id is limited to 100 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, periods.First character has to be alphanumeric.
269 x__xgafv: string, V1 error format.
270 Allowed values
271 1 - v1 error format
272 2 - v2 error format
273
274 Returns:
275 An object of the form:
276
277 { # Describes a query that has been saved by a user.
278 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was created.
279 &quot;description&quot;: &quot;A String&quot;, # Optional. A human readable description of the saved query.
280 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user specified title for the SavedQuery.
281 &quot;loggingQuery&quot;: { # Describes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results. # Logging query that can be executed in Logs Explorer or via Logging API.
282 &quot;filter&quot;: &quot;A String&quot;, # Required. An advanced query using the Logging Query Language (https://docs.cloud.google.com/logging/docs/view/logging-query-language). The maximum length of the filter is 20000 characters.
283 &quot;summaryFieldEnd&quot;: 42, # Characters will be counted from the end of the string.
284 &quot;summaryFieldStart&quot;: 42, # Characters will be counted from the start of the string.
285 &quot;summaryFields&quot;: [ # Optional. The set of summary fields to display for this saved query.
286 { # A field from the LogEntry that is added to the summary line (https://docs.cloud.google.com/logging/docs/view/logs-explorer-interface#preferences) for a query in the Logs Explorer.
287 &quot;field&quot;: &quot;A String&quot;, # Optional. The field from the LogEntry to include in the summary line, for example resource.type or jsonPayload.name.
288 },
289 ],
290 },
291 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the saved query.In the format: &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; For a list of supported locations, see Supported Regions (https://docs.cloud.google.com/logging/docs/region-support#bucket-regions)After the saved query is created, the location cannot be changed.If the user doesn&#x27;t provide a QUERY_ID, the system will generate an alphanumeric ID.
292 &quot;opsAnalyticsQuery&quot;: { # Describes a query that can be run in Log Analytics. # Analytics query that can be executed in Log Analytics.
293 &quot;queryBuilder&quot;: { # 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. # 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.
294 &quot;fieldSources&quot;: [ # Defines the items to include in the query result, analogous to a SQL SELECT clause.
295 { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema.
296 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
297 &quot;columnType&quot;: &quot;A String&quot;, # 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
298 &quot;field&quot;: &quot;A String&quot;, # 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`
299 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
300 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
301 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
302 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
303 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
304 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
305 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
306 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
307 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
308 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
309 &quot;&quot;,
310 ],
311 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
312 },
313 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
314 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
315 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
316 # Object with schema name: FieldSource
317 ],
318 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
319 },
320 },
321 },
322 ],
323 &quot;filter&quot;: { # A filter for a query. This equates to the WHERE clause in SQL. # The filter to use for the query. This equates to the WHERE clause in SQL.
324 &quot;childPredicates&quot;: [ # The children of the filter predicate. This equates to the branches of the filter predicate that could contain further nested leaves.
325 # Object with schema name: FilterPredicate
326 ],
327 &quot;leafPredicate&quot;: { # 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. # The leaves of the filter predicate. This equates to the last leaves of the filter predicate associated with an operator.
328 &quot;comparator&quot;: &quot;A String&quot;, # The comparison type to use for the filter.
329 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
330 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
331 &quot;columnType&quot;: &quot;A String&quot;, # 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
332 &quot;field&quot;: &quot;A String&quot;, # 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`
333 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
334 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
335 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
336 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
337 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
338 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
339 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
340 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
341 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
342 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
343 &quot;&quot;,
344 ],
345 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
346 },
347 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
348 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
349 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
350 # Object with schema name: FieldSource
351 ],
352 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
353 },
354 },
355 },
356 &quot;fieldSourceValue&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field. This will be the field that is set as the Right Hand Side of the filter.
357 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
358 &quot;columnType&quot;: &quot;A String&quot;, # 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
359 &quot;field&quot;: &quot;A String&quot;, # 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`
360 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
361 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
362 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
363 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
364 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
365 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
366 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
367 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
368 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
369 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
370 &quot;&quot;,
371 ],
372 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
373 },
374 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
375 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
376 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
377 # Object with schema name: FieldSource
378 ],
379 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
380 },
381 },
382 },
383 &quot;isNegation&quot;: True or False, # Determines if the NOT flag should be added to the comparator.
384 &quot;literalValue&quot;: &quot;&quot;, # The Value will be used to hold user defined constants set as the Right Hand Side of the filter.
385 },
386 &quot;operatorType&quot;: &quot;A String&quot;, # The operator type for the filter. Currently there is no support for multiple levels of nesting, so this will be a single value with no joining of different operator types
387 },
388 &quot;limit&quot;: &quot;A String&quot;, # The limit to use for the query. This equates to the LIMIT clause in SQL. A limit of 0 will be treated as not enabled.
389 &quot;orderBys&quot;: [ # The sort orders to use for the query. This equates to the ORDER BY clause in SQL.
390 { # A sort order for a query based on a column.
391 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field to sort on. Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
392 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
393 &quot;columnType&quot;: &quot;A String&quot;, # 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
394 &quot;field&quot;: &quot;A String&quot;, # 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`
395 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
396 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
397 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
398 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
399 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
400 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
401 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
402 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
403 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
404 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
405 &quot;&quot;,
406 ],
407 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
408 },
409 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
410 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
411 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
412 # Object with schema name: FieldSource
413 ],
414 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
415 },
416 },
417 },
418 &quot;sortOrderDirection&quot;: &quot;A String&quot;, # The sort order to use for the query.
419 },
420 ],
421 &quot;resourceNames&quot;: [ # Required. The view/resource to query. For now only a single view/resource will be sent, but there are plans to allow multiple views in the future. Marking as repeated for that purpose. Example: - &quot;projects/123/locations/global/buckets/456/views/_Default&quot; - &quot;projects/123/locations/global/metricBuckets/456/views/_Default&quot;
422 &quot;A String&quot;,
423 ],
424 &quot;searchTerm&quot;: &quot;A String&quot;, # The plain text search to use for the query. There is no support for multiple search terms. This uses the SEARCH functionality in BigQuery. For example, a search_term = &#x27;ERROR&#x27; would result in the following SQL:SELECT * FROM resource WHERE SEARCH(resource, &#x27;ERROR&#x27;) LIMIT 100
425 },
426 &quot;sqlQueryText&quot;: &quot;A String&quot;, # 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.
427 },
428 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was last updated.
429 &quot;visibility&quot;: &quot;A String&quot;, # Required. The visibility status of this query, which determines its ownership.
430 }</pre>
431 </div>
432
433 <div class="method">
434 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
435 <pre>Deletes an existing SavedQuery that was created by the user making the request.
436
437 Args:
438 name: string, Required. The full resource name of the saved query to delete. &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; &quot;organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; &quot;billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; &quot;folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; For example: &quot;projects/my-project/locations/global/savedQueries/my-saved-query&quot; (required)
439 x__xgafv: string, V1 error format.
440 Allowed values
441 1 - v1 error format
442 2 - v2 error format
443
444 Returns:
445 An object of the form:
446
447 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
448 }</pre>
449 </div>
450
451 <div class="method">
452 <code class="details" id="get">get(name, x__xgafv=None)</code>
453 <pre>Returns all data associated with the requested query.
454
455 Args:
456 name: string, Required. The resource name of the saved query. &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; &quot;organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; &quot;billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; &quot;folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; For example: &quot;projects/my-project/locations/global/savedQueries/my-saved-query&quot; (required)
457 x__xgafv: string, V1 error format.
458 Allowed values
459 1 - v1 error format
460 2 - v2 error format
461
462 Returns:
463 An object of the form:
464
465 { # Describes a query that has been saved by a user.
466 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was created.
467 &quot;description&quot;: &quot;A String&quot;, # Optional. A human readable description of the saved query.
468 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user specified title for the SavedQuery.
469 &quot;loggingQuery&quot;: { # Describes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results. # Logging query that can be executed in Logs Explorer or via Logging API.
470 &quot;filter&quot;: &quot;A String&quot;, # Required. An advanced query using the Logging Query Language (https://docs.cloud.google.com/logging/docs/view/logging-query-language). The maximum length of the filter is 20000 characters.
471 &quot;summaryFieldEnd&quot;: 42, # Characters will be counted from the end of the string.
472 &quot;summaryFieldStart&quot;: 42, # Characters will be counted from the start of the string.
473 &quot;summaryFields&quot;: [ # Optional. The set of summary fields to display for this saved query.
474 { # A field from the LogEntry that is added to the summary line (https://docs.cloud.google.com/logging/docs/view/logs-explorer-interface#preferences) for a query in the Logs Explorer.
475 &quot;field&quot;: &quot;A String&quot;, # Optional. The field from the LogEntry to include in the summary line, for example resource.type or jsonPayload.name.
476 },
477 ],
478 },
479 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the saved query.In the format: &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; For a list of supported locations, see Supported Regions (https://docs.cloud.google.com/logging/docs/region-support#bucket-regions)After the saved query is created, the location cannot be changed.If the user doesn&#x27;t provide a QUERY_ID, the system will generate an alphanumeric ID.
480 &quot;opsAnalyticsQuery&quot;: { # Describes a query that can be run in Log Analytics. # Analytics query that can be executed in Log Analytics.
481 &quot;queryBuilder&quot;: { # 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. # 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.
482 &quot;fieldSources&quot;: [ # Defines the items to include in the query result, analogous to a SQL SELECT clause.
483 { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema.
484 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
485 &quot;columnType&quot;: &quot;A String&quot;, # 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
486 &quot;field&quot;: &quot;A String&quot;, # 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`
487 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
488 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
489 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
490 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
491 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
492 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
493 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
494 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
495 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
496 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
497 &quot;&quot;,
498 ],
499 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
500 },
501 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
502 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
503 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
504 # Object with schema name: FieldSource
505 ],
506 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
507 },
508 },
509 },
510 ],
511 &quot;filter&quot;: { # A filter for a query. This equates to the WHERE clause in SQL. # The filter to use for the query. This equates to the WHERE clause in SQL.
512 &quot;childPredicates&quot;: [ # The children of the filter predicate. This equates to the branches of the filter predicate that could contain further nested leaves.
513 # Object with schema name: FilterPredicate
514 ],
515 &quot;leafPredicate&quot;: { # 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. # The leaves of the filter predicate. This equates to the last leaves of the filter predicate associated with an operator.
516 &quot;comparator&quot;: &quot;A String&quot;, # The comparison type to use for the filter.
517 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
518 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
519 &quot;columnType&quot;: &quot;A String&quot;, # 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
520 &quot;field&quot;: &quot;A String&quot;, # 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`
521 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
522 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
523 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
524 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
525 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
526 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
527 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
528 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
529 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
530 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
531 &quot;&quot;,
532 ],
533 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
534 },
535 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
536 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
537 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
538 # Object with schema name: FieldSource
539 ],
540 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
541 },
542 },
543 },
544 &quot;fieldSourceValue&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field. This will be the field that is set as the Right Hand Side of the filter.
545 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
546 &quot;columnType&quot;: &quot;A String&quot;, # 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
547 &quot;field&quot;: &quot;A String&quot;, # 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`
548 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
549 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
550 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
551 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
552 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
553 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
554 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
555 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
556 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
557 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
558 &quot;&quot;,
559 ],
560 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
561 },
562 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
563 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
564 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
565 # Object with schema name: FieldSource
566 ],
567 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
568 },
569 },
570 },
571 &quot;isNegation&quot;: True or False, # Determines if the NOT flag should be added to the comparator.
572 &quot;literalValue&quot;: &quot;&quot;, # The Value will be used to hold user defined constants set as the Right Hand Side of the filter.
573 },
574 &quot;operatorType&quot;: &quot;A String&quot;, # The operator type for the filter. Currently there is no support for multiple levels of nesting, so this will be a single value with no joining of different operator types
575 },
576 &quot;limit&quot;: &quot;A String&quot;, # The limit to use for the query. This equates to the LIMIT clause in SQL. A limit of 0 will be treated as not enabled.
577 &quot;orderBys&quot;: [ # The sort orders to use for the query. This equates to the ORDER BY clause in SQL.
578 { # A sort order for a query based on a column.
579 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field to sort on. Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
580 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
581 &quot;columnType&quot;: &quot;A String&quot;, # 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
582 &quot;field&quot;: &quot;A String&quot;, # 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`
583 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
584 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
585 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
586 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
587 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
588 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
589 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
590 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
591 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
592 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
593 &quot;&quot;,
594 ],
595 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
596 },
597 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
598 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
599 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
600 # Object with schema name: FieldSource
601 ],
602 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
603 },
604 },
605 },
606 &quot;sortOrderDirection&quot;: &quot;A String&quot;, # The sort order to use for the query.
607 },
608 ],
609 &quot;resourceNames&quot;: [ # Required. The view/resource to query. For now only a single view/resource will be sent, but there are plans to allow multiple views in the future. Marking as repeated for that purpose. Example: - &quot;projects/123/locations/global/buckets/456/views/_Default&quot; - &quot;projects/123/locations/global/metricBuckets/456/views/_Default&quot;
610 &quot;A String&quot;,
611 ],
612 &quot;searchTerm&quot;: &quot;A String&quot;, # The plain text search to use for the query. There is no support for multiple search terms. This uses the SEARCH functionality in BigQuery. For example, a search_term = &#x27;ERROR&#x27; would result in the following SQL:SELECT * FROM resource WHERE SEARCH(resource, &#x27;ERROR&#x27;) LIMIT 100
613 },
614 &quot;sqlQueryText&quot;: &quot;A String&quot;, # 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.
615 },
616 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was last updated.
617 &quot;visibility&quot;: &quot;A String&quot;, # Required. The visibility status of this query, which determines its ownership.
618 }</pre>
619 </div>
620
621 <div class="method">
622 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
623 <pre>Lists the SavedQueries that were created by the user making the request.
624
625 Args:
626 parent: string, Required. The resource to which the listed queries belong. &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]&quot; &quot;organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]&quot; &quot;billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]&quot; &quot;folders/[FOLDER_ID]/locations/[LOCATION_ID]&quot; For example: &quot;projects/my-project/locations/us-central1&quot; Note: The locations portion of the resource must be specified. To get a list of all saved queries, a wildcard character - can be used for LOCATION_ID, for example: &quot;projects/my-project/locations/-&quot; (required)
627 filter: string, Optional. Specifies the type (&quot;Logging&quot; or &quot;OpsAnalytics&quot;) and the visibility (PRIVATE or SHARED) of the saved queries to list. If provided, the filter must contain either the type function or a visibility token, or both. If both are chosen, they can be placed in any order, but they must be joined by the AND operator or the empty character.The two supported type function calls are: type(&quot;Logging&quot;) type(&quot;OpsAnalytics&quot;)The two supported visibility tokens are: visibility = PRIVATE visibility = SHAREDFor example:type(&quot;Logging&quot;) AND visibility = PRIVATE visibility=SHARED type(&quot;OpsAnalytics&quot;) type(&quot;OpsAnalytics)&quot; visibility = PRIVATE visibility = SHARED
628 pageSize: integer, Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.
629 pageToken: string, Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.
630 x__xgafv: string, V1 error format.
631 Allowed values
632 1 - v1 error format
633 2 - v2 error format
634
635 Returns:
636 An object of the form:
637
638 { # The response from ListSavedQueries.
639 &quot;nextPageToken&quot;: &quot;A String&quot;, # If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken.
640 &quot;savedQueries&quot;: [ # A list of saved queries.
641 { # Describes a query that has been saved by a user.
642 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was created.
643 &quot;description&quot;: &quot;A String&quot;, # Optional. A human readable description of the saved query.
644 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user specified title for the SavedQuery.
645 &quot;loggingQuery&quot;: { # Describes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results. # Logging query that can be executed in Logs Explorer or via Logging API.
646 &quot;filter&quot;: &quot;A String&quot;, # Required. An advanced query using the Logging Query Language (https://docs.cloud.google.com/logging/docs/view/logging-query-language). The maximum length of the filter is 20000 characters.
647 &quot;summaryFieldEnd&quot;: 42, # Characters will be counted from the end of the string.
648 &quot;summaryFieldStart&quot;: 42, # Characters will be counted from the start of the string.
649 &quot;summaryFields&quot;: [ # Optional. The set of summary fields to display for this saved query.
650 { # A field from the LogEntry that is added to the summary line (https://docs.cloud.google.com/logging/docs/view/logs-explorer-interface#preferences) for a query in the Logs Explorer.
651 &quot;field&quot;: &quot;A String&quot;, # Optional. The field from the LogEntry to include in the summary line, for example resource.type or jsonPayload.name.
652 },
653 ],
654 },
655 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the saved query.In the format: &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; For a list of supported locations, see Supported Regions (https://docs.cloud.google.com/logging/docs/region-support#bucket-regions)After the saved query is created, the location cannot be changed.If the user doesn&#x27;t provide a QUERY_ID, the system will generate an alphanumeric ID.
656 &quot;opsAnalyticsQuery&quot;: { # Describes a query that can be run in Log Analytics. # Analytics query that can be executed in Log Analytics.
657 &quot;queryBuilder&quot;: { # 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. # 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.
658 &quot;fieldSources&quot;: [ # Defines the items to include in the query result, analogous to a SQL SELECT clause.
659 { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema.
660 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
661 &quot;columnType&quot;: &quot;A String&quot;, # 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
662 &quot;field&quot;: &quot;A String&quot;, # 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`
663 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
664 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
665 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
666 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
667 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
668 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
669 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
670 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
671 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
672 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
673 &quot;&quot;,
674 ],
675 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
676 },
677 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
678 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
679 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
680 # Object with schema name: FieldSource
681 ],
682 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
683 },
684 },
685 },
686 ],
687 &quot;filter&quot;: { # A filter for a query. This equates to the WHERE clause in SQL. # The filter to use for the query. This equates to the WHERE clause in SQL.
688 &quot;childPredicates&quot;: [ # The children of the filter predicate. This equates to the branches of the filter predicate that could contain further nested leaves.
689 # Object with schema name: FilterPredicate
690 ],
691 &quot;leafPredicate&quot;: { # 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. # The leaves of the filter predicate. This equates to the last leaves of the filter predicate associated with an operator.
692 &quot;comparator&quot;: &quot;A String&quot;, # The comparison type to use for the filter.
693 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
694 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
695 &quot;columnType&quot;: &quot;A String&quot;, # 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
696 &quot;field&quot;: &quot;A String&quot;, # 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`
697 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
698 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
699 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
700 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
701 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
702 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
703 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
704 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
705 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
706 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
707 &quot;&quot;,
708 ],
709 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
710 },
711 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
712 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
713 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
714 # Object with schema name: FieldSource
715 ],
716 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
717 },
718 },
719 },
720 &quot;fieldSourceValue&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field. This will be the field that is set as the Right Hand Side of the filter.
721 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
722 &quot;columnType&quot;: &quot;A String&quot;, # 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
723 &quot;field&quot;: &quot;A String&quot;, # 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`
724 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
725 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
726 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
727 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
728 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
729 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
730 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
731 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
732 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
733 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
734 &quot;&quot;,
735 ],
736 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
737 },
738 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
739 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
740 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
741 # Object with schema name: FieldSource
742 ],
743 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
744 },
745 },
746 },
747 &quot;isNegation&quot;: True or False, # Determines if the NOT flag should be added to the comparator.
748 &quot;literalValue&quot;: &quot;&quot;, # The Value will be used to hold user defined constants set as the Right Hand Side of the filter.
749 },
750 &quot;operatorType&quot;: &quot;A String&quot;, # The operator type for the filter. Currently there is no support for multiple levels of nesting, so this will be a single value with no joining of different operator types
751 },
752 &quot;limit&quot;: &quot;A String&quot;, # The limit to use for the query. This equates to the LIMIT clause in SQL. A limit of 0 will be treated as not enabled.
753 &quot;orderBys&quot;: [ # The sort orders to use for the query. This equates to the ORDER BY clause in SQL.
754 { # A sort order for a query based on a column.
755 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field to sort on. Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
756 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
757 &quot;columnType&quot;: &quot;A String&quot;, # 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
758 &quot;field&quot;: &quot;A String&quot;, # 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`
759 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
760 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
761 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
762 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
763 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
764 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
765 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
766 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
767 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
768 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
769 &quot;&quot;,
770 ],
771 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
772 },
773 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
774 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
775 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
776 # Object with schema name: FieldSource
777 ],
778 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
779 },
780 },
781 },
782 &quot;sortOrderDirection&quot;: &quot;A String&quot;, # The sort order to use for the query.
783 },
784 ],
785 &quot;resourceNames&quot;: [ # Required. The view/resource to query. For now only a single view/resource will be sent, but there are plans to allow multiple views in the future. Marking as repeated for that purpose. Example: - &quot;projects/123/locations/global/buckets/456/views/_Default&quot; - &quot;projects/123/locations/global/metricBuckets/456/views/_Default&quot;
786 &quot;A String&quot;,
787 ],
788 &quot;searchTerm&quot;: &quot;A String&quot;, # The plain text search to use for the query. There is no support for multiple search terms. This uses the SEARCH functionality in BigQuery. For example, a search_term = &#x27;ERROR&#x27; would result in the following SQL:SELECT * FROM resource WHERE SEARCH(resource, &#x27;ERROR&#x27;) LIMIT 100
789 },
790 &quot;sqlQueryText&quot;: &quot;A String&quot;, # 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.
791 },
792 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was last updated.
793 &quot;visibility&quot;: &quot;A String&quot;, # Required. The visibility status of this query, which determines its ownership.
794 },
795 ],
796 &quot;unreachable&quot;: [ # The unreachable resources. It can be either 1) a saved query if a specific query is unreachable or 2) a location if a specific location is unreachabe. &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]&quot; For example: &quot;projects/my-project/locations/global/savedQueries/12345678&quot; &quot;projects/my-project/locations/global&quot; If there are unreachable resources, the response will first return pages that contain saved queries, and then return pages that contain the unreachable resources.
797 &quot;A String&quot;,
798 ],
799 }</pre>
800 </div>
801
802 <div class="method">
803 <code class="details" id="list_next">list_next()</code>
804 <pre>Retrieves the next page of results.
805
806 Args:
807 previous_request: The request for the previous page. (required)
808 previous_response: The response from the request for the previous page. (required)
809
810 Returns:
811 A request object that you can call &#x27;execute()&#x27; on to request the next
812 page. Returns None if there are no more items in the collection.
813 </pre>
814 </div>
815
816 <div class="method">
817 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
818 <pre>Updates an existing SavedQuery.
819
820 Args:
821 name: string, Output only. Resource name of the saved query.In the format: &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; For a list of supported locations, see Supported Regions (https://docs.cloud.google.com/logging/docs/region-support#bucket-regions)After the saved query is created, the location cannot be changed.If the user doesn&#x27;t provide a QUERY_ID, the system will generate an alphanumeric ID. (required)
822 body: object, The request body.
823 The object takes the form of:
824
825 { # Describes a query that has been saved by a user.
826 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was created.
827 &quot;description&quot;: &quot;A String&quot;, # Optional. A human readable description of the saved query.
828 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user specified title for the SavedQuery.
829 &quot;loggingQuery&quot;: { # Describes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results. # Logging query that can be executed in Logs Explorer or via Logging API.
830 &quot;filter&quot;: &quot;A String&quot;, # Required. An advanced query using the Logging Query Language (https://docs.cloud.google.com/logging/docs/view/logging-query-language). The maximum length of the filter is 20000 characters.
831 &quot;summaryFieldEnd&quot;: 42, # Characters will be counted from the end of the string.
832 &quot;summaryFieldStart&quot;: 42, # Characters will be counted from the start of the string.
833 &quot;summaryFields&quot;: [ # Optional. The set of summary fields to display for this saved query.
834 { # A field from the LogEntry that is added to the summary line (https://docs.cloud.google.com/logging/docs/view/logs-explorer-interface#preferences) for a query in the Logs Explorer.
835 &quot;field&quot;: &quot;A String&quot;, # Optional. The field from the LogEntry to include in the summary line, for example resource.type or jsonPayload.name.
836 },
837 ],
838 },
839 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the saved query.In the format: &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; For a list of supported locations, see Supported Regions (https://docs.cloud.google.com/logging/docs/region-support#bucket-regions)After the saved query is created, the location cannot be changed.If the user doesn&#x27;t provide a QUERY_ID, the system will generate an alphanumeric ID.
840 &quot;opsAnalyticsQuery&quot;: { # Describes a query that can be run in Log Analytics. # Analytics query that can be executed in Log Analytics.
841 &quot;queryBuilder&quot;: { # 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. # 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.
842 &quot;fieldSources&quot;: [ # Defines the items to include in the query result, analogous to a SQL SELECT clause.
843 { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema.
844 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
845 &quot;columnType&quot;: &quot;A String&quot;, # 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
846 &quot;field&quot;: &quot;A String&quot;, # 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`
847 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
848 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
849 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
850 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
851 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
852 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
853 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
854 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
855 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
856 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
857 &quot;&quot;,
858 ],
859 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
860 },
861 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
862 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
863 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
864 # Object with schema name: FieldSource
865 ],
866 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
867 },
868 },
869 },
870 ],
871 &quot;filter&quot;: { # A filter for a query. This equates to the WHERE clause in SQL. # The filter to use for the query. This equates to the WHERE clause in SQL.
872 &quot;childPredicates&quot;: [ # The children of the filter predicate. This equates to the branches of the filter predicate that could contain further nested leaves.
873 # Object with schema name: FilterPredicate
874 ],
875 &quot;leafPredicate&quot;: { # 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. # The leaves of the filter predicate. This equates to the last leaves of the filter predicate associated with an operator.
876 &quot;comparator&quot;: &quot;A String&quot;, # The comparison type to use for the filter.
877 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
878 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
879 &quot;columnType&quot;: &quot;A String&quot;, # 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
880 &quot;field&quot;: &quot;A String&quot;, # 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`
881 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
882 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
883 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
884 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
885 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
886 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
887 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
888 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
889 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
890 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
891 &quot;&quot;,
892 ],
893 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
894 },
895 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
896 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
897 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
898 # Object with schema name: FieldSource
899 ],
900 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
901 },
902 },
903 },
904 &quot;fieldSourceValue&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field. This will be the field that is set as the Right Hand Side of the filter.
905 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
906 &quot;columnType&quot;: &quot;A String&quot;, # 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
907 &quot;field&quot;: &quot;A String&quot;, # 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`
908 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
909 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
910 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
911 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
912 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
913 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
914 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
915 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
916 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
917 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
918 &quot;&quot;,
919 ],
920 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
921 },
922 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
923 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
924 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
925 # Object with schema name: FieldSource
926 ],
927 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
928 },
929 },
930 },
931 &quot;isNegation&quot;: True or False, # Determines if the NOT flag should be added to the comparator.
932 &quot;literalValue&quot;: &quot;&quot;, # The Value will be used to hold user defined constants set as the Right Hand Side of the filter.
933 },
934 &quot;operatorType&quot;: &quot;A String&quot;, # The operator type for the filter. Currently there is no support for multiple levels of nesting, so this will be a single value with no joining of different operator types
935 },
936 &quot;limit&quot;: &quot;A String&quot;, # The limit to use for the query. This equates to the LIMIT clause in SQL. A limit of 0 will be treated as not enabled.
937 &quot;orderBys&quot;: [ # The sort orders to use for the query. This equates to the ORDER BY clause in SQL.
938 { # A sort order for a query based on a column.
939 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field to sort on. Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
940 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
941 &quot;columnType&quot;: &quot;A String&quot;, # 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
942 &quot;field&quot;: &quot;A String&quot;, # 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`
943 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
944 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
945 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
946 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
947 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
948 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
949 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
950 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
951 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
952 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
953 &quot;&quot;,
954 ],
955 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
956 },
957 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
958 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
959 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
960 # Object with schema name: FieldSource
961 ],
962 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
963 },
964 },
965 },
966 &quot;sortOrderDirection&quot;: &quot;A String&quot;, # The sort order to use for the query.
967 },
968 ],
969 &quot;resourceNames&quot;: [ # Required. The view/resource to query. For now only a single view/resource will be sent, but there are plans to allow multiple views in the future. Marking as repeated for that purpose. Example: - &quot;projects/123/locations/global/buckets/456/views/_Default&quot; - &quot;projects/123/locations/global/metricBuckets/456/views/_Default&quot;
970 &quot;A String&quot;,
971 ],
972 &quot;searchTerm&quot;: &quot;A String&quot;, # The plain text search to use for the query. There is no support for multiple search terms. This uses the SEARCH functionality in BigQuery. For example, a search_term = &#x27;ERROR&#x27; would result in the following SQL:SELECT * FROM resource WHERE SEARCH(resource, &#x27;ERROR&#x27;) LIMIT 100
973 },
974 &quot;sqlQueryText&quot;: &quot;A String&quot;, # 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.
975 },
976 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was last updated.
977 &quot;visibility&quot;: &quot;A String&quot;, # Required. The visibility status of this query, which determines its ownership.
978 }
979
980 updateMask: string, Required. A non-empty list of fields to change in the existing saved query. Fields are relative to the saved_query and new values for the fields are taken from the corresponding fields in the SavedQuery included in this request. Fields not mentioned in update_mask are not changed and are ignored in the request.To update all mutable fields, specify an update_mask of *.For example, to change the description and query filter text of a saved query, specify an update_mask of &quot;description, query.filter&quot;.
981 x__xgafv: string, V1 error format.
982 Allowed values
983 1 - v1 error format
984 2 - v2 error format
985
986 Returns:
987 An object of the form:
988
989 { # Describes a query that has been saved by a user.
990 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was created.
991 &quot;description&quot;: &quot;A String&quot;, # Optional. A human readable description of the saved query.
992 &quot;displayName&quot;: &quot;A String&quot;, # Required. The user specified title for the SavedQuery.
993 &quot;loggingQuery&quot;: { # Describes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results. # Logging query that can be executed in Logs Explorer or via Logging API.
994 &quot;filter&quot;: &quot;A String&quot;, # Required. An advanced query using the Logging Query Language (https://docs.cloud.google.com/logging/docs/view/logging-query-language). The maximum length of the filter is 20000 characters.
995 &quot;summaryFieldEnd&quot;: 42, # Characters will be counted from the end of the string.
996 &quot;summaryFieldStart&quot;: 42, # Characters will be counted from the start of the string.
997 &quot;summaryFields&quot;: [ # Optional. The set of summary fields to display for this saved query.
998 { # A field from the LogEntry that is added to the summary line (https://docs.cloud.google.com/logging/docs/view/logs-explorer-interface#preferences) for a query in the Logs Explorer.
999 &quot;field&quot;: &quot;A String&quot;, # Optional. The field from the LogEntry to include in the summary line, for example resource.type or jsonPayload.name.
1000 },
1001 ],
1002 },
1003 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the saved query.In the format: &quot;projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]&quot; For a list of supported locations, see Supported Regions (https://docs.cloud.google.com/logging/docs/region-support#bucket-regions)After the saved query is created, the location cannot be changed.If the user doesn&#x27;t provide a QUERY_ID, the system will generate an alphanumeric ID.
1004 &quot;opsAnalyticsQuery&quot;: { # Describes a query that can be run in Log Analytics. # Analytics query that can be executed in Log Analytics.
1005 &quot;queryBuilder&quot;: { # 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. # 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.
1006 &quot;fieldSources&quot;: [ # Defines the items to include in the query result, analogous to a SQL SELECT clause.
1007 { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema.
1008 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
1009 &quot;columnType&quot;: &quot;A String&quot;, # 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
1010 &quot;field&quot;: &quot;A String&quot;, # 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`
1011 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
1012 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
1013 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
1014 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
1015 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
1016 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
1017 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
1018 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
1019 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
1020 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
1021 &quot;&quot;,
1022 ],
1023 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
1024 },
1025 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
1026 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
1027 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
1028 # Object with schema name: FieldSource
1029 ],
1030 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
1031 },
1032 },
1033 },
1034 ],
1035 &quot;filter&quot;: { # A filter for a query. This equates to the WHERE clause in SQL. # The filter to use for the query. This equates to the WHERE clause in SQL.
1036 &quot;childPredicates&quot;: [ # The children of the filter predicate. This equates to the branches of the filter predicate that could contain further nested leaves.
1037 # Object with schema name: FilterPredicate
1038 ],
1039 &quot;leafPredicate&quot;: { # 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. # The leaves of the filter predicate. This equates to the last leaves of the filter predicate associated with an operator.
1040 &quot;comparator&quot;: &quot;A String&quot;, # The comparison type to use for the filter.
1041 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
1042 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
1043 &quot;columnType&quot;: &quot;A String&quot;, # 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
1044 &quot;field&quot;: &quot;A String&quot;, # 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`
1045 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
1046 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
1047 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
1048 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
1049 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
1050 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
1051 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
1052 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
1053 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
1054 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
1055 &quot;&quot;,
1056 ],
1057 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
1058 },
1059 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
1060 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
1061 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
1062 # Object with schema name: FieldSource
1063 ],
1064 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
1065 },
1066 },
1067 },
1068 &quot;fieldSourceValue&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field. This will be the field that is set as the Right Hand Side of the filter.
1069 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
1070 &quot;columnType&quot;: &quot;A String&quot;, # 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
1071 &quot;field&quot;: &quot;A String&quot;, # 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`
1072 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
1073 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
1074 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
1075 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
1076 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
1077 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
1078 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
1079 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
1080 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
1081 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
1082 &quot;&quot;,
1083 ],
1084 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
1085 },
1086 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
1087 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
1088 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
1089 # Object with schema name: FieldSource
1090 ],
1091 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
1092 },
1093 },
1094 },
1095 &quot;isNegation&quot;: True or False, # Determines if the NOT flag should be added to the comparator.
1096 &quot;literalValue&quot;: &quot;&quot;, # The Value will be used to hold user defined constants set as the Right Hand Side of the filter.
1097 },
1098 &quot;operatorType&quot;: &quot;A String&quot;, # The operator type for the filter. Currently there is no support for multiple levels of nesting, so this will be a single value with no joining of different operator types
1099 },
1100 &quot;limit&quot;: &quot;A String&quot;, # The limit to use for the query. This equates to the LIMIT clause in SQL. A limit of 0 will be treated as not enabled.
1101 &quot;orderBys&quot;: [ # The sort orders to use for the query. This equates to the ORDER BY clause in SQL.
1102 { # A sort order for a query based on a column.
1103 &quot;fieldSource&quot;: { # A source that can be used to represent a &quot;field of data&quot; within various parts of a structured query, such as in SELECT, WHERE, or ORDER BY clauses. The term &quot;field of data&quot; is used here because it is not limited to literal fields in the underlying data schema. # The field to sort on. Can be one of the FieldSource types: field name, alias ref, variable ref, or a literal value.
1104 &quot;aliasRef&quot;: &quot;A String&quot;, # 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&#x27;s field_sources list, otherwise the model is invalid.
1105 &quot;columnType&quot;: &quot;A String&quot;, # 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
1106 &quot;field&quot;: &quot;A String&quot;, # 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`
1107 &quot;isJson&quot;: True or False, # 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 &#x27;json_payload&#x27; parent is of type JSON, and columnType=&#x27;STRING&#x27; if the &#x27;message&#x27; field is of type STRING.
1108 &quot;parentPath&quot;: &quot;A String&quot;, # 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 &#x27;labels&#x27; object). This is an empty string if the target field is at the root level.
1109 &quot;projectedField&quot;: { # 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&#x27;s field_sources list if no transformations or specific operation type are needed).A ProjectedField can represent either a field present in the data schema (specified via the field property) or a virtual field that is computed from other fields (specified via the virtual_field property). # A projected field option for when a user wants to use a field with some additional transformations such as casting or extractions.
1110 &quot;alias&quot;: &quot;A String&quot;, # 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: &quot;Test Alias&quot; Invalid alias examples are: - alias containing keywords: WHERE, SELECT, FROM, etc. - alias starting with a number: 1stAlias
1111 &quot;cast&quot;: &quot;A String&quot;, # The cast for the field. This can any SQL cast type. Examples: - STRING - CHAR - DATE - TIMESTAMP - DATETIME - INT - FLOAT
1112 &quot;field&quot;: &quot;A String&quot;, # Optional. The field name. This will be the field that is selected using the dot notation to display the drill down value.
1113 &quot;operation&quot;: &quot;A String&quot;, # Specifies the role of this field (direct selection, grouping, or aggregation).
1114 &quot;regexExtraction&quot;: &quot;A String&quot;, # 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: - &quot;.(autoscaler.*)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(.*(autoscaler.*)$)&quot;)in SQL. - &quot;\(test_value\)$&quot; will be converted to REGEXP_EXTRACT(JSON_VALUE(field),&quot;request(\(test_value\)$)&quot;) in SQL.
1115 &quot;sqlAggregationFunction&quot;: { # Defines the aggregation function to apply to this field. This message is used only when operation is set to AGGREGATE. # The function to apply to the field.
1116 &quot;parameters&quot;: [ # Optional. Parameters to be applied to the aggregation. Aggregations that support or require parameters are listed above.
1117 &quot;&quot;,
1118 ],
1119 &quot;type&quot;: &quot;A String&quot;, # Required. Specifies the aggregation function. Use one of the following string identifiers: &quot;average&quot;: Computes the average (AVG). Applies only to numeric values. &quot;count&quot;: Counts the number of values (COUNT). &quot;count-distinct&quot;: Counts the number of distinct values (COUNT DISTINCT). &quot;count-distinct-approx&quot;: Approximates the count of distinct values (APPROX_COUNT_DISTINCT). &quot;max&quot;: Finds the maximum value (MAX). Applies only to numeric values. &quot;min&quot;: Finds the minimum value (MIN). Applies only to numeric values. &quot;sum&quot;: Computes the sum (SUM). Applies only to numeric values.
1120 },
1121 &quot;truncationGranularity&quot;: &quot;A String&quot;, # 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.
1122 &quot;virtualField&quot;: { # A virtual field is a field that is not physically present in the underlying data schema, but is created through specific operations within the query builder model based on other fields in the schema. # Optional. A virtual field definition, used in place of field to define a field that is computed from other fields rather than being directly present in the data schema.For example, a virtual field can be defined using COALESCE to select the first non-null value from a list of fields.If virtual_field is set, field must not be set.
1123 &quot;underlyingFieldSources&quot;: [ # The field sources that will be used to create the virtual field, based on the semantics of the virtual field type.The field sources must follow these rules, based on the virtual field type: - For VIRTUAL_FIELD_TYPE_UNSPECIFIED, this field must be empty. - For COALESCE, this field must be non-empty and include a minimum of two field sources. The underlying field sources must be actual projected fields that represent actual schema fields and that must not be transformed and aggregated in any way, except for casting. The type of all the underlying field sources must be equivalent so that picking one of them would result in the same value type.
1124 # Object with schema name: FieldSource
1125 ],
1126 &quot;virtualFieldType&quot;: &quot;A String&quot;, # Required. The type of the virtual field.
1127 },
1128 },
1129 },
1130 &quot;sortOrderDirection&quot;: &quot;A String&quot;, # The sort order to use for the query.
1131 },
1132 ],
1133 &quot;resourceNames&quot;: [ # Required. The view/resource to query. For now only a single view/resource will be sent, but there are plans to allow multiple views in the future. Marking as repeated for that purpose. Example: - &quot;projects/123/locations/global/buckets/456/views/_Default&quot; - &quot;projects/123/locations/global/metricBuckets/456/views/_Default&quot;
1134 &quot;A String&quot;,
1135 ],
1136 &quot;searchTerm&quot;: &quot;A String&quot;, # The plain text search to use for the query. There is no support for multiple search terms. This uses the SEARCH functionality in BigQuery. For example, a search_term = &#x27;ERROR&#x27; would result in the following SQL:SELECT * FROM resource WHERE SEARCH(resource, &#x27;ERROR&#x27;) LIMIT 100
1137 },
1138 &quot;sqlQueryText&quot;: &quot;A String&quot;, # 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.
1139 },
1140 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp when the saved query was last updated.
1141 &quot;visibility&quot;: &quot;A String&quot;, # Required. The visibility status of this query, which determines its ownership.
1142 }</pre>
1143 </div>
1144
1145 </body></html>