feat: add LookerGoldenQuery to Context · googleapis/googleapis@80509f2
@@ -101,6 +101,12 @@ message Context {
101101repeated ExampleQuery example_queries = 5
102102 [(google.api.field_behavior) = OPTIONAL];
103103104+// Optional. A list of golden queries, providing examples of relevant and
105+// commonly used Looker queries and their corresponding natural language
106+// queries optionally present.
107+repeated LookerGoldenQuery looker_golden_queries = 11
108+ [(google.api.field_behavior) = OPTIONAL];
109+104110// Optional. Term definitions (currently, only user authored)
105111repeated GlossaryTerm glossary_terms = 8
106112 [(google.api.field_behavior) = OPTIONAL];
@@ -129,6 +135,50 @@ message ExampleQuery {
129135string natural_language_question = 1 [(google.api.field_behavior) = OPTIONAL];
130136}
131137138+// A golden query for Looker, including natural language questions and a
139+// corresponding Looker Query. Analogous to ExampleQuery.
140+message LookerGoldenQuery {
141+// Optional. Natural language questions that a user might ask.
142+// For example: "How many orders were placed last month?"
143+repeated string natural_language_questions = 4
144+ [(google.api.field_behavior) = OPTIONAL];
145+146+// Optional. The Looker Query corresponding to the natural language questions.
147+LookerQuery looker_query = 5 [(google.api.field_behavior) = OPTIONAL];
148+}
149+150+// Looker Query Object
151+// [Looker API
152+// documentation](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query).
153+message LookerQuery {
154+// A Looker query filter.
155+message Filter {
156+// Required. The field to filter on.
157+string field = 1 [(google.api.field_behavior) = REQUIRED];
158+159+// Required. The value for the field to filter on.
160+string value = 2 [(google.api.field_behavior) = REQUIRED];
161+ }
162+163+// Required. The LookML model used to generate the query.
164+string model = 1 [(google.api.field_behavior) = REQUIRED];
165+166+// Required. The LookML explore used to generate the query.
167+string explore = 2 [(google.api.field_behavior) = REQUIRED];
168+169+// Optional. The fields to retrieve from the explore.
170+repeated string fields = 3 [(google.api.field_behavior) = OPTIONAL];
171+172+// Optional. The filters to apply to the explore.
173+repeated Filter filters = 4 [(google.api.field_behavior) = OPTIONAL];
174+175+// Optional. The sorts to apply to the explore.
176+repeated string sorts = 5 [(google.api.field_behavior) = OPTIONAL];
177+178+// Optional. Limit in the query.
179+optional string limit = 6 [(google.api.field_behavior) = OPTIONAL];
180+}
181+132182// Definition of a term within a specific domain.
133183message GlossaryTerm {
134184// Required. User friendly display name of the glossary term being defined.