diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto index 703ba3516b4..cde5593dedf 100644 --- a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto @@ -458,6 +458,10 @@ message SystemMessage { // Optional. A message containing example queries. ExampleQueries example_queries = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A message containing clarification questions. + ClarificationMessage clarification = 14 + [(google.api.field_behavior) = OPTIONAL]; } // Identifies the group that the event belongs to. Similar events are deemed @@ -476,7 +480,7 @@ message TextMessage { // The text is a final response to the user question. FINAL_RESPONSE = 1; - // The text is a thinking plan generated by the thinking tool. + // The text is a thought from the model. THOUGHT = 2; // The text is an informational message about the agent's progress, such as @@ -492,6 +496,10 @@ message TextMessage { // Optional. The type of the text message. TextType text_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An opaque signature for a thought so it can be reused in + // subsequent requests. + bytes thought_signature = 3 [(google.api.field_behavior) = OPTIONAL]; } // A message produced during schema resolution. @@ -583,6 +591,16 @@ message DataResult { // are represented as lists or structs. repeated google.protobuf.Struct data = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Formatted representation of the data, when applicable. + // Each row is a struct that directly corresponds to the row at the same index + // within the `data` field. Its values are string representations of the + // original data, formatted according to data source specifications (e.g., + // "$1,234.56" for currency). Columns without formatting will default to + // their raw value representation. If no columns have formatting rules, this + // field will be empty. + repeated google.protobuf.Struct formatted_data = 6 + [(google.api.field_behavior) = OPTIONAL]; } // A BigQuery job executed by the system. @@ -731,6 +749,58 @@ message ErrorMessage { string text = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Represents a single question to the user to help clarify their query. +message ClarificationQuestion { + // The selection mode for the clarification question. + enum SelectionMode { + // Unspecified selection mode. + SELECTION_MODE_UNSPECIFIED = 0; + + // The user can select only one option. + SINGLE_SELECT = 1; + + // The user can select multiple options. + MULTI_SELECT = 2; + } + + // The type of clarification question. + // This enum may be extended with new values in the future. + enum ClarificationQuestionType { + // Unspecified clarification question type. + CLARIFICATION_QUESTION_TYPE_UNSPECIFIED = 0; + + // The clarification question is for filter values. + FILTER_VALUES = 1; + + // The clarification question is for data fields. This is a generic term + // encompassing SQL columns, Looker fields (dimensions/measures), or + // nested data structure properties. + FIELDS = 2; + } + + // Required. The natural language question to ask the user. + string question = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The selection mode for this question. + SelectionMode selection_mode = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of distinct options for the user to choose from. + // The number of options is limited to a maximum of 5. + repeated string options = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The type of clarification question. + ClarificationQuestionType clarification_question_type = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A message of questions to help clarify the user's query. This is returned +// when the system cannot confidently answer the user's question. +message ClarificationMessage { + // Required. A batch of clarification questions to ask the user. + repeated ClarificationQuestion questions = 1 + [(google.api.field_behavior) = REQUIRED]; +} + // A message containing derived and authored example queries. message ExampleQueries { // Optional. A list of derived and authored example queries, providing diff --git a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_chat_service.proto b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_chat_service.proto index 0502a6ebeab..a9cc7ca7237 100644 --- a/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_chat_service.proto +++ b/packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_chat_service.proto @@ -458,6 +458,10 @@ message SystemMessage { // Optional. A message containing example queries. ExampleQueries example_queries = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A message containing clarification questions. + ClarificationMessage clarification = 14 + [(google.api.field_behavior) = OPTIONAL]; } // Identifies the group that the event belongs to. Similar events are deemed @@ -476,7 +480,7 @@ message TextMessage { // The text is a final response to the user question. FINAL_RESPONSE = 1; - // The text is a thinking plan generated by the thinking tool. + // The text is a thought from the model. THOUGHT = 2; // The text is an informational message about the agent's progress, such as @@ -492,6 +496,10 @@ message TextMessage { // Optional. The type of the text message. TextType text_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An opaque signature for a thought so it can be reused in + // subsequent requests. + bytes thought_signature = 3 [(google.api.field_behavior) = OPTIONAL]; } // A message produced during schema resolution. @@ -583,6 +591,16 @@ message DataResult { // are represented as lists or structs. repeated google.protobuf.Struct data = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Formatted representation of the data, when applicable. + // Each row is a struct that directly corresponds to the row at the same index + // within the `data` field. Its values are string representations of the + // original data, formatted according to data source specifications (e.g., + // "$1,234.56" for currency). Columns without formatting will default to + // their raw value representation. If no columns have formatting rules, this + // field will be empty. + repeated google.protobuf.Struct formatted_data = 6 + [(google.api.field_behavior) = OPTIONAL]; } // A BigQuery job executed by the system. @@ -731,6 +749,58 @@ message ErrorMessage { string text = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Represents a single question to the user to help clarify their query. +message ClarificationQuestion { + // The selection mode for the clarification question. + enum SelectionMode { + // Unspecified selection mode. + SELECTION_MODE_UNSPECIFIED = 0; + + // The user can select only one option. + SINGLE_SELECT = 1; + + // The user can select multiple options. + MULTI_SELECT = 2; + } + + // The type of clarification question. + // This enum may be extended with new values in the future. + enum ClarificationQuestionType { + // Unspecified clarification question type. + CLARIFICATION_QUESTION_TYPE_UNSPECIFIED = 0; + + // The clarification question is for filter values. + FILTER_VALUES = 1; + + // The clarification question is for data fields. This is a generic term + // encompassing SQL columns, Looker fields (dimensions/measures), or + // nested data structure properties. + FIELDS = 2; + } + + // Required. The natural language question to ask the user. + string question = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The selection mode for this question. + SelectionMode selection_mode = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of distinct options for the user to choose from. + // The number of options is limited to a maximum of 5. + repeated string options = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The type of clarification question. + ClarificationQuestionType clarification_question_type = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A message of questions to help clarify the user's query. This is returned +// when the system cannot confidently answer the user's question. +message ClarificationMessage { + // Required. A batch of clarification questions to ask the user. + repeated ClarificationQuestion questions = 1 + [(google.api.field_behavior) = REQUIRED]; +} + // A message containing derived and authored example queries. message ExampleQueries { // Optional. A list of derived and authored example queries, providing diff --git a/packages/google-cloud-geminidataanalytics/protos/protos.d.ts b/packages/google-cloud-geminidataanalytics/protos/protos.d.ts index 8bc33da85bd..b68b5c1af86 100644 --- a/packages/google-cloud-geminidataanalytics/protos/protos.d.ts +++ b/packages/google-cloud-geminidataanalytics/protos/protos.d.ts @@ -8629,6 +8629,9 @@ export namespace google { /** SystemMessage exampleQueries */ exampleQueries?: (google.cloud.geminidataanalytics.v1alpha.IExampleQueries|null); + /** SystemMessage clarification */ + clarification?: (google.cloud.geminidataanalytics.v1alpha.IClarificationMessage|null); + /** SystemMessage groupId */ groupId?: (number|null); } @@ -8663,11 +8666,14 @@ export namespace google { /** SystemMessage exampleQueries. */ public exampleQueries?: (google.cloud.geminidataanalytics.v1alpha.IExampleQueries|null); + /** SystemMessage clarification. */ + public clarification?: (google.cloud.geminidataanalytics.v1alpha.IClarificationMessage|null); + /** SystemMessage groupId. */ public groupId?: (number|null); /** SystemMessage kind. */ - public kind?: ("text"|"schema"|"data"|"analysis"|"chart"|"error"|"exampleQueries"); + public kind?: ("text"|"schema"|"data"|"analysis"|"chart"|"error"|"exampleQueries"|"clarification"); /** * Creates a new SystemMessage instance using the specified properties. @@ -8755,6 +8761,9 @@ export namespace google { /** TextMessage textType */ textType?: (google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType|keyof typeof google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType|null); + + /** TextMessage thoughtSignature */ + thoughtSignature?: (Uint8Array|Buffer|string|null); } /** Represents a TextMessage. */ @@ -8772,6 +8781,9 @@ export namespace google { /** TextMessage textType. */ public textType: (google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType|keyof typeof google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType); + /** TextMessage thoughtSignature. */ + public thoughtSignature: (Uint8Array|Buffer|string); + /** * Creates a new TextMessage instance using the specified properties. * @param [properties] Properties to set @@ -9414,6 +9426,9 @@ export namespace google { /** DataResult data */ data?: (google.protobuf.IStruct[]|null); + + /** DataResult formattedData */ + formattedData?: (google.protobuf.IStruct[]|null); } /** Represents a DataResult. */ @@ -9434,6 +9449,9 @@ export namespace google { /** DataResult data. */ public data: google.protobuf.IStruct[]; + /** DataResult formattedData. */ + public formattedData: google.protobuf.IStruct[]; + /** * Creates a new DataResult instance using the specified properties. * @param [properties] Properties to set @@ -10405,6 +10423,235 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ClarificationQuestion. */ + interface IClarificationQuestion { + + /** ClarificationQuestion question */ + question?: (string|null); + + /** ClarificationQuestion selectionMode */ + selectionMode?: (google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.SelectionMode|keyof typeof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.SelectionMode|null); + + /** ClarificationQuestion options */ + options?: (string[]|null); + + /** ClarificationQuestion clarificationQuestionType */ + clarificationQuestionType?: (google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.ClarificationQuestionType|keyof typeof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.ClarificationQuestionType|null); + } + + /** Represents a ClarificationQuestion. */ + class ClarificationQuestion implements IClarificationQuestion { + + /** + * Constructs a new ClarificationQuestion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IClarificationQuestion); + + /** ClarificationQuestion question. */ + public question: string; + + /** ClarificationQuestion selectionMode. */ + public selectionMode: (google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.SelectionMode|keyof typeof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.SelectionMode); + + /** ClarificationQuestion options. */ + public options: string[]; + + /** ClarificationQuestion clarificationQuestionType. */ + public clarificationQuestionType: (google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.ClarificationQuestionType|keyof typeof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.ClarificationQuestionType); + + /** + * Creates a new ClarificationQuestion instance using the specified properties. + * @param [properties] Properties to set + * @returns ClarificationQuestion instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IClarificationQuestion): google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion; + + /** + * Encodes the specified ClarificationQuestion message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.verify|verify} messages. + * @param message ClarificationQuestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IClarificationQuestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClarificationQuestion message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.verify|verify} messages. + * @param message ClarificationQuestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IClarificationQuestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClarificationQuestion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClarificationQuestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion; + + /** + * Decodes a ClarificationQuestion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClarificationQuestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion; + + /** + * Verifies a ClarificationQuestion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClarificationQuestion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClarificationQuestion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion; + + /** + * Creates a plain object from a ClarificationQuestion message. Also converts values to other types if specified. + * @param message ClarificationQuestion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClarificationQuestion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClarificationQuestion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClarificationQuestion { + + /** SelectionMode enum. */ + enum SelectionMode { + SELECTION_MODE_UNSPECIFIED = 0, + SINGLE_SELECT = 1, + MULTI_SELECT = 2 + } + + /** ClarificationQuestionType enum. */ + enum ClarificationQuestionType { + CLARIFICATION_QUESTION_TYPE_UNSPECIFIED = 0, + FILTER_VALUES = 1, + FIELDS = 2 + } + } + + /** Properties of a ClarificationMessage. */ + interface IClarificationMessage { + + /** ClarificationMessage questions */ + questions?: (google.cloud.geminidataanalytics.v1alpha.IClarificationQuestion[]|null); + } + + /** Represents a ClarificationMessage. */ + class ClarificationMessage implements IClarificationMessage { + + /** + * Constructs a new ClarificationMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1alpha.IClarificationMessage); + + /** ClarificationMessage questions. */ + public questions: google.cloud.geminidataanalytics.v1alpha.IClarificationQuestion[]; + + /** + * Creates a new ClarificationMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ClarificationMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1alpha.IClarificationMessage): google.cloud.geminidataanalytics.v1alpha.ClarificationMessage; + + /** + * Encodes the specified ClarificationMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.verify|verify} messages. + * @param message ClarificationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1alpha.IClarificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClarificationMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.verify|verify} messages. + * @param message ClarificationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1alpha.IClarificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClarificationMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClarificationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1alpha.ClarificationMessage; + + /** + * Decodes a ClarificationMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClarificationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1alpha.ClarificationMessage; + + /** + * Verifies a ClarificationMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClarificationMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClarificationMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1alpha.ClarificationMessage; + + /** + * Creates a plain object from a ClarificationMessage message. Also converts values to other types if specified. + * @param message ClarificationMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1alpha.ClarificationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClarificationMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClarificationMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an ExampleQueries. */ interface IExampleQueries { @@ -19212,6 +19459,9 @@ export namespace google { /** SystemMessage exampleQueries */ exampleQueries?: (google.cloud.geminidataanalytics.v1beta.IExampleQueries|null); + /** SystemMessage clarification */ + clarification?: (google.cloud.geminidataanalytics.v1beta.IClarificationMessage|null); + /** SystemMessage groupId */ groupId?: (number|null); } @@ -19246,11 +19496,14 @@ export namespace google { /** SystemMessage exampleQueries. */ public exampleQueries?: (google.cloud.geminidataanalytics.v1beta.IExampleQueries|null); + /** SystemMessage clarification. */ + public clarification?: (google.cloud.geminidataanalytics.v1beta.IClarificationMessage|null); + /** SystemMessage groupId. */ public groupId?: (number|null); /** SystemMessage kind. */ - public kind?: ("text"|"schema"|"data"|"analysis"|"chart"|"error"|"exampleQueries"); + public kind?: ("text"|"schema"|"data"|"analysis"|"chart"|"error"|"exampleQueries"|"clarification"); /** * Creates a new SystemMessage instance using the specified properties. @@ -19338,6 +19591,9 @@ export namespace google { /** TextMessage textType */ textType?: (google.cloud.geminidataanalytics.v1beta.TextMessage.TextType|keyof typeof google.cloud.geminidataanalytics.v1beta.TextMessage.TextType|null); + + /** TextMessage thoughtSignature */ + thoughtSignature?: (Uint8Array|Buffer|string|null); } /** Represents a TextMessage. */ @@ -19355,6 +19611,9 @@ export namespace google { /** TextMessage textType. */ public textType: (google.cloud.geminidataanalytics.v1beta.TextMessage.TextType|keyof typeof google.cloud.geminidataanalytics.v1beta.TextMessage.TextType); + /** TextMessage thoughtSignature. */ + public thoughtSignature: (Uint8Array|Buffer|string); + /** * Creates a new TextMessage instance using the specified properties. * @param [properties] Properties to set @@ -19997,6 +20256,9 @@ export namespace google { /** DataResult data */ data?: (google.protobuf.IStruct[]|null); + + /** DataResult formattedData */ + formattedData?: (google.protobuf.IStruct[]|null); } /** Represents a DataResult. */ @@ -20017,6 +20279,9 @@ export namespace google { /** DataResult data. */ public data: google.protobuf.IStruct[]; + /** DataResult formattedData. */ + public formattedData: google.protobuf.IStruct[]; + /** * Creates a new DataResult instance using the specified properties. * @param [properties] Properties to set @@ -20988,6 +21253,235 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ClarificationQuestion. */ + interface IClarificationQuestion { + + /** ClarificationQuestion question */ + question?: (string|null); + + /** ClarificationQuestion selectionMode */ + selectionMode?: (google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.SelectionMode|keyof typeof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.SelectionMode|null); + + /** ClarificationQuestion options */ + options?: (string[]|null); + + /** ClarificationQuestion clarificationQuestionType */ + clarificationQuestionType?: (google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.ClarificationQuestionType|keyof typeof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.ClarificationQuestionType|null); + } + + /** Represents a ClarificationQuestion. */ + class ClarificationQuestion implements IClarificationQuestion { + + /** + * Constructs a new ClarificationQuestion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IClarificationQuestion); + + /** ClarificationQuestion question. */ + public question: string; + + /** ClarificationQuestion selectionMode. */ + public selectionMode: (google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.SelectionMode|keyof typeof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.SelectionMode); + + /** ClarificationQuestion options. */ + public options: string[]; + + /** ClarificationQuestion clarificationQuestionType. */ + public clarificationQuestionType: (google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.ClarificationQuestionType|keyof typeof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.ClarificationQuestionType); + + /** + * Creates a new ClarificationQuestion instance using the specified properties. + * @param [properties] Properties to set + * @returns ClarificationQuestion instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IClarificationQuestion): google.cloud.geminidataanalytics.v1beta.ClarificationQuestion; + + /** + * Encodes the specified ClarificationQuestion message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.verify|verify} messages. + * @param message ClarificationQuestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IClarificationQuestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClarificationQuestion message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.verify|verify} messages. + * @param message ClarificationQuestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IClarificationQuestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClarificationQuestion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClarificationQuestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ClarificationQuestion; + + /** + * Decodes a ClarificationQuestion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClarificationQuestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ClarificationQuestion; + + /** + * Verifies a ClarificationQuestion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClarificationQuestion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClarificationQuestion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ClarificationQuestion; + + /** + * Creates a plain object from a ClarificationQuestion message. Also converts values to other types if specified. + * @param message ClarificationQuestion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ClarificationQuestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClarificationQuestion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClarificationQuestion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ClarificationQuestion { + + /** SelectionMode enum. */ + enum SelectionMode { + SELECTION_MODE_UNSPECIFIED = 0, + SINGLE_SELECT = 1, + MULTI_SELECT = 2 + } + + /** ClarificationQuestionType enum. */ + enum ClarificationQuestionType { + CLARIFICATION_QUESTION_TYPE_UNSPECIFIED = 0, + FILTER_VALUES = 1, + FIELDS = 2 + } + } + + /** Properties of a ClarificationMessage. */ + interface IClarificationMessage { + + /** ClarificationMessage questions */ + questions?: (google.cloud.geminidataanalytics.v1beta.IClarificationQuestion[]|null); + } + + /** Represents a ClarificationMessage. */ + class ClarificationMessage implements IClarificationMessage { + + /** + * Constructs a new ClarificationMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.geminidataanalytics.v1beta.IClarificationMessage); + + /** ClarificationMessage questions. */ + public questions: google.cloud.geminidataanalytics.v1beta.IClarificationQuestion[]; + + /** + * Creates a new ClarificationMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ClarificationMessage instance + */ + public static create(properties?: google.cloud.geminidataanalytics.v1beta.IClarificationMessage): google.cloud.geminidataanalytics.v1beta.ClarificationMessage; + + /** + * Encodes the specified ClarificationMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClarificationMessage.verify|verify} messages. + * @param message ClarificationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.geminidataanalytics.v1beta.IClarificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClarificationMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClarificationMessage.verify|verify} messages. + * @param message ClarificationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.geminidataanalytics.v1beta.IClarificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClarificationMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClarificationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.geminidataanalytics.v1beta.ClarificationMessage; + + /** + * Decodes a ClarificationMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClarificationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.geminidataanalytics.v1beta.ClarificationMessage; + + /** + * Verifies a ClarificationMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClarificationMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClarificationMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.geminidataanalytics.v1beta.ClarificationMessage; + + /** + * Creates a plain object from a ClarificationMessage message. Also converts values to other types if specified. + * @param message ClarificationMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.geminidataanalytics.v1beta.ClarificationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClarificationMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClarificationMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an ExampleQueries. */ interface IExampleQueries { diff --git a/packages/google-cloud-geminidataanalytics/protos/protos.js b/packages/google-cloud-geminidataanalytics/protos/protos.js index 0c5371e4968..3b7ea0b88f0 100644 --- a/packages/google-cloud-geminidataanalytics/protos/protos.js +++ b/packages/google-cloud-geminidataanalytics/protos/protos.js @@ -21154,6 +21154,7 @@ * @property {google.cloud.geminidataanalytics.v1alpha.IChartMessage|null} [chart] SystemMessage chart * @property {google.cloud.geminidataanalytics.v1alpha.IErrorMessage|null} [error] SystemMessage error * @property {google.cloud.geminidataanalytics.v1alpha.IExampleQueries|null} [exampleQueries] SystemMessage exampleQueries + * @property {google.cloud.geminidataanalytics.v1alpha.IClarificationMessage|null} [clarification] SystemMessage clarification * @property {number|null} [groupId] SystemMessage groupId */ @@ -21228,6 +21229,14 @@ */ SystemMessage.prototype.exampleQueries = null; + /** + * SystemMessage clarification. + * @member {google.cloud.geminidataanalytics.v1alpha.IClarificationMessage|null|undefined} clarification + * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage + * @instance + */ + SystemMessage.prototype.clarification = null; + /** * SystemMessage groupId. * @member {number|null|undefined} groupId @@ -21241,12 +21250,12 @@ /** * SystemMessage kind. - * @member {"text"|"schema"|"data"|"analysis"|"chart"|"error"|"exampleQueries"|undefined} kind + * @member {"text"|"schema"|"data"|"analysis"|"chart"|"error"|"exampleQueries"|"clarification"|undefined} kind * @memberof google.cloud.geminidataanalytics.v1alpha.SystemMessage * @instance */ Object.defineProperty(SystemMessage.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["text", "schema", "data", "analysis", "chart", "error", "exampleQueries"]), + get: $util.oneOfGetter($oneOfFields = ["text", "schema", "data", "analysis", "chart", "error", "exampleQueries", "clarification"]), set: $util.oneOfSetter($oneOfFields) }); @@ -21296,6 +21305,8 @@ writer.uint32(/* id 12, wireType 0 =*/96).int32(message.groupId); if (message.exampleQueries != null && Object.hasOwnProperty.call(message, "exampleQueries")) $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries.encode(message.exampleQueries, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.clarification != null && Object.hasOwnProperty.call(message, "clarification")) + $root.google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.encode(message.clarification, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; @@ -21360,6 +21371,10 @@ message.exampleQueries = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries.decode(reader, reader.uint32()); break; } + case 14: { + message.clarification = $root.google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.decode(reader, reader.uint32()); + break; + } case 12: { message.groupId = reader.int32(); break; @@ -21468,6 +21483,16 @@ return "exampleQueries." + error; } } + if (message.clarification != null && message.hasOwnProperty("clarification")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.verify(message.clarification); + if (error) + return "clarification." + error; + } + } if (message.groupId != null && message.hasOwnProperty("groupId")) { properties._groupId = 1; if (!$util.isInteger(message.groupId)) @@ -21523,6 +21548,11 @@ throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SystemMessage.exampleQueries: object expected"); message.exampleQueries = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries.fromObject(object.exampleQueries); } + if (object.clarification != null) { + if (typeof object.clarification !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.SystemMessage.clarification: object expected"); + message.clarification = $root.google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.fromObject(object.clarification); + } if (object.groupId != null) message.groupId = object.groupId | 0; return message; @@ -21581,6 +21611,11 @@ if (options.oneofs) object.kind = "exampleQueries"; } + if (message.clarification != null && message.hasOwnProperty("clarification")) { + object.clarification = $root.google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.toObject(message.clarification, options); + if (options.oneofs) + object.kind = "clarification"; + } return object; }; @@ -21621,6 +21656,7 @@ * @interface ITextMessage * @property {Array.|null} [parts] TextMessage parts * @property {google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType|null} [textType] TextMessage textType + * @property {Uint8Array|null} [thoughtSignature] TextMessage thoughtSignature */ /** @@ -21655,6 +21691,14 @@ */ TextMessage.prototype.textType = 0; + /** + * TextMessage thoughtSignature. + * @member {Uint8Array} thoughtSignature + * @memberof google.cloud.geminidataanalytics.v1alpha.TextMessage + * @instance + */ + TextMessage.prototype.thoughtSignature = $util.newBuffer([]); + /** * Creates a new TextMessage instance using the specified properties. * @function create @@ -21684,6 +21728,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.parts[i]); if (message.textType != null && Object.hasOwnProperty.call(message, "textType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.textType); + if (message.thoughtSignature != null && Object.hasOwnProperty.call(message, "thoughtSignature")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.thoughtSignature); return writer; }; @@ -21730,6 +21776,10 @@ message.textType = reader.int32(); break; } + case 3: { + message.thoughtSignature = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -21782,6 +21832,9 @@ case 3: break; } + if (message.thoughtSignature != null && message.hasOwnProperty("thoughtSignature")) + if (!(message.thoughtSignature && typeof message.thoughtSignature.length === "number" || $util.isString(message.thoughtSignature))) + return "thoughtSignature: buffer expected"; return null; }; @@ -21828,6 +21881,11 @@ message.textType = 3; break; } + if (object.thoughtSignature != null) + if (typeof object.thoughtSignature === "string") + $util.base64.decode(object.thoughtSignature, message.thoughtSignature = $util.newBuffer($util.base64.length(object.thoughtSignature)), 0); + else if (object.thoughtSignature.length >= 0) + message.thoughtSignature = object.thoughtSignature; return message; }; @@ -21846,8 +21904,16 @@ var object = {}; if (options.arrays || options.defaults) object.parts = []; - if (options.defaults) + if (options.defaults) { object.textType = options.enums === String ? "TEXT_TYPE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.thoughtSignature = ""; + else { + object.thoughtSignature = []; + if (options.bytes !== Array) + object.thoughtSignature = $util.newBuffer(object.thoughtSignature); + } + } if (message.parts && message.parts.length) { object.parts = []; for (var j = 0; j < message.parts.length; ++j) @@ -21855,6 +21921,8 @@ } if (message.textType != null && message.hasOwnProperty("textType")) object.textType = options.enums === String ? $root.google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType[message.textType] === undefined ? message.textType : $root.google.cloud.geminidataanalytics.v1alpha.TextMessage.TextType[message.textType] : message.textType; + if (message.thoughtSignature != null && message.hasOwnProperty("thoughtSignature")) + object.thoughtSignature = options.bytes === String ? $util.base64.encode(message.thoughtSignature, 0, message.thoughtSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.thoughtSignature) : message.thoughtSignature; return object; }; @@ -23294,6 +23362,7 @@ * @property {string|null} [name] DataResult name * @property {google.cloud.geminidataanalytics.v1alpha.ISchema|null} [schema] DataResult schema * @property {Array.|null} [data] DataResult data + * @property {Array.|null} [formattedData] DataResult formattedData */ /** @@ -23306,6 +23375,7 @@ */ function DataResult(properties) { this.data = []; + this.formattedData = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23336,6 +23406,14 @@ */ DataResult.prototype.data = $util.emptyArray; + /** + * DataResult formattedData. + * @member {Array.} formattedData + * @memberof google.cloud.geminidataanalytics.v1alpha.DataResult + * @instance + */ + DataResult.prototype.formattedData = $util.emptyArray; + /** * Creates a new DataResult instance using the specified properties. * @function create @@ -23367,6 +23445,9 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) $root.google.cloud.geminidataanalytics.v1alpha.Schema.encode(message.schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.formattedData != null && message.formattedData.length) + for (var i = 0; i < message.formattedData.length; ++i) + $root.google.protobuf.Struct.encode(message.formattedData[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -23417,6 +23498,12 @@ message.data.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); break; } + case 6: { + if (!(message.formattedData && message.formattedData.length)) + message.formattedData = []; + message.formattedData.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -23469,6 +23556,15 @@ return "data." + error; } } + if (message.formattedData != null && message.hasOwnProperty("formattedData")) { + if (!Array.isArray(message.formattedData)) + return "formattedData: array expected"; + for (var i = 0; i < message.formattedData.length; ++i) { + var error = $root.google.protobuf.Struct.verify(message.formattedData[i]); + if (error) + return "formattedData." + error; + } + } return null; }; @@ -23501,6 +23597,16 @@ message.data[i] = $root.google.protobuf.Struct.fromObject(object.data[i]); } } + if (object.formattedData) { + if (!Array.isArray(object.formattedData)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataResult.formattedData: array expected"); + message.formattedData = []; + for (var i = 0; i < object.formattedData.length; ++i) { + if (typeof object.formattedData[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.DataResult.formattedData: object expected"); + message.formattedData[i] = $root.google.protobuf.Struct.fromObject(object.formattedData[i]); + } + } return message; }; @@ -23517,8 +23623,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.data = []; + object.formattedData = []; + } if (options.defaults) { object.name = ""; object.schema = null; @@ -23532,6 +23640,11 @@ object.name = message.name; if (message.schema != null && message.hasOwnProperty("schema")) object.schema = $root.google.cloud.geminidataanalytics.v1alpha.Schema.toObject(message.schema, options); + if (message.formattedData && message.formattedData.length) { + object.formattedData = []; + for (var j = 0; j < message.formattedData.length; ++j) + object.formattedData[j] = $root.google.protobuf.Struct.toObject(message.formattedData[j], options); + } return object; }; @@ -25802,25 +25915,28 @@ return ErrorMessage; })(); - v1alpha.ExampleQueries = (function() { + v1alpha.ClarificationQuestion = (function() { /** - * Properties of an ExampleQueries. + * Properties of a ClarificationQuestion. * @memberof google.cloud.geminidataanalytics.v1alpha - * @interface IExampleQueries - * @property {Array.|null} [exampleQueries] ExampleQueries exampleQueries + * @interface IClarificationQuestion + * @property {string|null} [question] ClarificationQuestion question + * @property {google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.SelectionMode|null} [selectionMode] ClarificationQuestion selectionMode + * @property {Array.|null} [options] ClarificationQuestion options + * @property {google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.ClarificationQuestionType|null} [clarificationQuestionType] ClarificationQuestion clarificationQuestionType */ /** - * Constructs a new ExampleQueries. + * Constructs a new ClarificationQuestion. * @memberof google.cloud.geminidataanalytics.v1alpha - * @classdesc Represents an ExampleQueries. - * @implements IExampleQueries + * @classdesc Represents a ClarificationQuestion. + * @implements IClarificationQuestion * @constructor - * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1alpha.IClarificationQuestion=} [properties] Properties to set */ - function ExampleQueries(properties) { - this.exampleQueries = []; + function ClarificationQuestion(properties) { + this.options = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25828,80 +25944,122 @@ } /** - * ExampleQueries exampleQueries. - * @member {Array.} exampleQueries - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * ClarificationQuestion question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @instance */ - ExampleQueries.prototype.exampleQueries = $util.emptyArray; + ClarificationQuestion.prototype.question = ""; /** - * Creates a new ExampleQueries instance using the specified properties. + * ClarificationQuestion selectionMode. + * @member {google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.SelectionMode} selectionMode + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion + * @instance + */ + ClarificationQuestion.prototype.selectionMode = 0; + + /** + * ClarificationQuestion options. + * @member {Array.} options + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion + * @instance + */ + ClarificationQuestion.prototype.options = $util.emptyArray; + + /** + * ClarificationQuestion clarificationQuestionType. + * @member {google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.ClarificationQuestionType} clarificationQuestionType + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion + * @instance + */ + ClarificationQuestion.prototype.clarificationQuestionType = 0; + + /** + * Creates a new ClarificationQuestion instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @static - * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries instance + * @param {google.cloud.geminidataanalytics.v1alpha.IClarificationQuestion=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion} ClarificationQuestion instance */ - ExampleQueries.create = function create(properties) { - return new ExampleQueries(properties); + ClarificationQuestion.create = function create(properties) { + return new ClarificationQuestion(properties); }; /** - * Encodes the specified ExampleQueries message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQueries.verify|verify} messages. + * Encodes the specified ClarificationQuestion message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @static - * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries} message ExampleQueries message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1alpha.IClarificationQuestion} message ClarificationQuestion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExampleQueries.encode = function encode(message, writer) { + ClarificationQuestion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.exampleQueries != null && message.exampleQueries.length) - for (var i = 0; i < message.exampleQueries.length; ++i) - $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.encode(message.exampleQueries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.selectionMode != null && Object.hasOwnProperty.call(message, "selectionMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.selectionMode); + if (message.options != null && message.options.length) + for (var i = 0; i < message.options.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.options[i]); + if (message.clarificationQuestionType != null && Object.hasOwnProperty.call(message, "clarificationQuestionType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.clarificationQuestionType); return writer; }; /** - * Encodes the specified ExampleQueries message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQueries.verify|verify} messages. + * Encodes the specified ClarificationQuestion message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @static - * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries} message ExampleQueries message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1alpha.IClarificationQuestion} message ClarificationQuestion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExampleQueries.encodeDelimited = function encodeDelimited(message, writer) { + ClarificationQuestion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExampleQueries message from the specified reader or buffer. + * Decodes a ClarificationQuestion message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries + * @returns {google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion} ClarificationQuestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExampleQueries.decode = function decode(reader, length, error) { + ClarificationQuestion.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.exampleQueries && message.exampleQueries.length)) - message.exampleQueries = []; - message.exampleQueries.push($root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.decode(reader, reader.uint32())); + message.question = reader.string(); + break; + } + case 2: { + message.selectionMode = reader.int32(); + break; + } + case 3: { + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(reader.string()); + break; + } + case 4: { + message.clarificationQuestionType = reader.int32(); break; } default: @@ -25913,140 +26071,241 @@ }; /** - * Decodes an ExampleQueries message from the specified reader or buffer, length delimited. + * Decodes a ClarificationQuestion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries + * @returns {google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion} ClarificationQuestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExampleQueries.decodeDelimited = function decodeDelimited(reader) { + ClarificationQuestion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExampleQueries message. + * Verifies a ClarificationQuestion message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExampleQueries.verify = function verify(message) { + ClarificationQuestion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { - if (!Array.isArray(message.exampleQueries)) - return "exampleQueries: array expected"; - for (var i = 0; i < message.exampleQueries.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.verify(message.exampleQueries[i]); - if (error) - return "exampleQueries." + error; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.selectionMode != null && message.hasOwnProperty("selectionMode")) + switch (message.selectionMode) { + default: + return "selectionMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.options != null && message.hasOwnProperty("options")) { + if (!Array.isArray(message.options)) + return "options: array expected"; + for (var i = 0; i < message.options.length; ++i) + if (!$util.isString(message.options[i])) + return "options: string[] expected"; + } + if (message.clarificationQuestionType != null && message.hasOwnProperty("clarificationQuestionType")) + switch (message.clarificationQuestionType) { + default: + return "clarificationQuestionType: enum value expected"; + case 0: + case 1: + case 2: + break; } - } return null; }; /** - * Creates an ExampleQueries message from a plain object. Also converts values to their respective internal types. + * Creates a ClarificationQuestion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries + * @returns {google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion} ClarificationQuestion */ - ExampleQueries.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries) + ClarificationQuestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion) return object; - var message = new $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries(); - if (object.exampleQueries) { - if (!Array.isArray(object.exampleQueries)) - throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ExampleQueries.exampleQueries: array expected"); - message.exampleQueries = []; - for (var i = 0; i < object.exampleQueries.length; ++i) { - if (typeof object.exampleQueries[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ExampleQueries.exampleQueries: object expected"); - message.exampleQueries[i] = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.fromObject(object.exampleQueries[i]); + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion(); + if (object.question != null) + message.question = String(object.question); + switch (object.selectionMode) { + default: + if (typeof object.selectionMode === "number") { + message.selectionMode = object.selectionMode; + break; + } + break; + case "SELECTION_MODE_UNSPECIFIED": + case 0: + message.selectionMode = 0; + break; + case "SINGLE_SELECT": + case 1: + message.selectionMode = 1; + break; + case "MULTI_SELECT": + case 2: + message.selectionMode = 2; + break; + } + if (object.options) { + if (!Array.isArray(object.options)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.options: array expected"); + message.options = []; + for (var i = 0; i < object.options.length; ++i) + message.options[i] = String(object.options[i]); + } + switch (object.clarificationQuestionType) { + default: + if (typeof object.clarificationQuestionType === "number") { + message.clarificationQuestionType = object.clarificationQuestionType; + break; } + break; + case "CLARIFICATION_QUESTION_TYPE_UNSPECIFIED": + case 0: + message.clarificationQuestionType = 0; + break; + case "FILTER_VALUES": + case 1: + message.clarificationQuestionType = 1; + break; + case "FIELDS": + case 2: + message.clarificationQuestionType = 2; + break; } return message; }; /** - * Creates a plain object from an ExampleQueries message. Also converts values to other types if specified. + * Creates a plain object from a ClarificationQuestion message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @static - * @param {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} message ExampleQueries + * @param {google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion} message ClarificationQuestion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExampleQueries.toObject = function toObject(message, options) { + ClarificationQuestion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.exampleQueries = []; - if (message.exampleQueries && message.exampleQueries.length) { - object.exampleQueries = []; - for (var j = 0; j < message.exampleQueries.length; ++j) - object.exampleQueries[j] = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.toObject(message.exampleQueries[j], options); + object.options = []; + if (options.defaults) { + object.question = ""; + object.selectionMode = options.enums === String ? "SELECTION_MODE_UNSPECIFIED" : 0; + object.clarificationQuestionType = options.enums === String ? "CLARIFICATION_QUESTION_TYPE_UNSPECIFIED" : 0; } + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.selectionMode != null && message.hasOwnProperty("selectionMode")) + object.selectionMode = options.enums === String ? $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.SelectionMode[message.selectionMode] === undefined ? message.selectionMode : $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.SelectionMode[message.selectionMode] : message.selectionMode; + if (message.options && message.options.length) { + object.options = []; + for (var j = 0; j < message.options.length; ++j) + object.options[j] = message.options[j]; + } + if (message.clarificationQuestionType != null && message.hasOwnProperty("clarificationQuestionType")) + object.clarificationQuestionType = options.enums === String ? $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.ClarificationQuestionType[message.clarificationQuestionType] === undefined ? message.clarificationQuestionType : $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.ClarificationQuestionType[message.clarificationQuestionType] : message.clarificationQuestionType; return object; }; /** - * Converts this ExampleQueries to JSON. + * Converts this ClarificationQuestion to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @instance * @returns {Object.} JSON object */ - ExampleQueries.prototype.toJSON = function toJSON() { + ClarificationQuestion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ExampleQueries + * Gets the default type url for ClarificationQuestion * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ExampleQueries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClarificationQuestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ExampleQueries"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion"; }; - return ExampleQueries; + /** + * SelectionMode enum. + * @name google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.SelectionMode + * @enum {number} + * @property {number} SELECTION_MODE_UNSPECIFIED=0 SELECTION_MODE_UNSPECIFIED value + * @property {number} SINGLE_SELECT=1 SINGLE_SELECT value + * @property {number} MULTI_SELECT=2 MULTI_SELECT value + */ + ClarificationQuestion.SelectionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SELECTION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SINGLE_SELECT"] = 1; + values[valuesById[2] = "MULTI_SELECT"] = 2; + return values; + })(); + + /** + * ClarificationQuestionType enum. + * @name google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.ClarificationQuestionType + * @enum {number} + * @property {number} CLARIFICATION_QUESTION_TYPE_UNSPECIFIED=0 CLARIFICATION_QUESTION_TYPE_UNSPECIFIED value + * @property {number} FILTER_VALUES=1 FILTER_VALUES value + * @property {number} FIELDS=2 FIELDS value + */ + ClarificationQuestion.ClarificationQuestionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLARIFICATION_QUESTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FILTER_VALUES"] = 1; + values[valuesById[2] = "FIELDS"] = 2; + return values; + })(); + + return ClarificationQuestion; })(); - v1alpha.Blob = (function() { + v1alpha.ClarificationMessage = (function() { /** - * Properties of a Blob. + * Properties of a ClarificationMessage. * @memberof google.cloud.geminidataanalytics.v1alpha - * @interface IBlob - * @property {string|null} [mimeType] Blob mimeType - * @property {Uint8Array|null} [data] Blob data + * @interface IClarificationMessage + * @property {Array.|null} [questions] ClarificationMessage questions */ /** - * Constructs a new Blob. + * Constructs a new ClarificationMessage. * @memberof google.cloud.geminidataanalytics.v1alpha - * @classdesc Represents a Blob. - * @implements IBlob + * @classdesc Represents a ClarificationMessage. + * @implements IClarificationMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1alpha.IBlob=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1alpha.IClarificationMessage=} [properties] Properties to set */ - function Blob(properties) { + function ClarificationMessage(properties) { + this.questions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26054,91 +26313,80 @@ } /** - * Blob mimeType. - * @member {string} mimeType - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob - * @instance - */ - Blob.prototype.mimeType = ""; - - /** - * Blob data. - * @member {Uint8Array} data - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * ClarificationMessage questions. + * @member {Array.} questions + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @instance */ - Blob.prototype.data = $util.newBuffer([]); + ClarificationMessage.prototype.questions = $util.emptyArray; /** - * Creates a new Blob instance using the specified properties. + * Creates a new ClarificationMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @static - * @param {google.cloud.geminidataanalytics.v1alpha.IBlob=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob instance + * @param {google.cloud.geminidataanalytics.v1alpha.IClarificationMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ClarificationMessage} ClarificationMessage instance */ - Blob.create = function create(properties) { - return new Blob(properties); + ClarificationMessage.create = function create(properties) { + return new ClarificationMessage(properties); }; /** - * Encodes the specified Blob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Blob.verify|verify} messages. + * Encodes the specified ClarificationMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @static - * @param {google.cloud.geminidataanalytics.v1alpha.IBlob} message Blob message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1alpha.IClarificationMessage} message ClarificationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Blob.encode = function encode(message, writer) { + ClarificationMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.questions != null && message.questions.length) + for (var i = 0; i < message.questions.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.encode(message.questions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Blob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Blob.verify|verify} messages. + * Encodes the specified ClarificationMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @static - * @param {google.cloud.geminidataanalytics.v1alpha.IBlob} message Blob message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1alpha.IClarificationMessage} message ClarificationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Blob.encodeDelimited = function encodeDelimited(message, writer) { + ClarificationMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Blob message from the specified reader or buffer. + * Decodes a ClarificationMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob + * @returns {google.cloud.geminidataanalytics.v1alpha.ClarificationMessage} ClarificationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Blob.decode = function decode(reader, length, error) { + ClarificationMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Blob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ClarificationMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.mimeType = reader.string(); - break; - } - case 2: { - message.data = reader.bytes(); + if (!(message.questions && message.questions.length)) + message.questions = []; + message.questions.push($root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.decode(reader, reader.uint32())); break; } default: @@ -26150,152 +26398,140 @@ }; /** - * Decodes a Blob message from the specified reader or buffer, length delimited. + * Decodes a ClarificationMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob + * @returns {google.cloud.geminidataanalytics.v1alpha.ClarificationMessage} ClarificationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Blob.decodeDelimited = function decodeDelimited(reader) { + ClarificationMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Blob message. + * Verifies a ClarificationMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Blob.verify = function verify(message) { + ClarificationMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; + if (message.questions != null && message.hasOwnProperty("questions")) { + if (!Array.isArray(message.questions)) + return "questions: array expected"; + for (var i = 0; i < message.questions.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.verify(message.questions[i]); + if (error) + return "questions." + error; + } + } return null; }; /** - * Creates a Blob message from a plain object. Also converts values to their respective internal types. + * Creates a ClarificationMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob + * @returns {google.cloud.geminidataanalytics.v1alpha.ClarificationMessage} ClarificationMessage */ - Blob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Blob) + ClarificationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ClarificationMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1alpha.Blob(); - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length >= 0) - message.data = object.data; + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ClarificationMessage(); + if (object.questions) { + if (!Array.isArray(object.questions)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.questions: array expected"); + message.questions = []; + for (var i = 0; i < object.questions.length; ++i) { + if (typeof object.questions[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ClarificationMessage.questions: object expected"); + message.questions[i] = $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.fromObject(object.questions[i]); + } + } return message; }; /** - * Creates a plain object from a Blob message. Also converts values to other types if specified. + * Creates a plain object from a ClarificationMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @static - * @param {google.cloud.geminidataanalytics.v1alpha.Blob} message Blob + * @param {google.cloud.geminidataanalytics.v1alpha.ClarificationMessage} message ClarificationMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Blob.toObject = function toObject(message, options) { + ClarificationMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.mimeType = ""; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } + if (options.arrays || options.defaults) + object.questions = []; + if (message.questions && message.questions.length) { + object.questions = []; + for (var j = 0; j < message.questions.length; ++j) + object.questions[j] = $root.google.cloud.geminidataanalytics.v1alpha.ClarificationQuestion.toObject(message.questions[j], options); } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; /** - * Converts this Blob to JSON. + * Converts this ClarificationMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @instance * @returns {Object.} JSON object */ - Blob.prototype.toJSON = function toJSON() { + ClarificationMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Blob + * Gets the default type url for ClarificationMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1alpha.Blob + * @memberof google.cloud.geminidataanalytics.v1alpha.ClarificationMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Blob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClarificationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Blob"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ClarificationMessage"; }; - return Blob; + return ClarificationMessage; })(); - return v1alpha; - })(); - - geminidataanalytics.v1beta = (function() { - - /** - * Namespace v1beta. - * @memberof google.cloud.geminidataanalytics - * @namespace - */ - var v1beta = {}; - - v1beta.AgentContextReference = (function() { + v1alpha.ExampleQueries = (function() { /** - * Properties of an AgentContextReference. - * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IAgentContextReference - * @property {string|null} [contextSetId] AgentContextReference contextSetId + * Properties of an ExampleQueries. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IExampleQueries + * @property {Array.|null} [exampleQueries] ExampleQueries exampleQueries */ /** - * Constructs a new AgentContextReference. - * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents an AgentContextReference. - * @implements IAgentContextReference + * Constructs a new ExampleQueries. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents an ExampleQueries. + * @implements IExampleQueries * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IAgentContextReference=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries=} [properties] Properties to set */ - function AgentContextReference(properties) { + function ExampleQueries(properties) { + this.exampleQueries = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26303,77 +26539,80 @@ } /** - * AgentContextReference contextSetId. - * @member {string} contextSetId - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * ExampleQueries exampleQueries. + * @member {Array.} exampleQueries + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @instance */ - AgentContextReference.prototype.contextSetId = ""; + ExampleQueries.prototype.exampleQueries = $util.emptyArray; /** - * Creates a new AgentContextReference instance using the specified properties. + * Creates a new ExampleQueries instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAgentContextReference=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.AgentContextReference} AgentContextReference instance + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries instance */ - AgentContextReference.create = function create(properties) { - return new AgentContextReference(properties); + ExampleQueries.create = function create(properties) { + return new ExampleQueries(properties); }; /** - * Encodes the specified AgentContextReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AgentContextReference.verify|verify} messages. + * Encodes the specified ExampleQueries message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQueries.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAgentContextReference} message AgentContextReference message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries} message ExampleQueries message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AgentContextReference.encode = function encode(message, writer) { + ExampleQueries.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.contextSetId != null && Object.hasOwnProperty.call(message, "contextSetId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.contextSetId); + if (message.exampleQueries != null && message.exampleQueries.length) + for (var i = 0; i < message.exampleQueries.length; ++i) + $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.encode(message.exampleQueries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified AgentContextReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AgentContextReference.verify|verify} messages. + * Encodes the specified ExampleQueries message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.ExampleQueries.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAgentContextReference} message AgentContextReference message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1alpha.IExampleQueries} message ExampleQueries message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AgentContextReference.encodeDelimited = function encodeDelimited(message, writer) { + ExampleQueries.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AgentContextReference message from the specified reader or buffer. + * Decodes an ExampleQueries message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.AgentContextReference} AgentContextReference + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AgentContextReference.decode = function decode(reader, length, error) { + ExampleQueries.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AgentContextReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.contextSetId = reader.string(); + if (!(message.exampleQueries && message.exampleQueries.length)) + message.exampleQueries = []; + message.exampleQueries.push($root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.decode(reader, reader.uint32())); break; } default: @@ -26385,132 +26624,140 @@ }; /** - * Decodes an AgentContextReference message from the specified reader or buffer, length delimited. + * Decodes an ExampleQueries message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.AgentContextReference} AgentContextReference + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AgentContextReference.decodeDelimited = function decodeDelimited(reader) { + ExampleQueries.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AgentContextReference message. + * Verifies an ExampleQueries message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AgentContextReference.verify = function verify(message) { + ExampleQueries.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.contextSetId != null && message.hasOwnProperty("contextSetId")) - if (!$util.isString(message.contextSetId)) - return "contextSetId: string expected"; + if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { + if (!Array.isArray(message.exampleQueries)) + return "exampleQueries: array expected"; + for (var i = 0; i < message.exampleQueries.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.verify(message.exampleQueries[i]); + if (error) + return "exampleQueries." + error; + } + } return null; }; /** - * Creates an AgentContextReference message from a plain object. Also converts values to their respective internal types. + * Creates an ExampleQueries message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.AgentContextReference} AgentContextReference + * @returns {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} ExampleQueries */ - AgentContextReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AgentContextReference) + ExampleQueries.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.AgentContextReference(); - if (object.contextSetId != null) - message.contextSetId = String(object.contextSetId); + var message = new $root.google.cloud.geminidataanalytics.v1alpha.ExampleQueries(); + if (object.exampleQueries) { + if (!Array.isArray(object.exampleQueries)) + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ExampleQueries.exampleQueries: array expected"); + message.exampleQueries = []; + for (var i = 0; i < object.exampleQueries.length; ++i) { + if (typeof object.exampleQueries[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1alpha.ExampleQueries.exampleQueries: object expected"); + message.exampleQueries[i] = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.fromObject(object.exampleQueries[i]); + } + } return message; }; /** - * Creates a plain object from an AgentContextReference message. Also converts values to other types if specified. + * Creates a plain object from an ExampleQueries message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @static - * @param {google.cloud.geminidataanalytics.v1beta.AgentContextReference} message AgentContextReference + * @param {google.cloud.geminidataanalytics.v1alpha.ExampleQueries} message ExampleQueries * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AgentContextReference.toObject = function toObject(message, options) { + ExampleQueries.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.contextSetId = ""; - if (message.contextSetId != null && message.hasOwnProperty("contextSetId")) - object.contextSetId = message.contextSetId; + if (options.arrays || options.defaults) + object.exampleQueries = []; + if (message.exampleQueries && message.exampleQueries.length) { + object.exampleQueries = []; + for (var j = 0; j < message.exampleQueries.length; ++j) + object.exampleQueries[j] = $root.google.cloud.geminidataanalytics.v1alpha.ExampleQuery.toObject(message.exampleQueries[j], options); + } return object; }; /** - * Converts this AgentContextReference to JSON. + * Converts this ExampleQueries to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @instance * @returns {Object.} JSON object */ - AgentContextReference.prototype.toJSON = function toJSON() { + ExampleQueries.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AgentContextReference + * Gets the default type url for ExampleQueries * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @memberof google.cloud.geminidataanalytics.v1alpha.ExampleQueries * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AgentContextReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExampleQueries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AgentContextReference"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.ExampleQueries"; }; - return AgentContextReference; + return ExampleQueries; })(); - v1beta.Context = (function() { + v1alpha.Blob = (function() { /** - * Properties of a Context. - * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IContext - * @property {string|null} [systemInstruction] Context systemInstruction - * @property {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null} [datasourceReferences] Context datasourceReferences - * @property {google.cloud.geminidataanalytics.v1beta.IConversationOptions|null} [options] Context options - * @property {Array.|null} [exampleQueries] Context exampleQueries - * @property {Array.|null} [lookerGoldenQueries] Context lookerGoldenQueries - * @property {Array.|null} [glossaryTerms] Context glossaryTerms - * @property {Array.|null} [schemaRelationships] Context schemaRelationships - */ - + * Properties of a Blob. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @interface IBlob + * @property {string|null} [mimeType] Blob mimeType + * @property {Uint8Array|null} [data] Blob data + */ + /** - * Constructs a new Context. - * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a Context. - * @implements IContext + * Constructs a new Blob. + * @memberof google.cloud.geminidataanalytics.v1alpha + * @classdesc Represents a Blob. + * @implements IBlob * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IContext=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1alpha.IBlob=} [properties] Properties to set */ - function Context(properties) { - this.exampleQueries = []; - this.lookerGoldenQueries = []; - this.glossaryTerms = []; - this.schemaRelationships = []; + function Blob(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -26518,173 +26765,91 @@ } /** - * Context systemInstruction. - * @member {string} systemInstruction - * @memberof google.cloud.geminidataanalytics.v1beta.Context - * @instance - */ - Context.prototype.systemInstruction = ""; - - /** - * Context datasourceReferences. - * @member {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null|undefined} datasourceReferences - * @memberof google.cloud.geminidataanalytics.v1beta.Context - * @instance - */ - Context.prototype.datasourceReferences = null; - - /** - * Context options. - * @member {google.cloud.geminidataanalytics.v1beta.IConversationOptions|null|undefined} options - * @memberof google.cloud.geminidataanalytics.v1beta.Context - * @instance - */ - Context.prototype.options = null; - - /** - * Context exampleQueries. - * @member {Array.} exampleQueries - * @memberof google.cloud.geminidataanalytics.v1beta.Context - * @instance - */ - Context.prototype.exampleQueries = $util.emptyArray; - - /** - * Context lookerGoldenQueries. - * @member {Array.} lookerGoldenQueries - * @memberof google.cloud.geminidataanalytics.v1beta.Context - * @instance - */ - Context.prototype.lookerGoldenQueries = $util.emptyArray; - - /** - * Context glossaryTerms. - * @member {Array.} glossaryTerms - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * Blob mimeType. + * @member {string} mimeType + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @instance */ - Context.prototype.glossaryTerms = $util.emptyArray; + Blob.prototype.mimeType = ""; /** - * Context schemaRelationships. - * @member {Array.} schemaRelationships - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * Blob data. + * @member {Uint8Array} data + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @instance */ - Context.prototype.schemaRelationships = $util.emptyArray; + Blob.prototype.data = $util.newBuffer([]); /** - * Creates a new Context instance using the specified properties. + * Creates a new Blob instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @static - * @param {google.cloud.geminidataanalytics.v1beta.IContext=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context instance + * @param {google.cloud.geminidataanalytics.v1alpha.IBlob=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob instance */ - Context.create = function create(properties) { - return new Context(properties); + Blob.create = function create(properties) { + return new Blob(properties); }; /** - * Encodes the specified Context message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.verify|verify} messages. + * Encodes the specified Blob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Blob.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @static - * @param {google.cloud.geminidataanalytics.v1beta.IContext} message Context message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1alpha.IBlob} message Blob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Context.encode = function encode(message, writer) { + Blob.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.systemInstruction != null && Object.hasOwnProperty.call(message, "systemInstruction")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.systemInstruction); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.exampleQueries != null && message.exampleQueries.length) - for (var i = 0; i < message.exampleQueries.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.encode(message.exampleQueries[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.datasourceReferences != null && Object.hasOwnProperty.call(message, "datasourceReferences")) - $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.encode(message.datasourceReferences, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.glossaryTerms != null && message.glossaryTerms.length) - for (var i = 0; i < message.glossaryTerms.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.GlossaryTerm.encode(message.glossaryTerms[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.schemaRelationships != null && message.schemaRelationships.length) - for (var i = 0; i < message.schemaRelationships.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.encode(message.schemaRelationships[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.lookerGoldenQueries != null && message.lookerGoldenQueries.length) - for (var i = 0; i < message.lookerGoldenQueries.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery.encode(message.lookerGoldenQueries[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); return writer; }; /** - * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.verify|verify} messages. + * Encodes the specified Blob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1alpha.Blob.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @static - * @param {google.cloud.geminidataanalytics.v1beta.IContext} message Context message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1alpha.IBlob} message Blob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Context.encodeDelimited = function encodeDelimited(message, writer) { + Blob.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Context message from the specified reader or buffer. + * Decodes a Blob message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context + * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Context.decode = function decode(reader, length, error) { + Blob.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Context(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1alpha.Blob(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.systemInstruction = reader.string(); - break; - } - case 7: { - message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.decode(reader, reader.uint32()); - break; - } - case 3: { - message.options = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.exampleQueries && message.exampleQueries.length)) - message.exampleQueries = []; - message.exampleQueries.push($root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.decode(reader, reader.uint32())); - break; - } - case 11: { - if (!(message.lookerGoldenQueries && message.lookerGoldenQueries.length)) - message.lookerGoldenQueries = []; - message.lookerGoldenQueries.push($root.google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.glossaryTerms && message.glossaryTerms.length)) - message.glossaryTerms = []; - message.glossaryTerms.push($root.google.cloud.geminidataanalytics.v1beta.GlossaryTerm.decode(reader, reader.uint32())); + message.mimeType = reader.string(); break; } - case 9: { - if (!(message.schemaRelationships && message.schemaRelationships.length)) - message.schemaRelationships = []; - message.schemaRelationships.push($root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.decode(reader, reader.uint32())); + case 2: { + message.data = reader.bytes(); break; } default: @@ -26696,328 +26861,874 @@ }; /** - * Decodes a Context message from the specified reader or buffer, length delimited. + * Decodes a Blob message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context + * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Context.decodeDelimited = function decodeDelimited(reader) { + Blob.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Context message. + * Verifies a Blob message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Context.verify = function verify(message) { + Blob.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.systemInstruction != null && message.hasOwnProperty("systemInstruction")) - if (!$util.isString(message.systemInstruction)) - return "systemInstruction: string expected"; - if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.verify(message.datasourceReferences); - if (error) - return "datasourceReferences." + error; - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { - if (!Array.isArray(message.exampleQueries)) - return "exampleQueries: array expected"; - for (var i = 0; i < message.exampleQueries.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.verify(message.exampleQueries[i]); - if (error) - return "exampleQueries." + error; - } - } - if (message.lookerGoldenQueries != null && message.hasOwnProperty("lookerGoldenQueries")) { - if (!Array.isArray(message.lookerGoldenQueries)) - return "lookerGoldenQueries: array expected"; - for (var i = 0; i < message.lookerGoldenQueries.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery.verify(message.lookerGoldenQueries[i]); - if (error) - return "lookerGoldenQueries." + error; - } - } - if (message.glossaryTerms != null && message.hasOwnProperty("glossaryTerms")) { - if (!Array.isArray(message.glossaryTerms)) - return "glossaryTerms: array expected"; - for (var i = 0; i < message.glossaryTerms.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1beta.GlossaryTerm.verify(message.glossaryTerms[i]); - if (error) - return "glossaryTerms." + error; - } - } - if (message.schemaRelationships != null && message.hasOwnProperty("schemaRelationships")) { - if (!Array.isArray(message.schemaRelationships)) - return "schemaRelationships: array expected"; - for (var i = 0; i < message.schemaRelationships.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.verify(message.schemaRelationships[i]); - if (error) - return "schemaRelationships." + error; - } - } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; return null; }; /** - * Creates a Context message from a plain object. Also converts values to their respective internal types. + * Creates a Blob message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context + * @returns {google.cloud.geminidataanalytics.v1alpha.Blob} Blob */ - Context.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Context) + Blob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1alpha.Blob) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.Context(); - if (object.systemInstruction != null) - message.systemInstruction = String(object.systemInstruction); - if (object.datasourceReferences != null) { - if (typeof object.datasourceReferences !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.datasourceReferences: object expected"); - message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.fromObject(object.datasourceReferences); - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.options: object expected"); - message.options = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.fromObject(object.options); - } - if (object.exampleQueries) { - if (!Array.isArray(object.exampleQueries)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.exampleQueries: array expected"); - message.exampleQueries = []; - for (var i = 0; i < object.exampleQueries.length; ++i) { - if (typeof object.exampleQueries[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.exampleQueries: object expected"); - message.exampleQueries[i] = $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.fromObject(object.exampleQueries[i]); - } - } - if (object.lookerGoldenQueries) { - if (!Array.isArray(object.lookerGoldenQueries)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.lookerGoldenQueries: array expected"); - message.lookerGoldenQueries = []; - for (var i = 0; i < object.lookerGoldenQueries.length; ++i) { - if (typeof object.lookerGoldenQueries[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.lookerGoldenQueries: object expected"); - message.lookerGoldenQueries[i] = $root.google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery.fromObject(object.lookerGoldenQueries[i]); - } - } - if (object.glossaryTerms) { - if (!Array.isArray(object.glossaryTerms)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.glossaryTerms: array expected"); - message.glossaryTerms = []; - for (var i = 0; i < object.glossaryTerms.length; ++i) { - if (typeof object.glossaryTerms[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.glossaryTerms: object expected"); - message.glossaryTerms[i] = $root.google.cloud.geminidataanalytics.v1beta.GlossaryTerm.fromObject(object.glossaryTerms[i]); - } - } - if (object.schemaRelationships) { - if (!Array.isArray(object.schemaRelationships)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.schemaRelationships: array expected"); - message.schemaRelationships = []; - for (var i = 0; i < object.schemaRelationships.length; ++i) { - if (typeof object.schemaRelationships[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.schemaRelationships: object expected"); - message.schemaRelationships[i] = $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.fromObject(object.schemaRelationships[i]); - } - } + var message = new $root.google.cloud.geminidataanalytics.v1alpha.Blob(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; return message; }; /** - * Creates a plain object from a Context message. Also converts values to other types if specified. + * Creates a plain object from a Blob message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @static - * @param {google.cloud.geminidataanalytics.v1beta.Context} message Context + * @param {google.cloud.geminidataanalytics.v1alpha.Blob} message Blob * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Context.toObject = function toObject(message, options) { + Blob.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.exampleQueries = []; - object.glossaryTerms = []; - object.schemaRelationships = []; - object.lookerGoldenQueries = []; - } if (options.defaults) { - object.systemInstruction = ""; - object.options = null; - object.datasourceReferences = null; - } - if (message.systemInstruction != null && message.hasOwnProperty("systemInstruction")) - object.systemInstruction = message.systemInstruction; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.toObject(message.options, options); - if (message.exampleQueries && message.exampleQueries.length) { - object.exampleQueries = []; - for (var j = 0; j < message.exampleQueries.length; ++j) - object.exampleQueries[j] = $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.toObject(message.exampleQueries[j], options); - } - if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) - object.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.toObject(message.datasourceReferences, options); - if (message.glossaryTerms && message.glossaryTerms.length) { - object.glossaryTerms = []; - for (var j = 0; j < message.glossaryTerms.length; ++j) - object.glossaryTerms[j] = $root.google.cloud.geminidataanalytics.v1beta.GlossaryTerm.toObject(message.glossaryTerms[j], options); - } - if (message.schemaRelationships && message.schemaRelationships.length) { - object.schemaRelationships = []; - for (var j = 0; j < message.schemaRelationships.length; ++j) - object.schemaRelationships[j] = $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.toObject(message.schemaRelationships[j], options); - } - if (message.lookerGoldenQueries && message.lookerGoldenQueries.length) { - object.lookerGoldenQueries = []; - for (var j = 0; j < message.lookerGoldenQueries.length; ++j) - object.lookerGoldenQueries[j] = $root.google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery.toObject(message.lookerGoldenQueries[j], options); + object.mimeType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; return object; }; /** - * Converts this Context to JSON. + * Converts this Blob to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @instance * @returns {Object.} JSON object */ - Context.prototype.toJSON = function toJSON() { + Blob.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Context + * Gets the default type url for Blob * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @memberof google.cloud.geminidataanalytics.v1alpha.Blob * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Context.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Blob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Context"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1alpha.Blob"; }; - Context.SchemaRelationship = (function() { - - /** - * Properties of a SchemaRelationship. - * @memberof google.cloud.geminidataanalytics.v1beta.Context - * @interface ISchemaRelationship - * @property {google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.ISchemaPaths|null} [leftSchemaPaths] SchemaRelationship leftSchemaPaths - * @property {google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.ISchemaPaths|null} [rightSchemaPaths] SchemaRelationship rightSchemaPaths - * @property {Array.|null} [sources] SchemaRelationship sources - * @property {number|null} [confidenceScore] SchemaRelationship confidenceScore - */ + return Blob; + })(); - /** - * Constructs a new SchemaRelationship. - * @memberof google.cloud.geminidataanalytics.v1beta.Context - * @classdesc Represents a SchemaRelationship. - * @implements ISchemaRelationship - * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.Context.ISchemaRelationship=} [properties] Properties to set - */ - function SchemaRelationship(properties) { - this.sources = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return v1alpha; + })(); - /** - * SchemaRelationship leftSchemaPaths. - * @member {google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.ISchemaPaths|null|undefined} leftSchemaPaths - * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship - * @instance - */ - SchemaRelationship.prototype.leftSchemaPaths = null; + geminidataanalytics.v1beta = (function() { - /** - * SchemaRelationship rightSchemaPaths. - * @member {google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.ISchemaPaths|null|undefined} rightSchemaPaths - * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship - * @instance - */ - SchemaRelationship.prototype.rightSchemaPaths = null; + /** + * Namespace v1beta. + * @memberof google.cloud.geminidataanalytics + * @namespace + */ + var v1beta = {}; - /** - * SchemaRelationship sources. - * @member {Array.} sources - * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship - * @instance - */ - SchemaRelationship.prototype.sources = $util.emptyArray; + v1beta.AgentContextReference = (function() { - /** - * SchemaRelationship confidenceScore. - * @member {number} confidenceScore - * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship - * @instance - */ - SchemaRelationship.prototype.confidenceScore = 0; + /** + * Properties of an AgentContextReference. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IAgentContextReference + * @property {string|null} [contextSetId] AgentContextReference contextSetId + */ - /** - * Creates a new SchemaRelationship instance using the specified properties. - * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship - * @static - * @param {google.cloud.geminidataanalytics.v1beta.Context.ISchemaRelationship=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship} SchemaRelationship instance - */ - SchemaRelationship.create = function create(properties) { - return new SchemaRelationship(properties); - }; + /** + * Constructs a new AgentContextReference. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents an AgentContextReference. + * @implements IAgentContextReference + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IAgentContextReference=} [properties] Properties to set + */ + function AgentContextReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified SchemaRelationship message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.verify|verify} messages. - * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship - * @static - * @param {google.cloud.geminidataanalytics.v1beta.Context.ISchemaRelationship} message SchemaRelationship message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaRelationship.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.leftSchemaPaths != null && Object.hasOwnProperty.call(message, "leftSchemaPaths")) - $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths.encode(message.leftSchemaPaths, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rightSchemaPaths != null && Object.hasOwnProperty.call(message, "rightSchemaPaths")) - $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths.encode(message.rightSchemaPaths, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.sources != null && message.sources.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.sources.length; ++i) - writer.int32(message.sources[i]); - writer.ldelim(); - } - if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidenceScore); - return writer; - }; + /** + * AgentContextReference contextSetId. + * @member {string} contextSetId + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @instance + */ + AgentContextReference.prototype.contextSetId = ""; + + /** + * Creates a new AgentContextReference instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAgentContextReference=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.AgentContextReference} AgentContextReference instance + */ + AgentContextReference.create = function create(properties) { + return new AgentContextReference(properties); + }; + + /** + * Encodes the specified AgentContextReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AgentContextReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAgentContextReference} message AgentContextReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentContextReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contextSetId != null && Object.hasOwnProperty.call(message, "contextSetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.contextSetId); + return writer; + }; + + /** + * Encodes the specified AgentContextReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AgentContextReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IAgentContextReference} message AgentContextReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AgentContextReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AgentContextReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.AgentContextReference} AgentContextReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentContextReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AgentContextReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.contextSetId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AgentContextReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.AgentContextReference} AgentContextReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AgentContextReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AgentContextReference message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AgentContextReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contextSetId != null && message.hasOwnProperty("contextSetId")) + if (!$util.isString(message.contextSetId)) + return "contextSetId: string expected"; + return null; + }; + + /** + * Creates an AgentContextReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.AgentContextReference} AgentContextReference + */ + AgentContextReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AgentContextReference) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.AgentContextReference(); + if (object.contextSetId != null) + message.contextSetId = String(object.contextSetId); + return message; + }; + + /** + * Creates a plain object from an AgentContextReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.AgentContextReference} message AgentContextReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AgentContextReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.contextSetId = ""; + if (message.contextSetId != null && message.hasOwnProperty("contextSetId")) + object.contextSetId = message.contextSetId; + return object; + }; + + /** + * Converts this AgentContextReference to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @instance + * @returns {Object.} JSON object + */ + AgentContextReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AgentContextReference + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.AgentContextReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AgentContextReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AgentContextReference"; + }; + + return AgentContextReference; + })(); + + v1beta.Context = (function() { + + /** + * Properties of a Context. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IContext + * @property {string|null} [systemInstruction] Context systemInstruction + * @property {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null} [datasourceReferences] Context datasourceReferences + * @property {google.cloud.geminidataanalytics.v1beta.IConversationOptions|null} [options] Context options + * @property {Array.|null} [exampleQueries] Context exampleQueries + * @property {Array.|null} [lookerGoldenQueries] Context lookerGoldenQueries + * @property {Array.|null} [glossaryTerms] Context glossaryTerms + * @property {Array.|null} [schemaRelationships] Context schemaRelationships + */ + + /** + * Constructs a new Context. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a Context. + * @implements IContext + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IContext=} [properties] Properties to set + */ + function Context(properties) { + this.exampleQueries = []; + this.lookerGoldenQueries = []; + this.glossaryTerms = []; + this.schemaRelationships = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Context systemInstruction. + * @member {string} systemInstruction + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.systemInstruction = ""; + + /** + * Context datasourceReferences. + * @member {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null|undefined} datasourceReferences + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.datasourceReferences = null; + + /** + * Context options. + * @member {google.cloud.geminidataanalytics.v1beta.IConversationOptions|null|undefined} options + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.options = null; + + /** + * Context exampleQueries. + * @member {Array.} exampleQueries + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.exampleQueries = $util.emptyArray; + + /** + * Context lookerGoldenQueries. + * @member {Array.} lookerGoldenQueries + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.lookerGoldenQueries = $util.emptyArray; + + /** + * Context glossaryTerms. + * @member {Array.} glossaryTerms + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.glossaryTerms = $util.emptyArray; + + /** + * Context schemaRelationships. + * @member {Array.} schemaRelationships + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + */ + Context.prototype.schemaRelationships = $util.emptyArray; + + /** + * Creates a new Context instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IContext=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context instance + */ + Context.create = function create(properties) { + return new Context(properties); + }; + + /** + * Encodes the specified Context message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Context.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.systemInstruction != null && Object.hasOwnProperty.call(message, "systemInstruction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.systemInstruction); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.exampleQueries != null && message.exampleQueries.length) + for (var i = 0; i < message.exampleQueries.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.encode(message.exampleQueries[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.datasourceReferences != null && Object.hasOwnProperty.call(message, "datasourceReferences")) + $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.encode(message.datasourceReferences, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.glossaryTerms != null && message.glossaryTerms.length) + for (var i = 0; i < message.glossaryTerms.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.GlossaryTerm.encode(message.glossaryTerms[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.schemaRelationships != null && message.schemaRelationships.length) + for (var i = 0; i < message.schemaRelationships.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.encode(message.schemaRelationships[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.lookerGoldenQueries != null && message.lookerGoldenQueries.length) + for (var i = 0; i < message.lookerGoldenQueries.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery.encode(message.lookerGoldenQueries[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Context.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Context message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Context(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.systemInstruction = reader.string(); + break; + } + case 7: { + message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.decode(reader, reader.uint32()); + break; + } + case 3: { + message.options = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.exampleQueries && message.exampleQueries.length)) + message.exampleQueries = []; + message.exampleQueries.push($root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.decode(reader, reader.uint32())); + break; + } + case 11: { + if (!(message.lookerGoldenQueries && message.lookerGoldenQueries.length)) + message.lookerGoldenQueries = []; + message.lookerGoldenQueries.push($root.google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.glossaryTerms && message.glossaryTerms.length)) + message.glossaryTerms = []; + message.glossaryTerms.push($root.google.cloud.geminidataanalytics.v1beta.GlossaryTerm.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.schemaRelationships && message.schemaRelationships.length)) + message.schemaRelationships = []; + message.schemaRelationships.push($root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Context message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Context message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Context.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.systemInstruction != null && message.hasOwnProperty("systemInstruction")) + if (!$util.isString(message.systemInstruction)) + return "systemInstruction: string expected"; + if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.verify(message.datasourceReferences); + if (error) + return "datasourceReferences." + error; + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { + if (!Array.isArray(message.exampleQueries)) + return "exampleQueries: array expected"; + for (var i = 0; i < message.exampleQueries.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.verify(message.exampleQueries[i]); + if (error) + return "exampleQueries." + error; + } + } + if (message.lookerGoldenQueries != null && message.hasOwnProperty("lookerGoldenQueries")) { + if (!Array.isArray(message.lookerGoldenQueries)) + return "lookerGoldenQueries: array expected"; + for (var i = 0; i < message.lookerGoldenQueries.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery.verify(message.lookerGoldenQueries[i]); + if (error) + return "lookerGoldenQueries." + error; + } + } + if (message.glossaryTerms != null && message.hasOwnProperty("glossaryTerms")) { + if (!Array.isArray(message.glossaryTerms)) + return "glossaryTerms: array expected"; + for (var i = 0; i < message.glossaryTerms.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.GlossaryTerm.verify(message.glossaryTerms[i]); + if (error) + return "glossaryTerms." + error; + } + } + if (message.schemaRelationships != null && message.hasOwnProperty("schemaRelationships")) { + if (!Array.isArray(message.schemaRelationships)) + return "schemaRelationships: array expected"; + for (var i = 0; i < message.schemaRelationships.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.verify(message.schemaRelationships[i]); + if (error) + return "schemaRelationships." + error; + } + } + return null; + }; + + /** + * Creates a Context message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.Context} Context + */ + Context.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Context) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.Context(); + if (object.systemInstruction != null) + message.systemInstruction = String(object.systemInstruction); + if (object.datasourceReferences != null) { + if (typeof object.datasourceReferences !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.datasourceReferences: object expected"); + message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.fromObject(object.datasourceReferences); + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.options: object expected"); + message.options = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.fromObject(object.options); + } + if (object.exampleQueries) { + if (!Array.isArray(object.exampleQueries)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.exampleQueries: array expected"); + message.exampleQueries = []; + for (var i = 0; i < object.exampleQueries.length; ++i) { + if (typeof object.exampleQueries[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.exampleQueries: object expected"); + message.exampleQueries[i] = $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.fromObject(object.exampleQueries[i]); + } + } + if (object.lookerGoldenQueries) { + if (!Array.isArray(object.lookerGoldenQueries)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.lookerGoldenQueries: array expected"); + message.lookerGoldenQueries = []; + for (var i = 0; i < object.lookerGoldenQueries.length; ++i) { + if (typeof object.lookerGoldenQueries[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.lookerGoldenQueries: object expected"); + message.lookerGoldenQueries[i] = $root.google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery.fromObject(object.lookerGoldenQueries[i]); + } + } + if (object.glossaryTerms) { + if (!Array.isArray(object.glossaryTerms)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.glossaryTerms: array expected"); + message.glossaryTerms = []; + for (var i = 0; i < object.glossaryTerms.length; ++i) { + if (typeof object.glossaryTerms[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.glossaryTerms: object expected"); + message.glossaryTerms[i] = $root.google.cloud.geminidataanalytics.v1beta.GlossaryTerm.fromObject(object.glossaryTerms[i]); + } + } + if (object.schemaRelationships) { + if (!Array.isArray(object.schemaRelationships)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.schemaRelationships: array expected"); + message.schemaRelationships = []; + for (var i = 0; i < object.schemaRelationships.length; ++i) { + if (typeof object.schemaRelationships[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Context.schemaRelationships: object expected"); + message.schemaRelationships[i] = $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.fromObject(object.schemaRelationships[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {google.cloud.geminidataanalytics.v1beta.Context} message Context + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Context.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.exampleQueries = []; + object.glossaryTerms = []; + object.schemaRelationships = []; + object.lookerGoldenQueries = []; + } + if (options.defaults) { + object.systemInstruction = ""; + object.options = null; + object.datasourceReferences = null; + } + if (message.systemInstruction != null && message.hasOwnProperty("systemInstruction")) + object.systemInstruction = message.systemInstruction; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.cloud.geminidataanalytics.v1beta.ConversationOptions.toObject(message.options, options); + if (message.exampleQueries && message.exampleQueries.length) { + object.exampleQueries = []; + for (var j = 0; j < message.exampleQueries.length; ++j) + object.exampleQueries[j] = $root.google.cloud.geminidataanalytics.v1beta.ExampleQuery.toObject(message.exampleQueries[j], options); + } + if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) + object.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.toObject(message.datasourceReferences, options); + if (message.glossaryTerms && message.glossaryTerms.length) { + object.glossaryTerms = []; + for (var j = 0; j < message.glossaryTerms.length; ++j) + object.glossaryTerms[j] = $root.google.cloud.geminidataanalytics.v1beta.GlossaryTerm.toObject(message.glossaryTerms[j], options); + } + if (message.schemaRelationships && message.schemaRelationships.length) { + object.schemaRelationships = []; + for (var j = 0; j < message.schemaRelationships.length; ++j) + object.schemaRelationships[j] = $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.toObject(message.schemaRelationships[j], options); + } + if (message.lookerGoldenQueries && message.lookerGoldenQueries.length) { + object.lookerGoldenQueries = []; + for (var j = 0; j < message.lookerGoldenQueries.length; ++j) + object.lookerGoldenQueries[j] = $root.google.cloud.geminidataanalytics.v1beta.LookerGoldenQuery.toObject(message.lookerGoldenQueries[j], options); + } + return object; + }; + + /** + * Converts this Context to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @instance + * @returns {Object.} JSON object + */ + Context.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Context + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Context.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Context"; + }; + + Context.SchemaRelationship = (function() { + + /** + * Properties of a SchemaRelationship. + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @interface ISchemaRelationship + * @property {google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.ISchemaPaths|null} [leftSchemaPaths] SchemaRelationship leftSchemaPaths + * @property {google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.ISchemaPaths|null} [rightSchemaPaths] SchemaRelationship rightSchemaPaths + * @property {Array.|null} [sources] SchemaRelationship sources + * @property {number|null} [confidenceScore] SchemaRelationship confidenceScore + */ + + /** + * Constructs a new SchemaRelationship. + * @memberof google.cloud.geminidataanalytics.v1beta.Context + * @classdesc Represents a SchemaRelationship. + * @implements ISchemaRelationship + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.Context.ISchemaRelationship=} [properties] Properties to set + */ + function SchemaRelationship(properties) { + this.sources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaRelationship leftSchemaPaths. + * @member {google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.ISchemaPaths|null|undefined} leftSchemaPaths + * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship + * @instance + */ + SchemaRelationship.prototype.leftSchemaPaths = null; + + /** + * SchemaRelationship rightSchemaPaths. + * @member {google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.ISchemaPaths|null|undefined} rightSchemaPaths + * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship + * @instance + */ + SchemaRelationship.prototype.rightSchemaPaths = null; + + /** + * SchemaRelationship sources. + * @member {Array.} sources + * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship + * @instance + */ + SchemaRelationship.prototype.sources = $util.emptyArray; + + /** + * SchemaRelationship confidenceScore. + * @member {number} confidenceScore + * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship + * @instance + */ + SchemaRelationship.prototype.confidenceScore = 0; + + /** + * Creates a new SchemaRelationship instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship + * @static + * @param {google.cloud.geminidataanalytics.v1beta.Context.ISchemaRelationship=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship} SchemaRelationship instance + */ + SchemaRelationship.create = function create(properties) { + return new SchemaRelationship(properties); + }; + + /** + * Encodes the specified SchemaRelationship message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship + * @static + * @param {google.cloud.geminidataanalytics.v1beta.Context.ISchemaRelationship} message SchemaRelationship message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRelationship.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.leftSchemaPaths != null && Object.hasOwnProperty.call(message, "leftSchemaPaths")) + $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths.encode(message.leftSchemaPaths, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rightSchemaPaths != null && Object.hasOwnProperty.call(message, "rightSchemaPaths")) + $root.google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.SchemaPaths.encode(message.rightSchemaPaths, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sources != null && message.sources.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.sources.length; ++i) + writer.int32(message.sources[i]); + writer.ldelim(); + } + if (message.confidenceScore != null && Object.hasOwnProperty.call(message, "confidenceScore")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidenceScore); + return writer; + }; /** * Encodes the specified SchemaRelationship message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Context.SchemaRelationship.verify|verify} messages. @@ -43235,82 +43946,297 @@ }; /** - * Creates a plain object from a GenerationOptions message. Also converts values to other types if specified. + * Creates a plain object from a GenerationOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.GenerationOptions + * @static + * @param {google.cloud.geminidataanalytics.v1beta.GenerationOptions} message GenerationOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerationOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.generateQueryResult = false; + object.generateNaturalLanguageAnswer = false; + object.generateExplanation = false; + object.generateDisambiguationQuestion = false; + } + if (message.generateQueryResult != null && message.hasOwnProperty("generateQueryResult")) + object.generateQueryResult = message.generateQueryResult; + if (message.generateNaturalLanguageAnswer != null && message.hasOwnProperty("generateNaturalLanguageAnswer")) + object.generateNaturalLanguageAnswer = message.generateNaturalLanguageAnswer; + if (message.generateExplanation != null && message.hasOwnProperty("generateExplanation")) + object.generateExplanation = message.generateExplanation; + if (message.generateDisambiguationQuestion != null && message.hasOwnProperty("generateDisambiguationQuestion")) + object.generateDisambiguationQuestion = message.generateDisambiguationQuestion; + return object; + }; + + /** + * Converts this GenerationOptions to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.GenerationOptions + * @instance + * @returns {Object.} JSON object + */ + GenerationOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerationOptions + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.GenerationOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerationOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.GenerationOptions"; + }; + + return GenerationOptions; + })(); + + v1beta.QueryDataContext = (function() { + + /** + * Properties of a QueryDataContext. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IQueryDataContext + * @property {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null} [datasourceReferences] QueryDataContext datasourceReferences + */ + + /** + * Constructs a new QueryDataContext. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a QueryDataContext. + * @implements IQueryDataContext + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataContext=} [properties] Properties to set + */ + function QueryDataContext(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDataContext datasourceReferences. + * @member {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null|undefined} datasourceReferences + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @instance + */ + QueryDataContext.prototype.datasourceReferences = null; + + /** + * Creates a new QueryDataContext instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataContext=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataContext} QueryDataContext instance + */ + QueryDataContext.create = function create(properties) { + return new QueryDataContext(properties); + }; + + /** + * Encodes the specified QueryDataContext message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.QueryDataContext.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataContext} message QueryDataContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDataContext.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasourceReferences != null && Object.hasOwnProperty.call(message, "datasourceReferences")) + $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.encode(message.datasourceReferences, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDataContext message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.QueryDataContext.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataContext} message QueryDataContext message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDataContext.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDataContext message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataContext} QueryDataContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDataContext.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.QueryDataContext(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDataContext message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataContext} QueryDataContext + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDataContext.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDataContext message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDataContext.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.verify(message.datasourceReferences); + if (error) + return "datasourceReferences." + error; + } + return null; + }; + + /** + * Creates a QueryDataContext message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataContext} QueryDataContext + */ + QueryDataContext.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.QueryDataContext) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.QueryDataContext(); + if (object.datasourceReferences != null) { + if (typeof object.datasourceReferences !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.QueryDataContext.datasourceReferences: object expected"); + message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.fromObject(object.datasourceReferences); + } + return message; + }; + + /** + * Creates a plain object from a QueryDataContext message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.GenerationOptions + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext * @static - * @param {google.cloud.geminidataanalytics.v1beta.GenerationOptions} message GenerationOptions + * @param {google.cloud.geminidataanalytics.v1beta.QueryDataContext} message QueryDataContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerationOptions.toObject = function toObject(message, options) { + QueryDataContext.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.generateQueryResult = false; - object.generateNaturalLanguageAnswer = false; - object.generateExplanation = false; - object.generateDisambiguationQuestion = false; - } - if (message.generateQueryResult != null && message.hasOwnProperty("generateQueryResult")) - object.generateQueryResult = message.generateQueryResult; - if (message.generateNaturalLanguageAnswer != null && message.hasOwnProperty("generateNaturalLanguageAnswer")) - object.generateNaturalLanguageAnswer = message.generateNaturalLanguageAnswer; - if (message.generateExplanation != null && message.hasOwnProperty("generateExplanation")) - object.generateExplanation = message.generateExplanation; - if (message.generateDisambiguationQuestion != null && message.hasOwnProperty("generateDisambiguationQuestion")) - object.generateDisambiguationQuestion = message.generateDisambiguationQuestion; + if (options.defaults) + object.datasourceReferences = null; + if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) + object.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.toObject(message.datasourceReferences, options); return object; }; /** - * Converts this GenerationOptions to JSON. + * Converts this QueryDataContext to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.GenerationOptions + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext * @instance * @returns {Object.} JSON object */ - GenerationOptions.prototype.toJSON = function toJSON() { + QueryDataContext.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GenerationOptions + * Gets the default type url for QueryDataContext * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.GenerationOptions + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GenerationOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QueryDataContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.GenerationOptions"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.QueryDataContext"; }; - return GenerationOptions; + return QueryDataContext; })(); - v1beta.QueryDataContext = (function() { + v1beta.QueryDataResponse = (function() { /** - * Properties of a QueryDataContext. + * Properties of a QueryDataResponse. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IQueryDataContext - * @property {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null} [datasourceReferences] QueryDataContext datasourceReferences + * @interface IQueryDataResponse + * @property {string|null} [generatedQuery] QueryDataResponse generatedQuery + * @property {string|null} [intentExplanation] QueryDataResponse intentExplanation + * @property {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult|null} [queryResult] QueryDataResponse queryResult + * @property {string|null} [naturalLanguageAnswer] QueryDataResponse naturalLanguageAnswer + * @property {Array.|null} [disambiguationQuestion] QueryDataResponse disambiguationQuestion */ /** - * Constructs a new QueryDataContext. + * Constructs a new QueryDataResponse. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a QueryDataContext. - * @implements IQueryDataContext + * @classdesc Represents a QueryDataResponse. + * @implements IQueryDataResponse * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataContext=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataResponse=} [properties] Properties to set */ - function QueryDataContext(properties) { + function QueryDataResponse(properties) { + this.disambiguationQuestion = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43318,77 +44244,136 @@ } /** - * QueryDataContext datasourceReferences. - * @member {google.cloud.geminidataanalytics.v1beta.IDatasourceReferences|null|undefined} datasourceReferences - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * QueryDataResponse generatedQuery. + * @member {string} generatedQuery + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @instance */ - QueryDataContext.prototype.datasourceReferences = null; + QueryDataResponse.prototype.generatedQuery = ""; /** - * Creates a new QueryDataContext instance using the specified properties. + * QueryDataResponse intentExplanation. + * @member {string} intentExplanation + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @instance + */ + QueryDataResponse.prototype.intentExplanation = ""; + + /** + * QueryDataResponse queryResult. + * @member {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult|null|undefined} queryResult + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @instance + */ + QueryDataResponse.prototype.queryResult = null; + + /** + * QueryDataResponse naturalLanguageAnswer. + * @member {string} naturalLanguageAnswer + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @instance + */ + QueryDataResponse.prototype.naturalLanguageAnswer = ""; + + /** + * QueryDataResponse disambiguationQuestion. + * @member {Array.} disambiguationQuestion + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @instance + */ + QueryDataResponse.prototype.disambiguationQuestion = $util.emptyArray; + + /** + * Creates a new QueryDataResponse instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @static - * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataContext=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataContext} QueryDataContext instance + * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataResponse=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataResponse} QueryDataResponse instance */ - QueryDataContext.create = function create(properties) { - return new QueryDataContext(properties); + QueryDataResponse.create = function create(properties) { + return new QueryDataResponse(properties); }; /** - * Encodes the specified QueryDataContext message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.QueryDataContext.verify|verify} messages. + * Encodes the specified QueryDataResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.QueryDataResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @static - * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataContext} message QueryDataContext message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataResponse} message QueryDataResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryDataContext.encode = function encode(message, writer) { + QueryDataResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.datasourceReferences != null && Object.hasOwnProperty.call(message, "datasourceReferences")) - $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.encode(message.datasourceReferences, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.generatedQuery != null && Object.hasOwnProperty.call(message, "generatedQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.generatedQuery); + if (message.intentExplanation != null && Object.hasOwnProperty.call(message, "intentExplanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.intentExplanation); + if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) + $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.encode(message.queryResult, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.naturalLanguageAnswer != null && Object.hasOwnProperty.call(message, "naturalLanguageAnswer")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.naturalLanguageAnswer); + if (message.disambiguationQuestion != null && message.disambiguationQuestion.length) + for (var i = 0; i < message.disambiguationQuestion.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.disambiguationQuestion[i]); return writer; }; /** - * Encodes the specified QueryDataContext message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.QueryDataContext.verify|verify} messages. + * Encodes the specified QueryDataResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.QueryDataResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @static - * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataContext} message QueryDataContext message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataResponse} message QueryDataResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryDataContext.encodeDelimited = function encodeDelimited(message, writer) { + QueryDataResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryDataContext message from the specified reader or buffer. + * Decodes a QueryDataResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataContext} QueryDataContext + * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataResponse} QueryDataResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryDataContext.decode = function decode(reader, length, error) { + QueryDataResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.QueryDataContext(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.QueryDataResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.decode(reader, reader.uint32()); + message.generatedQuery = reader.string(); + break; + } + case 2: { + message.intentExplanation = reader.string(); + break; + } + case 3: { + message.queryResult = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.decode(reader, reader.uint32()); + break; + } + case 4: { + message.naturalLanguageAnswer = reader.string(); + break; + } + case 5: { + if (!(message.disambiguationQuestion && message.disambiguationQuestion.length)) + message.disambiguationQuestion = []; + message.disambiguationQuestion.push(reader.string()); break; } default: @@ -43400,132 +44385,179 @@ }; /** - * Decodes a QueryDataContext message from the specified reader or buffer, length delimited. + * Decodes a QueryDataResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataContext} QueryDataContext + * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataResponse} QueryDataResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryDataContext.decodeDelimited = function decodeDelimited(reader) { + QueryDataResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryDataContext message. + * Verifies a QueryDataResponse message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryDataContext.verify = function verify(message) { + QueryDataResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.verify(message.datasourceReferences); + if (message.generatedQuery != null && message.hasOwnProperty("generatedQuery")) + if (!$util.isString(message.generatedQuery)) + return "generatedQuery: string expected"; + if (message.intentExplanation != null && message.hasOwnProperty("intentExplanation")) + if (!$util.isString(message.intentExplanation)) + return "intentExplanation: string expected"; + if (message.queryResult != null && message.hasOwnProperty("queryResult")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.verify(message.queryResult); if (error) - return "datasourceReferences." + error; + return "queryResult." + error; + } + if (message.naturalLanguageAnswer != null && message.hasOwnProperty("naturalLanguageAnswer")) + if (!$util.isString(message.naturalLanguageAnswer)) + return "naturalLanguageAnswer: string expected"; + if (message.disambiguationQuestion != null && message.hasOwnProperty("disambiguationQuestion")) { + if (!Array.isArray(message.disambiguationQuestion)) + return "disambiguationQuestion: array expected"; + for (var i = 0; i < message.disambiguationQuestion.length; ++i) + if (!$util.isString(message.disambiguationQuestion[i])) + return "disambiguationQuestion: string[] expected"; } return null; }; /** - * Creates a QueryDataContext message from a plain object. Also converts values to their respective internal types. + * Creates a QueryDataResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataContext} QueryDataContext + * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataResponse} QueryDataResponse */ - QueryDataContext.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.QueryDataContext) + QueryDataResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.QueryDataResponse) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.QueryDataContext(); - if (object.datasourceReferences != null) { - if (typeof object.datasourceReferences !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.QueryDataContext.datasourceReferences: object expected"); - message.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.fromObject(object.datasourceReferences); + var message = new $root.google.cloud.geminidataanalytics.v1beta.QueryDataResponse(); + if (object.generatedQuery != null) + message.generatedQuery = String(object.generatedQuery); + if (object.intentExplanation != null) + message.intentExplanation = String(object.intentExplanation); + if (object.queryResult != null) { + if (typeof object.queryResult !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.QueryDataResponse.queryResult: object expected"); + message.queryResult = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.fromObject(object.queryResult); + } + if (object.naturalLanguageAnswer != null) + message.naturalLanguageAnswer = String(object.naturalLanguageAnswer); + if (object.disambiguationQuestion) { + if (!Array.isArray(object.disambiguationQuestion)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.QueryDataResponse.disambiguationQuestion: array expected"); + message.disambiguationQuestion = []; + for (var i = 0; i < object.disambiguationQuestion.length; ++i) + message.disambiguationQuestion[i] = String(object.disambiguationQuestion[i]); } return message; }; /** - * Creates a plain object from a QueryDataContext message. Also converts values to other types if specified. + * Creates a plain object from a QueryDataResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @static - * @param {google.cloud.geminidataanalytics.v1beta.QueryDataContext} message QueryDataContext + * @param {google.cloud.geminidataanalytics.v1beta.QueryDataResponse} message QueryDataResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryDataContext.toObject = function toObject(message, options) { + QueryDataResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.datasourceReferences = null; - if (message.datasourceReferences != null && message.hasOwnProperty("datasourceReferences")) - object.datasourceReferences = $root.google.cloud.geminidataanalytics.v1beta.DatasourceReferences.toObject(message.datasourceReferences, options); + if (options.arrays || options.defaults) + object.disambiguationQuestion = []; + if (options.defaults) { + object.generatedQuery = ""; + object.intentExplanation = ""; + object.queryResult = null; + object.naturalLanguageAnswer = ""; + } + if (message.generatedQuery != null && message.hasOwnProperty("generatedQuery")) + object.generatedQuery = message.generatedQuery; + if (message.intentExplanation != null && message.hasOwnProperty("intentExplanation")) + object.intentExplanation = message.intentExplanation; + if (message.queryResult != null && message.hasOwnProperty("queryResult")) + object.queryResult = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.toObject(message.queryResult, options); + if (message.naturalLanguageAnswer != null && message.hasOwnProperty("naturalLanguageAnswer")) + object.naturalLanguageAnswer = message.naturalLanguageAnswer; + if (message.disambiguationQuestion && message.disambiguationQuestion.length) { + object.disambiguationQuestion = []; + for (var j = 0; j < message.disambiguationQuestion.length; ++j) + object.disambiguationQuestion[j] = message.disambiguationQuestion[j]; + } return object; }; /** - * Converts this QueryDataContext to JSON. + * Converts this QueryDataResponse to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @instance * @returns {Object.} JSON object */ - QueryDataContext.prototype.toJSON = function toJSON() { + QueryDataResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QueryDataContext + * Gets the default type url for QueryDataResponse * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataContext + * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QueryDataContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QueryDataResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.QueryDataContext"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.QueryDataResponse"; }; - return QueryDataContext; + return QueryDataResponse; })(); - v1beta.QueryDataResponse = (function() { + v1beta.ExecutedQueryResult = (function() { /** - * Properties of a QueryDataResponse. + * Properties of an ExecutedQueryResult. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IQueryDataResponse - * @property {string|null} [generatedQuery] QueryDataResponse generatedQuery - * @property {string|null} [intentExplanation] QueryDataResponse intentExplanation - * @property {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult|null} [queryResult] QueryDataResponse queryResult - * @property {string|null} [naturalLanguageAnswer] QueryDataResponse naturalLanguageAnswer - * @property {Array.|null} [disambiguationQuestion] QueryDataResponse disambiguationQuestion + * @interface IExecutedQueryResult + * @property {Array.|null} [columns] ExecutedQueryResult columns + * @property {Array.|null} [rows] ExecutedQueryResult rows + * @property {number|Long|null} [totalRowCount] ExecutedQueryResult totalRowCount + * @property {boolean|null} [partialResult] ExecutedQueryResult partialResult + * @property {string|null} [queryExecutionError] ExecutedQueryResult queryExecutionError */ /** - * Constructs a new QueryDataResponse. + * Constructs a new ExecutedQueryResult. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a QueryDataResponse. - * @implements IQueryDataResponse + * @classdesc Represents an ExecutedQueryResult. + * @implements IExecutedQueryResult * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataResponse=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult=} [properties] Properties to set */ - function QueryDataResponse(properties) { - this.disambiguationQuestion = []; + function ExecutedQueryResult(properties) { + this.columns = []; + this.rows = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43533,136 +44565,139 @@ } /** - * QueryDataResponse generatedQuery. - * @member {string} generatedQuery - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * ExecutedQueryResult columns. + * @member {Array.} columns + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @instance */ - QueryDataResponse.prototype.generatedQuery = ""; + ExecutedQueryResult.prototype.columns = $util.emptyArray; /** - * QueryDataResponse intentExplanation. - * @member {string} intentExplanation - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * ExecutedQueryResult rows. + * @member {Array.} rows + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @instance */ - QueryDataResponse.prototype.intentExplanation = ""; + ExecutedQueryResult.prototype.rows = $util.emptyArray; /** - * QueryDataResponse queryResult. - * @member {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult|null|undefined} queryResult - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * ExecutedQueryResult totalRowCount. + * @member {number|Long} totalRowCount + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @instance */ - QueryDataResponse.prototype.queryResult = null; + ExecutedQueryResult.prototype.totalRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * QueryDataResponse naturalLanguageAnswer. - * @member {string} naturalLanguageAnswer - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * ExecutedQueryResult partialResult. + * @member {boolean} partialResult + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @instance */ - QueryDataResponse.prototype.naturalLanguageAnswer = ""; + ExecutedQueryResult.prototype.partialResult = false; /** - * QueryDataResponse disambiguationQuestion. - * @member {Array.} disambiguationQuestion - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * ExecutedQueryResult queryExecutionError. + * @member {string} queryExecutionError + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @instance */ - QueryDataResponse.prototype.disambiguationQuestion = $util.emptyArray; + ExecutedQueryResult.prototype.queryExecutionError = ""; /** - * Creates a new QueryDataResponse instance using the specified properties. + * Creates a new ExecutedQueryResult instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataResponse=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataResponse} QueryDataResponse instance + * @param {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult} ExecutedQueryResult instance */ - QueryDataResponse.create = function create(properties) { - return new QueryDataResponse(properties); + ExecutedQueryResult.create = function create(properties) { + return new ExecutedQueryResult(properties); }; /** - * Encodes the specified QueryDataResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.QueryDataResponse.verify|verify} messages. + * Encodes the specified ExecutedQueryResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataResponse} message QueryDataResponse message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult} message ExecutedQueryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryDataResponse.encode = function encode(message, writer) { + ExecutedQueryResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.generatedQuery != null && Object.hasOwnProperty.call(message, "generatedQuery")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.generatedQuery); - if (message.intentExplanation != null && Object.hasOwnProperty.call(message, "intentExplanation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.intentExplanation); - if (message.queryResult != null && Object.hasOwnProperty.call(message, "queryResult")) - $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.encode(message.queryResult, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.naturalLanguageAnswer != null && Object.hasOwnProperty.call(message, "naturalLanguageAnswer")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.naturalLanguageAnswer); - if (message.disambiguationQuestion != null && message.disambiguationQuestion.length) - for (var i = 0; i < message.disambiguationQuestion.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.disambiguationQuestion[i]); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.encode(message.rows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalRowCount != null && Object.hasOwnProperty.call(message, "totalRowCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalRowCount); + if (message.partialResult != null && Object.hasOwnProperty.call(message, "partialResult")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.partialResult); + if (message.queryExecutionError != null && Object.hasOwnProperty.call(message, "queryExecutionError")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.queryExecutionError); return writer; }; /** - * Encodes the specified QueryDataResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.QueryDataResponse.verify|verify} messages. + * Encodes the specified ExecutedQueryResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.IQueryDataResponse} message QueryDataResponse message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult} message ExecutedQueryResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryDataResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExecutedQueryResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryDataResponse message from the specified reader or buffer. + * Decodes an ExecutedQueryResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataResponse} QueryDataResponse + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult} ExecutedQueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryDataResponse.decode = function decode(reader, length, error) { + ExecutedQueryResult.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.QueryDataResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.generatedQuery = reader.string(); + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push($root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.decode(reader, reader.uint32())); break; } case 2: { - message.intentExplanation = reader.string(); + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.decode(reader, reader.uint32())); break; } case 3: { - message.queryResult = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.decode(reader, reader.uint32()); + message.totalRowCount = reader.int64(); break; } case 4: { - message.naturalLanguageAnswer = reader.string(); + message.partialResult = reader.bool(); break; } case 5: { - if (!(message.disambiguationQuestion && message.disambiguationQuestion.length)) - message.disambiguationQuestion = []; - message.disambiguationQuestion.push(reader.string()); + message.queryExecutionError = reader.string(); break; } default: @@ -43674,527 +44709,637 @@ }; /** - * Decodes a QueryDataResponse message from the specified reader or buffer, length delimited. + * Decodes an ExecutedQueryResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataResponse} QueryDataResponse + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult} ExecutedQueryResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryDataResponse.decodeDelimited = function decodeDelimited(reader) { + ExecutedQueryResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryDataResponse message. + * Verifies an ExecutedQueryResult message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryDataResponse.verify = function verify(message) { + ExecutedQueryResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.generatedQuery != null && message.hasOwnProperty("generatedQuery")) - if (!$util.isString(message.generatedQuery)) - return "generatedQuery: string expected"; - if (message.intentExplanation != null && message.hasOwnProperty("intentExplanation")) - if (!$util.isString(message.intentExplanation)) - return "intentExplanation: string expected"; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.verify(message.queryResult); - if (error) - return "queryResult." + error; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.verify(message.columns[i]); + if (error) + return "columns." + error; + } } - if (message.naturalLanguageAnswer != null && message.hasOwnProperty("naturalLanguageAnswer")) - if (!$util.isString(message.naturalLanguageAnswer)) - return "naturalLanguageAnswer: string expected"; - if (message.disambiguationQuestion != null && message.hasOwnProperty("disambiguationQuestion")) { - if (!Array.isArray(message.disambiguationQuestion)) - return "disambiguationQuestion: array expected"; - for (var i = 0; i < message.disambiguationQuestion.length; ++i) - if (!$util.isString(message.disambiguationQuestion[i])) - return "disambiguationQuestion: string[] expected"; + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.verify(message.rows[i]); + if (error) + return "rows." + error; + } } + if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) + if (!$util.isInteger(message.totalRowCount) && !(message.totalRowCount && $util.isInteger(message.totalRowCount.low) && $util.isInteger(message.totalRowCount.high))) + return "totalRowCount: integer|Long expected"; + if (message.partialResult != null && message.hasOwnProperty("partialResult")) + if (typeof message.partialResult !== "boolean") + return "partialResult: boolean expected"; + if (message.queryExecutionError != null && message.hasOwnProperty("queryExecutionError")) + if (!$util.isString(message.queryExecutionError)) + return "queryExecutionError: string expected"; return null; }; /** - * Creates a QueryDataResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExecutedQueryResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.QueryDataResponse} QueryDataResponse + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult} ExecutedQueryResult */ - QueryDataResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.QueryDataResponse) + ExecutedQueryResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.QueryDataResponse(); - if (object.generatedQuery != null) - message.generatedQuery = String(object.generatedQuery); - if (object.intentExplanation != null) - message.intentExplanation = String(object.intentExplanation); - if (object.queryResult != null) { - if (typeof object.queryResult !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.QueryDataResponse.queryResult: object expected"); - message.queryResult = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.fromObject(object.queryResult); + var message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult(); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) { + if (typeof object.columns[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.columns: object expected"); + message.columns[i] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.fromObject(object.columns[i]); + } } - if (object.naturalLanguageAnswer != null) - message.naturalLanguageAnswer = String(object.naturalLanguageAnswer); - if (object.disambiguationQuestion) { - if (!Array.isArray(object.disambiguationQuestion)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.QueryDataResponse.disambiguationQuestion: array expected"); - message.disambiguationQuestion = []; - for (var i = 0; i < object.disambiguationQuestion.length; ++i) - message.disambiguationQuestion[i] = String(object.disambiguationQuestion[i]); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.rows: object expected"); + message.rows[i] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.fromObject(object.rows[i]); + } } + if (object.totalRowCount != null) + if ($util.Long) + (message.totalRowCount = $util.Long.fromValue(object.totalRowCount)).unsigned = false; + else if (typeof object.totalRowCount === "string") + message.totalRowCount = parseInt(object.totalRowCount, 10); + else if (typeof object.totalRowCount === "number") + message.totalRowCount = object.totalRowCount; + else if (typeof object.totalRowCount === "object") + message.totalRowCount = new $util.LongBits(object.totalRowCount.low >>> 0, object.totalRowCount.high >>> 0).toNumber(); + if (object.partialResult != null) + message.partialResult = Boolean(object.partialResult); + if (object.queryExecutionError != null) + message.queryExecutionError = String(object.queryExecutionError); return message; }; /** - * Creates a plain object from a QueryDataResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExecutedQueryResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.QueryDataResponse} message QueryDataResponse + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult} message ExecutedQueryResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryDataResponse.toObject = function toObject(message, options) { + ExecutedQueryResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.disambiguationQuestion = []; + if (options.arrays || options.defaults) { + object.columns = []; + object.rows = []; + } if (options.defaults) { - object.generatedQuery = ""; - object.intentExplanation = ""; - object.queryResult = null; - object.naturalLanguageAnswer = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalRowCount = options.longs === String ? "0" : 0; + object.partialResult = false; + object.queryExecutionError = ""; } - if (message.generatedQuery != null && message.hasOwnProperty("generatedQuery")) - object.generatedQuery = message.generatedQuery; - if (message.intentExplanation != null && message.hasOwnProperty("intentExplanation")) - object.intentExplanation = message.intentExplanation; - if (message.queryResult != null && message.hasOwnProperty("queryResult")) - object.queryResult = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.toObject(message.queryResult, options); - if (message.naturalLanguageAnswer != null && message.hasOwnProperty("naturalLanguageAnswer")) - object.naturalLanguageAnswer = message.naturalLanguageAnswer; - if (message.disambiguationQuestion && message.disambiguationQuestion.length) { - object.disambiguationQuestion = []; - for (var j = 0; j < message.disambiguationQuestion.length; ++j) - object.disambiguationQuestion[j] = message.disambiguationQuestion[j]; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.toObject(message.columns[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.toObject(message.rows[j], options); } + if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) + if (typeof message.totalRowCount === "number") + object.totalRowCount = options.longs === String ? String(message.totalRowCount) : message.totalRowCount; + else + object.totalRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalRowCount) : options.longs === Number ? new $util.LongBits(message.totalRowCount.low >>> 0, message.totalRowCount.high >>> 0).toNumber() : message.totalRowCount; + if (message.partialResult != null && message.hasOwnProperty("partialResult")) + object.partialResult = message.partialResult; + if (message.queryExecutionError != null && message.hasOwnProperty("queryExecutionError")) + object.queryExecutionError = message.queryExecutionError; return object; }; /** - * Converts this QueryDataResponse to JSON. + * Converts this ExecutedQueryResult to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @instance * @returns {Object.} JSON object */ - QueryDataResponse.prototype.toJSON = function toJSON() { + ExecutedQueryResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QueryDataResponse + * Gets the default type url for ExecutedQueryResult * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.QueryDataResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QueryDataResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExecutedQueryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.QueryDataResponse"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult"; }; - return QueryDataResponse; - })(); + ExecutedQueryResult.Column = (function() { + + /** + * Properties of a Column. + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult + * @interface IColumn + * @property {string|null} [name] Column name + * @property {string|null} [type] Column type + */ + + /** + * Constructs a new Column. + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult + * @classdesc Represents a Column. + * @implements IColumn + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IColumn=} [properties] Properties to set + */ + function Column(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Column name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @instance + */ + Column.prototype.name = ""; + + /** + * Column type. + * @member {string} type + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @instance + */ + Column.prototype.type = ""; + + /** + * Creates a new Column instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IColumn=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column} Column instance + */ + Column.create = function create(properties) { + return new Column(properties); + }; + + /** + * Encodes the specified Column message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + return writer; + }; + + /** + * Encodes the specified Column message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IColumn} message Column message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Column.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Column message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Column message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column} Column + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Column.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Column message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Column.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; - v1beta.ExecutedQueryResult = (function() { + /** + * Creates a Column message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column} Column + */ + Column.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + return message; + }; - /** - * Properties of an ExecutedQueryResult. - * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IExecutedQueryResult - * @property {Array.|null} [columns] ExecutedQueryResult columns - * @property {Array.|null} [rows] ExecutedQueryResult rows - * @property {number|Long|null} [totalRowCount] ExecutedQueryResult totalRowCount - * @property {boolean|null} [partialResult] ExecutedQueryResult partialResult - * @property {string|null} [queryExecutionError] ExecutedQueryResult queryExecutionError - */ + /** + * Creates a plain object from a Column message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column} message Column + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Column.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; - /** - * Constructs a new ExecutedQueryResult. - * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents an ExecutedQueryResult. - * @implements IExecutedQueryResult - * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult=} [properties] Properties to set - */ - function ExecutedQueryResult(properties) { - this.columns = []; - this.rows = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this Column to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @instance + * @returns {Object.} JSON object + */ + Column.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ExecutedQueryResult columns. - * @member {Array.} columns - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @instance - */ - ExecutedQueryResult.prototype.columns = $util.emptyArray; + /** + * Gets the default type url for Column + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Column.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column"; + }; - /** - * ExecutedQueryResult rows. - * @member {Array.} rows - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @instance - */ - ExecutedQueryResult.prototype.rows = $util.emptyArray; + return Column; + })(); - /** - * ExecutedQueryResult totalRowCount. - * @member {number|Long} totalRowCount - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @instance - */ - ExecutedQueryResult.prototype.totalRowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ExecutedQueryResult.Value = (function() { - /** - * ExecutedQueryResult partialResult. - * @member {boolean} partialResult - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @instance - */ - ExecutedQueryResult.prototype.partialResult = false; + /** + * Properties of a Value. + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult + * @interface IValue + * @property {string|null} [value] Value value + */ - /** - * ExecutedQueryResult queryExecutionError. - * @member {string} queryExecutionError - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @instance - */ - ExecutedQueryResult.prototype.queryExecutionError = ""; + /** + * Constructs a new Value. + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new ExecutedQueryResult instance using the specified properties. - * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @static - * @param {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult} ExecutedQueryResult instance - */ - ExecutedQueryResult.create = function create(properties) { - return new ExecutedQueryResult(properties); - }; + /** + * Value value. + * @member {string} value + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @instance + */ + Value.prototype.value = ""; - /** - * Encodes the specified ExecutedQueryResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @static - * @param {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult} message ExecutedQueryResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutedQueryResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.encode(message.columns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.encode(message.rows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.totalRowCount != null && Object.hasOwnProperty.call(message, "totalRowCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalRowCount); - if (message.partialResult != null && Object.hasOwnProperty.call(message, "partialResult")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.partialResult); - if (message.queryExecutionError != null && Object.hasOwnProperty.call(message, "queryExecutionError")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.queryExecutionError); - return writer; - }; + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IValue=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; - /** - * Encodes the specified ExecutedQueryResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @static - * @param {google.cloud.geminidataanalytics.v1beta.IExecutedQueryResult} message ExecutedQueryResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecutedQueryResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Value message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; - /** - * Decodes an ExecutedQueryResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult} ExecutedQueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutedQueryResult.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push($root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.decode(reader, reader.uint32())); - break; - } - case 3: { - message.totalRowCount = reader.int64(); - break; - } - case 4: { - message.partialResult = reader.bool(); + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 5: { - message.queryExecutionError = reader.string(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an ExecutedQueryResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult} ExecutedQueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecutedQueryResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an ExecutedQueryResult message. - * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecutedQueryResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.verify(message.columns[i]); - if (error) - return "columns." + error; - } - } - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.verify(message.rows[i]); - if (error) - return "rows." + error; - } - } - if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) - if (!$util.isInteger(message.totalRowCount) && !(message.totalRowCount && $util.isInteger(message.totalRowCount.low) && $util.isInteger(message.totalRowCount.high))) - return "totalRowCount: integer|Long expected"; - if (message.partialResult != null && message.hasOwnProperty("partialResult")) - if (typeof message.partialResult !== "boolean") - return "partialResult: boolean expected"; - if (message.queryExecutionError != null && message.hasOwnProperty("queryExecutionError")) - if (!$util.isString(message.queryExecutionError)) - return "queryExecutionError: string expected"; - return null; - }; + /** + * Verifies a Value message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; - /** - * Creates an ExecutedQueryResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult} ExecutedQueryResult - */ - ExecutedQueryResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult) - return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult(); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) { - if (typeof object.columns[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.columns: object expected"); - message.columns[i] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.fromObject(object.columns[i]); - } - } - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.rows: object expected"); - message.rows[i] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.fromObject(object.rows[i]); - } - } - if (object.totalRowCount != null) - if ($util.Long) - (message.totalRowCount = $util.Long.fromValue(object.totalRowCount)).unsigned = false; - else if (typeof object.totalRowCount === "string") - message.totalRowCount = parseInt(object.totalRowCount, 10); - else if (typeof object.totalRowCount === "number") - message.totalRowCount = object.totalRowCount; - else if (typeof object.totalRowCount === "object") - message.totalRowCount = new $util.LongBits(object.totalRowCount.low >>> 0, object.totalRowCount.high >>> 0).toNumber(); - if (object.partialResult != null) - message.partialResult = Boolean(object.partialResult); - if (object.queryExecutionError != null) - message.queryExecutionError = String(object.queryExecutionError); - return message; - }; + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value) + return object; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; - /** - * Creates a plain object from an ExecutedQueryResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult} message ExecutedQueryResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecutedQueryResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.columns = []; - object.rows = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalRowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalRowCount = options.longs === String ? "0" : 0; - object.partialResult = false; - object.queryExecutionError = ""; - } - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.toObject(message.columns[j], options); - } - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.toObject(message.rows[j], options); - } - if (message.totalRowCount != null && message.hasOwnProperty("totalRowCount")) - if (typeof message.totalRowCount === "number") - object.totalRowCount = options.longs === String ? String(message.totalRowCount) : message.totalRowCount; - else - object.totalRowCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalRowCount) : options.longs === Number ? new $util.LongBits(message.totalRowCount.low >>> 0, message.totalRowCount.high >>> 0).toNumber() : message.totalRowCount; - if (message.partialResult != null && message.hasOwnProperty("partialResult")) - object.partialResult = message.partialResult; - if (message.queryExecutionError != null && message.hasOwnProperty("queryExecutionError")) - object.queryExecutionError = message.queryExecutionError; - return object; - }; + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this ExecutedQueryResult to JSON. - * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @instance - * @returns {Object.} JSON object - */ - ExecutedQueryResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value"; + }; - /** - * Gets the default type url for ExecutedQueryResult - * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecutedQueryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult"; - }; + return Value; + })(); - ExecutedQueryResult.Column = (function() { + ExecutedQueryResult.Row = (function() { /** - * Properties of a Column. + * Properties of a Row. * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @interface IColumn - * @property {string|null} [name] Column name - * @property {string|null} [type] Column type + * @interface IRow + * @property {Array.|null} [values] Row values */ /** - * Constructs a new Column. + * Constructs a new Row. * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @classdesc Represents a Column. - * @implements IColumn + * @classdesc Represents a Row. + * @implements IRow * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IColumn=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IRow=} [properties] Properties to set */ - function Column(properties) { + function Row(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44202,91 +45347,80 @@ } /** - * Column name. - * @member {string} name - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column - * @instance - */ - Column.prototype.name = ""; - - /** - * Column type. - * @member {string} type - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * Row values. + * @member {Array.} values + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @instance */ - Column.prototype.type = ""; + Row.prototype.values = $util.emptyArray; /** - * Creates a new Column instance using the specified properties. + * Creates a new Row instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IColumn=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column} Column instance + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IRow=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row} Row instance */ - Column.create = function create(properties) { - return new Column(properties); + Row.create = function create(properties) { + return new Row(properties); }; /** - * Encodes the specified Column message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.verify|verify} messages. + * Encodes the specified Row message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IColumn} message Column message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IRow} message Row message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Column.encode = function encode(message, writer) { + Row.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified Column message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column.verify|verify} messages. + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IColumn} message Column message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IRow} message Row message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Column.encodeDelimited = function encodeDelimited(message, writer) { + Row.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Column message from the specified reader or buffer. + * Decodes a Row message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column} Column + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row} Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Column.decode = function decode(reader, length, error) { + Row.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.string(); + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.decode(reader, reader.uint32())); break; } default: @@ -44298,568 +45432,668 @@ }; /** - * Decodes a Column message from the specified reader or buffer, length delimited. + * Decodes a Row message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column} Column + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row} Row * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Column.decodeDelimited = function decodeDelimited(reader) { + Row.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Column message. + * Verifies a Row message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Column.verify = function verify(message) { + Row.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } return null; }; /** - * Creates a Column message from a plain object. Also converts values to their respective internal types. + * Creates a Row message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column} Column + * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row} Row */ - Column.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column) + Row.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); + var message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.values: object expected"); + message.values[i] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.fromObject(object.values[i]); + } + } return message; }; /** - * Creates a plain object from a Column message. Also converts values to other types if specified. + * Creates a plain object from a Row message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column} message Column + * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row} message Row * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Column.toObject = function toObject(message, options) { + Row.toObject = function toObject(message, options) { if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = ""; + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.toObject(message.values[j], options); } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; return object; }; /** - * Converts this Column to JSON. + * Converts this Row to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @instance * @returns {Object.} JSON object */ - Column.prototype.toJSON = function toJSON() { + Row.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Column + * Gets the default type url for Row * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column + * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Column.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Column"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row"; }; - return Column; + return Row; })(); - ExecutedQueryResult.Value = (function() { + return ExecutedQueryResult; + })(); - /** - * Properties of a Value. - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @interface IValue - * @property {string|null} [value] Value value - */ + v1beta.ListMessagesRequest = (function() { - /** - * Constructs a new Value. - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IValue=} [properties] Properties to set - */ - function Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ListMessagesRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IListMessagesRequest + * @property {string|null} [parent] ListMessagesRequest parent + * @property {number|null} [pageSize] ListMessagesRequest pageSize + * @property {string|null} [pageToken] ListMessagesRequest pageToken + * @property {string|null} [filter] ListMessagesRequest filter + */ - /** - * Value value. - * @member {string} value - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @instance - */ - Value.prototype.value = ""; + /** + * Constructs a new ListMessagesRequest. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ListMessagesRequest. + * @implements IListMessagesRequest + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest=} [properties] Properties to set + */ + function ListMessagesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IValue=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; + /** + * ListMessagesRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.parent = ""; - /** - * Encodes the specified Value message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.verify|verify} messages. - * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; + /** + * ListMessagesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.pageSize = 0; - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListMessagesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.pageToken = ""; - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + /** + * ListMessagesRequest filter. + * @member {string} filter + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @instance + */ + ListMessagesRequest.prototype.filter = ""; + + /** + * Creates a new ListMessagesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest instance + */ + ListMessagesRequest.create = function create(properties) { + return new ListMessagesRequest(properties); + }; + + /** + * Encodes the specified ListMessagesRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest} message ListMessagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest} message ListMessagesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessagesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); break; - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a Value message. - * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; + /** + * Decodes a ListMessagesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value) - return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value(); - if (object.value != null) - message.value = String(object.value); - return message; - }; + /** + * Verifies a ListMessagesRequest message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessagesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + /** + * Creates a ListMessagesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest + */ + ListMessagesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest) return object; - }; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListMessagesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} message ListMessagesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessagesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value"; - }; + /** + * Converts this ListMessagesRequest to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @instance + * @returns {Object.} JSON object + */ + ListMessagesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Value; - })(); + /** + * Gets the default type url for ListMessagesRequest + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListMessagesRequest"; + }; - ExecutedQueryResult.Row = (function() { + return ListMessagesRequest; + })(); - /** - * Properties of a Row. - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @interface IRow - * @property {Array.|null} [values] Row values - */ + v1beta.ListMessagesResponse = (function() { - /** - * Constructs a new Row. - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult - * @classdesc Represents a Row. - * @implements IRow - * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IRow=} [properties] Properties to set - */ - function Row(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ListMessagesResponse. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IListMessagesResponse + * @property {Array.|null} [messages] ListMessagesResponse messages + * @property {string|null} [nextPageToken] ListMessagesResponse nextPageToken + */ + + /** + * Constructs a new ListMessagesResponse. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ListMessagesResponse. + * @implements IListMessagesResponse + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse=} [properties] Properties to set + */ + function ListMessagesResponse(properties) { + this.messages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Row values. - * @member {Array.} values - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @instance - */ - Row.prototype.values = $util.emptyArray; + /** + * ListMessagesResponse messages. + * @member {Array.} messages + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @instance + */ + ListMessagesResponse.prototype.messages = $util.emptyArray; - /** - * Creates a new Row instance using the specified properties. - * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IRow=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row} Row instance - */ - Row.create = function create(properties) { - return new Row(properties); - }; + /** + * ListMessagesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @instance + */ + ListMessagesResponse.prototype.nextPageToken = ""; - /** - * Encodes the specified Row message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.verify|verify} messages. - * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Creates a new ListMessagesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse instance + */ + ListMessagesResponse.create = function create(properties) { + return new ListMessagesResponse(properties); + }; - /** - * Encodes the specified Row message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.IRow} message Row message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Row.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ListMessagesResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse} message ListMessagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; - /** - * Decodes a Row message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + /** + * Encodes the specified ListMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse} message ListMessagesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMessagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.geminidataanalytics.v1beta.StorageMessage.decode(reader, reader.uint32())); break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); + } + case 2: { + message.nextPageToken = reader.string(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a Row message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row} Row - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Row.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a Row message. - * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Row.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; + /** + * Decodes a ListMessagesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMessagesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Row message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row} Row - */ - Row.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row) - return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row.values: object expected"); - message.values[i] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.fromObject(object.values[i]); - } + /** + * Verifies a ListMessagesResponse message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMessagesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.verify(message.messages[i]); + if (error) + return "messages." + error; } - return message; - }; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Creates a plain object from a Row message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @static - * @param {google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row} message Row - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Row.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Value.toObject(message.values[j], options); - } + /** + * Creates a ListMessagesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse + */ + ListMessagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse) return object; - }; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.messages: object expected"); + message.messages[i] = $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.fromObject(object.messages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * Converts this Row to JSON. - * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @instance - * @returns {Object.} JSON object - */ - Row.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListMessagesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} message ListMessagesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMessagesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.toObject(message.messages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * Gets the default type url for Row - * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult.Row"; - }; + /** + * Converts this ListMessagesResponse to JSON. + * @function toJSON + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @instance + * @returns {Object.} JSON object + */ + ListMessagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Row; - })(); + /** + * Gets the default type url for ListMessagesResponse + * @function getTypeUrl + * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListMessagesResponse"; + }; - return ExecutedQueryResult; + return ListMessagesResponse; })(); - v1beta.ListMessagesRequest = (function() { + v1beta.StorageMessage = (function() { /** - * Properties of a ListMessagesRequest. + * Properties of a StorageMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IListMessagesRequest - * @property {string|null} [parent] ListMessagesRequest parent - * @property {number|null} [pageSize] ListMessagesRequest pageSize - * @property {string|null} [pageToken] ListMessagesRequest pageToken - * @property {string|null} [filter] ListMessagesRequest filter + * @interface IStorageMessage + * @property {string|null} [messageId] StorageMessage messageId + * @property {google.cloud.geminidataanalytics.v1beta.IMessage|null} [message] StorageMessage message */ /** - * Constructs a new ListMessagesRequest. + * Constructs a new StorageMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a ListMessagesRequest. - * @implements IListMessagesRequest + * @classdesc Represents a StorageMessage. + * @implements IStorageMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage=} [properties] Properties to set */ - function ListMessagesRequest(properties) { + function StorageMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44867,119 +46101,91 @@ } /** - * ListMessagesRequest parent. - * @member {string} parent - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest - * @instance - */ - ListMessagesRequest.prototype.parent = ""; - - /** - * ListMessagesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest - * @instance - */ - ListMessagesRequest.prototype.pageSize = 0; - - /** - * ListMessagesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * StorageMessage messageId. + * @member {string} messageId + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @instance */ - ListMessagesRequest.prototype.pageToken = ""; + StorageMessage.prototype.messageId = ""; /** - * ListMessagesRequest filter. - * @member {string} filter - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * StorageMessage message. + * @member {google.cloud.geminidataanalytics.v1beta.IMessage|null|undefined} message + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @instance */ - ListMessagesRequest.prototype.filter = ""; + StorageMessage.prototype.message = null; /** - * Creates a new ListMessagesRequest instance using the specified properties. + * Creates a new StorageMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest instance + * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage instance */ - ListMessagesRequest.create = function create(properties) { - return new ListMessagesRequest(properties); + StorageMessage.create = function create(properties) { + return new StorageMessage(properties); }; /** - * Encodes the specified ListMessagesRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesRequest.verify|verify} messages. + * Encodes the specified StorageMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StorageMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest} message ListMessagesRequest message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage} message StorageMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMessagesRequest.encode = function encode(message, writer) { + StorageMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.messageId); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.google.cloud.geminidataanalytics.v1beta.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListMessagesRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesRequest.verify|verify} messages. + * Encodes the specified StorageMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StorageMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesRequest} message ListMessagesRequest message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage} message StorageMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMessagesRequest.encodeDelimited = function encodeDelimited(message, writer) { + StorageMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMessagesRequest message from the specified reader or buffer. + * Decodes a StorageMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest + * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMessagesRequest.decode = function decode(reader, length, error) { + StorageMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.StorageMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); + message.messageId = reader.string(); break; } - case 5: { - message.filter = reader.string(); + case 2: { + message.message = $root.google.cloud.geminidataanalytics.v1beta.Message.decode(reader, reader.uint32()); break; } default: @@ -44991,148 +46197,142 @@ }; /** - * Decodes a ListMessagesRequest message from the specified reader or buffer, length delimited. + * Decodes a StorageMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest + * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMessagesRequest.decodeDelimited = function decodeDelimited(reader) { + StorageMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMessagesRequest message. + * Verifies a StorageMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMessagesRequest.verify = function verify(message) { + StorageMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.messageId != null && message.hasOwnProperty("messageId")) + if (!$util.isString(message.messageId)) + return "messageId: string expected"; + if (message.message != null && message.hasOwnProperty("message")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Message.verify(message.message); + if (error) + return "message." + error; + } return null; }; /** - * Creates a ListMessagesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a StorageMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} ListMessagesRequest + * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage */ - ListMessagesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest) + StorageMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.StorageMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.geminidataanalytics.v1beta.StorageMessage(); + if (object.messageId != null) + message.messageId = String(object.messageId); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.StorageMessage.message: object expected"); + message.message = $root.google.cloud.geminidataanalytics.v1beta.Message.fromObject(object.message); + } return message; }; /** - * Creates a plain object from a ListMessagesRequest message. Also converts values to other types if specified. + * Creates a plain object from a StorageMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.ListMessagesRequest} message ListMessagesRequest + * @param {google.cloud.geminidataanalytics.v1beta.StorageMessage} message StorageMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMessagesRequest.toObject = function toObject(message, options) { + StorageMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; + object.messageId = ""; + object.message = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.messageId != null && message.hasOwnProperty("messageId")) + object.messageId = message.messageId; + if (message.message != null && message.hasOwnProperty("message")) + object.message = $root.google.cloud.geminidataanalytics.v1beta.Message.toObject(message.message, options); return object; }; /** - * Converts this ListMessagesRequest to JSON. + * Converts this StorageMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @instance * @returns {Object.} JSON object */ - ListMessagesRequest.prototype.toJSON = function toJSON() { + StorageMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMessagesRequest + * Gets the default type url for StorageMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesRequest + * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMessagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StorageMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListMessagesRequest"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.StorageMessage"; }; - return ListMessagesRequest; + return StorageMessage; })(); - v1beta.ListMessagesResponse = (function() { + v1beta.ChatRequest = (function() { /** - * Properties of a ListMessagesResponse. + * Properties of a ChatRequest. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IListMessagesResponse - * @property {Array.|null} [messages] ListMessagesResponse messages - * @property {string|null} [nextPageToken] ListMessagesResponse nextPageToken + * @interface IChatRequest + * @property {google.cloud.geminidataanalytics.v1beta.IContext|null} [inlineContext] ChatRequest inlineContext + * @property {google.cloud.geminidataanalytics.v1beta.IConversationReference|null} [conversationReference] ChatRequest conversationReference + * @property {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null} [dataAgentContext] ChatRequest dataAgentContext + * @property {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext|null} [clientManagedResourceContext] ChatRequest clientManagedResourceContext + * @property {string|null} [project] ChatRequest project + * @property {string|null} [parent] ChatRequest parent + * @property {Array.|null} [messages] ChatRequest messages */ /** - * Constructs a new ListMessagesResponse. + * Constructs a new ChatRequest. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a ListMessagesResponse. - * @implements IListMessagesResponse + * @classdesc Represents a ChatRequest. + * @implements IChatRequest * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest=} [properties] Properties to set */ - function ListMessagesResponse(properties) { + function ChatRequest(properties) { this.messages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -45141,94 +46341,178 @@ } /** - * ListMessagesResponse messages. - * @member {Array.} messages - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * ChatRequest inlineContext. + * @member {google.cloud.geminidataanalytics.v1beta.IContext|null|undefined} inlineContext + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @instance */ - ListMessagesResponse.prototype.messages = $util.emptyArray; + ChatRequest.prototype.inlineContext = null; /** - * ListMessagesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * ChatRequest conversationReference. + * @member {google.cloud.geminidataanalytics.v1beta.IConversationReference|null|undefined} conversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @instance */ - ListMessagesResponse.prototype.nextPageToken = ""; + ChatRequest.prototype.conversationReference = null; /** - * Creates a new ListMessagesResponse instance using the specified properties. + * ChatRequest dataAgentContext. + * @member {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null|undefined} dataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.dataAgentContext = null; + + /** + * ChatRequest clientManagedResourceContext. + * @member {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext|null|undefined} clientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.clientManagedResourceContext = null; + + /** + * ChatRequest project. + * @member {string} project + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.project = ""; + + /** + * ChatRequest parent. + * @member {string} parent + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.parent = ""; + + /** + * ChatRequest messages. + * @member {Array.} messages + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + ChatRequest.prototype.messages = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChatRequest contextProvider. + * @member {"inlineContext"|"conversationReference"|"dataAgentContext"|"clientManagedResourceContext"|undefined} contextProvider + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @instance + */ + Object.defineProperty(ChatRequest.prototype, "contextProvider", { + get: $util.oneOfGetter($oneOfFields = ["inlineContext", "conversationReference", "dataAgentContext", "clientManagedResourceContext"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChatRequest instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @static - * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse instance + * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest instance */ - ListMessagesResponse.create = function create(properties) { - return new ListMessagesResponse(properties); + ChatRequest.create = function create(properties) { + return new ChatRequest(properties); }; /** - * Encodes the specified ListMessagesResponse message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.verify|verify} messages. + * Encodes the specified ChatRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChatRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @static - * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse} message ListMessagesResponse message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest} message ChatRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMessagesResponse.encode = function encode(message, writer) { + ChatRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); if (message.messages != null && message.messages.length) for (var i = 0; i < message.messages.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + $root.google.cloud.geminidataanalytics.v1beta.Message.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent); + if (message.inlineContext != null && Object.hasOwnProperty.call(message, "inlineContext")) + $root.google.cloud.geminidataanalytics.v1beta.Context.encode(message.inlineContext, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.conversationReference != null && Object.hasOwnProperty.call(message, "conversationReference")) + $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.encode(message.conversationReference, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.dataAgentContext != null && Object.hasOwnProperty.call(message, "dataAgentContext")) + $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.encode(message.dataAgentContext, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.clientManagedResourceContext != null && Object.hasOwnProperty.call(message, "clientManagedResourceContext")) + $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.encode(message.clientManagedResourceContext, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListMessagesResponse message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.verify|verify} messages. + * Encodes the specified ChatRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChatRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @static - * @param {google.cloud.geminidataanalytics.v1beta.IListMessagesResponse} message ListMessagesResponse message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest} message ChatRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMessagesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ChatRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMessagesResponse message from the specified reader or buffer. + * Decodes a ChatRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse + * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMessagesResponse.decode = function decode(reader, length, error) { + ChatRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChatRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 101: { + message.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.decode(reader, reader.uint32()); + break; + } + case 103: { + message.conversationReference = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.decode(reader, reader.uint32()); + break; + } + case 104: { + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.decode(reader, reader.uint32()); + break; + } + case 105: { + message.clientManagedResourceContext = $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.decode(reader, reader.uint32()); + break; + } case 1: { - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.geminidataanalytics.v1beta.StorageMessage.decode(reader, reader.uint32())); + message.project = reader.string(); + break; + } + case 3: { + message.parent = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.cloud.geminidataanalytics.v1beta.Message.decode(reader, reader.uint32())); break; } default: @@ -45240,149 +46524,238 @@ }; /** - * Decodes a ListMessagesResponse message from the specified reader or buffer, length delimited. + * Decodes a ChatRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse + * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMessagesResponse.decodeDelimited = function decodeDelimited(reader) { + ChatRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMessagesResponse message. + * Verifies a ChatRequest message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMessagesResponse.verify = function verify(message) { + ChatRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) { + properties.contextProvider = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.Context.verify(message.inlineContext); + if (error) + return "inlineContext." + error; + } + } + if (message.conversationReference != null && message.hasOwnProperty("conversationReference")) { + if (properties.contextProvider === 1) + return "contextProvider: multiple values"; + properties.contextProvider = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.verify(message.conversationReference); + if (error) + return "conversationReference." + error; + } + } + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { + if (properties.contextProvider === 1) + return "contextProvider: multiple values"; + properties.contextProvider = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify(message.dataAgentContext); + if (error) + return "dataAgentContext." + error; + } + } + if (message.clientManagedResourceContext != null && message.hasOwnProperty("clientManagedResourceContext")) { + if (properties.contextProvider === 1) + return "contextProvider: multiple values"; + properties.contextProvider = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.verify(message.clientManagedResourceContext); + if (error) + return "clientManagedResourceContext." + error; + } + } + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; if (message.messages != null && message.hasOwnProperty("messages")) { if (!Array.isArray(message.messages)) return "messages: array expected"; for (var i = 0; i < message.messages.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.verify(message.messages[i]); + var error = $root.google.cloud.geminidataanalytics.v1beta.Message.verify(message.messages[i]); if (error) return "messages." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListMessagesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ChatRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} ListMessagesResponse + * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest */ - ListMessagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse) + ChatRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChatRequest) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ListMessagesResponse(); + var message = new $root.google.cloud.geminidataanalytics.v1beta.ChatRequest(); + if (object.inlineContext != null) { + if (typeof object.inlineContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.inlineContext: object expected"); + message.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.fromObject(object.inlineContext); + } + if (object.conversationReference != null) { + if (typeof object.conversationReference !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.conversationReference: object expected"); + message.conversationReference = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.fromObject(object.conversationReference); + } + if (object.dataAgentContext != null) { + if (typeof object.dataAgentContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.dataAgentContext: object expected"); + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.fromObject(object.dataAgentContext); + } + if (object.clientManagedResourceContext != null) { + if (typeof object.clientManagedResourceContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.clientManagedResourceContext: object expected"); + message.clientManagedResourceContext = $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.fromObject(object.clientManagedResourceContext); + } + if (object.project != null) + message.project = String(object.project); + if (object.parent != null) + message.parent = String(object.parent); if (object.messages) { if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.messages: array expected"); + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.messages: array expected"); message.messages = []; for (var i = 0; i < object.messages.length; ++i) { if (typeof object.messages[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ListMessagesResponse.messages: object expected"); - message.messages[i] = $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.fromObject(object.messages[i]); + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.messages: object expected"); + message.messages[i] = $root.google.cloud.geminidataanalytics.v1beta.Message.fromObject(object.messages[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListMessagesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ChatRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @static - * @param {google.cloud.geminidataanalytics.v1beta.ListMessagesResponse} message ListMessagesResponse + * @param {google.cloud.geminidataanalytics.v1beta.ChatRequest} message ChatRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMessagesResponse.toObject = function toObject(message, options) { + ChatRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.messages = []; - if (options.defaults) - object.nextPageToken = ""; + if (options.defaults) { + object.project = ""; + object.parent = ""; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; if (message.messages && message.messages.length) { object.messages = []; for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.geminidataanalytics.v1beta.StorageMessage.toObject(message.messages[j], options); + object.messages[j] = $root.google.cloud.geminidataanalytics.v1beta.Message.toObject(message.messages[j], options); + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) { + object.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.toObject(message.inlineContext, options); + if (options.oneofs) + object.contextProvider = "inlineContext"; + } + if (message.conversationReference != null && message.hasOwnProperty("conversationReference")) { + object.conversationReference = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.toObject(message.conversationReference, options); + if (options.oneofs) + object.contextProvider = "conversationReference"; + } + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { + object.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.toObject(message.dataAgentContext, options); + if (options.oneofs) + object.contextProvider = "dataAgentContext"; + } + if (message.clientManagedResourceContext != null && message.hasOwnProperty("clientManagedResourceContext")) { + object.clientManagedResourceContext = $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.toObject(message.clientManagedResourceContext, options); + if (options.oneofs) + object.contextProvider = "clientManagedResourceContext"; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListMessagesResponse to JSON. + * Converts this ChatRequest to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @instance * @returns {Object.} JSON object */ - ListMessagesResponse.prototype.toJSON = function toJSON() { + ChatRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMessagesResponse + * Gets the default type url for ChatRequest * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ListMessagesResponse + * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMessagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChatRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ListMessagesResponse"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChatRequest"; }; - return ListMessagesResponse; + return ChatRequest; })(); - v1beta.StorageMessage = (function() { + v1beta.DataAgentContext = (function() { /** - * Properties of a StorageMessage. + * Properties of a DataAgentContext. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IStorageMessage - * @property {string|null} [messageId] StorageMessage messageId - * @property {google.cloud.geminidataanalytics.v1beta.IMessage|null} [message] StorageMessage message + * @interface IDataAgentContext + * @property {string|null} [dataAgent] DataAgentContext dataAgent + * @property {google.cloud.geminidataanalytics.v1beta.ICredentials|null} [credentials] DataAgentContext credentials + * @property {google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion|null} [contextVersion] DataAgentContext contextVersion */ /** - * Constructs a new StorageMessage. + * Constructs a new DataAgentContext. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a StorageMessage. - * @implements IStorageMessage + * @classdesc Represents a DataAgentContext. + * @implements IDataAgentContext * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext=} [properties] Properties to set */ - function StorageMessage(properties) { + function DataAgentContext(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45390,91 +46763,105 @@ } /** - * StorageMessage messageId. - * @member {string} messageId - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * DataAgentContext dataAgent. + * @member {string} dataAgent + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @instance */ - StorageMessage.prototype.messageId = ""; + DataAgentContext.prototype.dataAgent = ""; /** - * StorageMessage message. - * @member {google.cloud.geminidataanalytics.v1beta.IMessage|null|undefined} message - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * DataAgentContext credentials. + * @member {google.cloud.geminidataanalytics.v1beta.ICredentials|null|undefined} credentials + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @instance */ - StorageMessage.prototype.message = null; + DataAgentContext.prototype.credentials = null; /** - * Creates a new StorageMessage instance using the specified properties. + * DataAgentContext contextVersion. + * @member {google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion} contextVersion + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @instance + */ + DataAgentContext.prototype.contextVersion = 0; + + /** + * Creates a new DataAgentContext instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @static - * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage instance + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext instance */ - StorageMessage.create = function create(properties) { - return new StorageMessage(properties); + DataAgentContext.create = function create(properties) { + return new DataAgentContext(properties); }; /** - * Encodes the specified StorageMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StorageMessage.verify|verify} messages. + * Encodes the specified DataAgentContext message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @static - * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage} message StorageMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext} message DataAgentContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StorageMessage.encode = function encode(message, writer) { + DataAgentContext.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.messageId); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.google.cloud.geminidataanalytics.v1beta.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dataAgent != null && Object.hasOwnProperty.call(message, "dataAgent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataAgent); + if (message.credentials != null && Object.hasOwnProperty.call(message, "credentials")) + $root.google.cloud.geminidataanalytics.v1beta.Credentials.encode(message.credentials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.contextVersion != null && Object.hasOwnProperty.call(message, "contextVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextVersion); return writer; }; /** - * Encodes the specified StorageMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.StorageMessage.verify|verify} messages. + * Encodes the specified DataAgentContext message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @static - * @param {google.cloud.geminidataanalytics.v1beta.IStorageMessage} message StorageMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext} message DataAgentContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StorageMessage.encodeDelimited = function encodeDelimited(message, writer) { + DataAgentContext.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StorageMessage message from the specified reader or buffer. + * Decodes a DataAgentContext message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StorageMessage.decode = function decode(reader, length, error) { + DataAgentContext.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.StorageMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.messageId = reader.string(); + message.dataAgent = reader.string(); break; } case 2: { - message.message = $root.google.cloud.geminidataanalytics.v1beta.Message.decode(reader, reader.uint32()); + message.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.decode(reader, reader.uint32()); + break; + } + case 3: { + message.contextVersion = reader.int32(); break; } default: @@ -45486,143 +46873,185 @@ }; /** - * Decodes a StorageMessage message from the specified reader or buffer, length delimited. + * Decodes a DataAgentContext message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StorageMessage.decodeDelimited = function decodeDelimited(reader) { + DataAgentContext.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StorageMessage message. + * Verifies a DataAgentContext message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StorageMessage.verify = function verify(message) { + DataAgentContext.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.messageId != null && message.hasOwnProperty("messageId")) - if (!$util.isString(message.messageId)) - return "messageId: string expected"; - if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.Message.verify(message.message); + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) + if (!$util.isString(message.dataAgent)) + return "dataAgent: string expected"; + if (message.credentials != null && message.hasOwnProperty("credentials")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Credentials.verify(message.credentials); if (error) - return "message." + error; + return "credentials." + error; } + if (message.contextVersion != null && message.hasOwnProperty("contextVersion")) + switch (message.contextVersion) { + default: + return "contextVersion: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a StorageMessage message from a plain object. Also converts values to their respective internal types. + * Creates a DataAgentContext message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.StorageMessage} StorageMessage + * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext */ - StorageMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.StorageMessage) + DataAgentContext.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.StorageMessage(); - if (object.messageId != null) - message.messageId = String(object.messageId); - if (object.message != null) { - if (typeof object.message !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.StorageMessage.message: object expected"); - message.message = $root.google.cloud.geminidataanalytics.v1beta.Message.fromObject(object.message); + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext(); + if (object.dataAgent != null) + message.dataAgent = String(object.dataAgent); + if (object.credentials != null) { + if (typeof object.credentials !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAgentContext.credentials: object expected"); + message.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.fromObject(object.credentials); + } + switch (object.contextVersion) { + default: + if (typeof object.contextVersion === "number") { + message.contextVersion = object.contextVersion; + break; + } + break; + case "CONTEXT_VERSION_UNSPECIFIED": + case 0: + message.contextVersion = 0; + break; + case "STAGING": + case 1: + message.contextVersion = 1; + break; + case "PUBLISHED": + case 2: + message.contextVersion = 2; + break; } return message; }; /** - * Creates a plain object from a StorageMessage message. Also converts values to other types if specified. + * Creates a plain object from a DataAgentContext message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @static - * @param {google.cloud.geminidataanalytics.v1beta.StorageMessage} message StorageMessage + * @param {google.cloud.geminidataanalytics.v1beta.DataAgentContext} message DataAgentContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StorageMessage.toObject = function toObject(message, options) { + DataAgentContext.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.messageId = ""; - object.message = null; + object.dataAgent = ""; + object.credentials = null; + object.contextVersion = options.enums === String ? "CONTEXT_VERSION_UNSPECIFIED" : 0; } - if (message.messageId != null && message.hasOwnProperty("messageId")) - object.messageId = message.messageId; - if (message.message != null && message.hasOwnProperty("message")) - object.message = $root.google.cloud.geminidataanalytics.v1beta.Message.toObject(message.message, options); + if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) + object.dataAgent = message.dataAgent; + if (message.credentials != null && message.hasOwnProperty("credentials")) + object.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.toObject(message.credentials, options); + if (message.contextVersion != null && message.hasOwnProperty("contextVersion")) + object.contextVersion = options.enums === String ? $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion[message.contextVersion] === undefined ? message.contextVersion : $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion[message.contextVersion] : message.contextVersion; return object; }; /** - * Converts this StorageMessage to JSON. + * Converts this DataAgentContext to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @instance * @returns {Object.} JSON object */ - StorageMessage.prototype.toJSON = function toJSON() { + DataAgentContext.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StorageMessage + * Gets the default type url for DataAgentContext * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.StorageMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StorageMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataAgentContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.StorageMessage"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataAgentContext"; }; - return StorageMessage; + /** + * ContextVersion enum. + * @name google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion + * @enum {number} + * @property {number} CONTEXT_VERSION_UNSPECIFIED=0 CONTEXT_VERSION_UNSPECIFIED value + * @property {number} STAGING=1 STAGING value + * @property {number} PUBLISHED=2 PUBLISHED value + */ + DataAgentContext.ContextVersion = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTEXT_VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "STAGING"] = 1; + values[valuesById[2] = "PUBLISHED"] = 2; + return values; + })(); + + return DataAgentContext; })(); - v1beta.ChatRequest = (function() { + v1beta.ConversationReference = (function() { /** - * Properties of a ChatRequest. + * Properties of a ConversationReference. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IChatRequest - * @property {google.cloud.geminidataanalytics.v1beta.IContext|null} [inlineContext] ChatRequest inlineContext - * @property {google.cloud.geminidataanalytics.v1beta.IConversationReference|null} [conversationReference] ChatRequest conversationReference - * @property {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null} [dataAgentContext] ChatRequest dataAgentContext - * @property {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext|null} [clientManagedResourceContext] ChatRequest clientManagedResourceContext - * @property {string|null} [project] ChatRequest project - * @property {string|null} [parent] ChatRequest parent - * @property {Array.|null} [messages] ChatRequest messages + * @interface IConversationReference + * @property {string|null} [conversation] ConversationReference conversation + * @property {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null} [dataAgentContext] ConversationReference dataAgentContext */ /** - * Constructs a new ChatRequest. + * Constructs a new ConversationReference. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a ChatRequest. - * @implements IChatRequest + * @classdesc Represents a ConversationReference. + * @implements IConversationReference * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference=} [properties] Properties to set */ - function ChatRequest(properties) { - this.messages = []; + function ConversationReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45630,178 +47059,91 @@ } /** - * ChatRequest inlineContext. - * @member {google.cloud.geminidataanalytics.v1beta.IContext|null|undefined} inlineContext - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest - * @instance - */ - ChatRequest.prototype.inlineContext = null; - - /** - * ChatRequest conversationReference. - * @member {google.cloud.geminidataanalytics.v1beta.IConversationReference|null|undefined} conversationReference - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest - * @instance - */ - ChatRequest.prototype.conversationReference = null; - - /** - * ChatRequest dataAgentContext. - * @member {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null|undefined} dataAgentContext - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest - * @instance - */ - ChatRequest.prototype.dataAgentContext = null; - - /** - * ChatRequest clientManagedResourceContext. - * @member {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext|null|undefined} clientManagedResourceContext - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest - * @instance - */ - ChatRequest.prototype.clientManagedResourceContext = null; - - /** - * ChatRequest project. - * @member {string} project - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest - * @instance - */ - ChatRequest.prototype.project = ""; - - /** - * ChatRequest parent. - * @member {string} parent - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest - * @instance - */ - ChatRequest.prototype.parent = ""; - - /** - * ChatRequest messages. - * @member {Array.} messages - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * ConversationReference conversation. + * @member {string} conversation + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @instance - */ - ChatRequest.prototype.messages = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + */ + ConversationReference.prototype.conversation = ""; /** - * ChatRequest contextProvider. - * @member {"inlineContext"|"conversationReference"|"dataAgentContext"|"clientManagedResourceContext"|undefined} contextProvider - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * ConversationReference dataAgentContext. + * @member {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null|undefined} dataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @instance */ - Object.defineProperty(ChatRequest.prototype, "contextProvider", { - get: $util.oneOfGetter($oneOfFields = ["inlineContext", "conversationReference", "dataAgentContext", "clientManagedResourceContext"]), - set: $util.oneOfSetter($oneOfFields) - }); + ConversationReference.prototype.dataAgentContext = null; /** - * Creates a new ChatRequest instance using the specified properties. + * Creates a new ConversationReference instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest instance + * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference instance */ - ChatRequest.create = function create(properties) { - return new ChatRequest(properties); + ConversationReference.create = function create(properties) { + return new ConversationReference(properties); }; /** - * Encodes the specified ChatRequest message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChatRequest.verify|verify} messages. + * Encodes the specified ConversationReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationReference.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest} message ChatRequest message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference} message ConversationReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChatRequest.encode = function encode(message, writer) { + ConversationReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.Message.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent); - if (message.inlineContext != null && Object.hasOwnProperty.call(message, "inlineContext")) - $root.google.cloud.geminidataanalytics.v1beta.Context.encode(message.inlineContext, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.conversationReference != null && Object.hasOwnProperty.call(message, "conversationReference")) - $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.encode(message.conversationReference, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); if (message.dataAgentContext != null && Object.hasOwnProperty.call(message, "dataAgentContext")) - $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.encode(message.dataAgentContext, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - if (message.clientManagedResourceContext != null && Object.hasOwnProperty.call(message, "clientManagedResourceContext")) - $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.encode(message.clientManagedResourceContext, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.encode(message.dataAgentContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ChatRequest message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChatRequest.verify|verify} messages. + * Encodes the specified ConversationReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChatRequest} message ChatRequest message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference} message ConversationReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChatRequest.encodeDelimited = function encodeDelimited(message, writer) { + ConversationReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChatRequest message from the specified reader or buffer. + * Decodes a ConversationReference message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChatRequest.decode = function decode(reader, length, error) { + ConversationReference.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChatRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ConversationReference(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 101: { - message.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.decode(reader, reader.uint32()); - break; - } - case 103: { - message.conversationReference = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.decode(reader, reader.uint32()); - break; - } - case 104: { - message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.decode(reader, reader.uint32()); - break; - } - case 105: { - message.clientManagedResourceContext = $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.decode(reader, reader.uint32()); - break; - } case 1: { - message.project = reader.string(); + message.conversation = reader.string(); break; } case 3: { - message.parent = reader.string(); - break; - } - case 2: { - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.cloud.geminidataanalytics.v1beta.Message.decode(reader, reader.uint32())); + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.decode(reader, reader.uint32()); break; } default: @@ -45813,238 +47155,138 @@ }; /** - * Decodes a ChatRequest message from the specified reader or buffer, length delimited. + * Decodes a ConversationReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChatRequest.decodeDelimited = function decodeDelimited(reader) { + ConversationReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChatRequest message. + * Verifies a ConversationReference message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChatRequest.verify = function verify(message) { + ConversationReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) { - properties.contextProvider = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.Context.verify(message.inlineContext); - if (error) - return "inlineContext." + error; - } - } - if (message.conversationReference != null && message.hasOwnProperty("conversationReference")) { - if (properties.contextProvider === 1) - return "contextProvider: multiple values"; - properties.contextProvider = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.verify(message.conversationReference); - if (error) - return "conversationReference." + error; - } - } + if (message.conversation != null && message.hasOwnProperty("conversation")) + if (!$util.isString(message.conversation)) + return "conversation: string expected"; if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { - if (properties.contextProvider === 1) - return "contextProvider: multiple values"; - properties.contextProvider = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify(message.dataAgentContext); - if (error) - return "dataAgentContext." + error; - } - } - if (message.clientManagedResourceContext != null && message.hasOwnProperty("clientManagedResourceContext")) { - if (properties.contextProvider === 1) - return "contextProvider: multiple values"; - properties.contextProvider = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.verify(message.clientManagedResourceContext); - if (error) - return "clientManagedResourceContext." + error; - } - } - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (var i = 0; i < message.messages.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1beta.Message.verify(message.messages[i]); - if (error) - return "messages." + error; - } + var error = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify(message.dataAgentContext); + if (error) + return "dataAgentContext." + error; } return null; }; /** - * Creates a ChatRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConversationReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ChatRequest} ChatRequest + * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference */ - ChatRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChatRequest) + ConversationReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ConversationReference) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ChatRequest(); - if (object.inlineContext != null) { - if (typeof object.inlineContext !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.inlineContext: object expected"); - message.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.fromObject(object.inlineContext); - } - if (object.conversationReference != null) { - if (typeof object.conversationReference !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.conversationReference: object expected"); - message.conversationReference = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.fromObject(object.conversationReference); - } - if (object.dataAgentContext != null) { - if (typeof object.dataAgentContext !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.dataAgentContext: object expected"); - message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.fromObject(object.dataAgentContext); - } - if (object.clientManagedResourceContext != null) { - if (typeof object.clientManagedResourceContext !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.clientManagedResourceContext: object expected"); - message.clientManagedResourceContext = $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.fromObject(object.clientManagedResourceContext); - } - if (object.project != null) - message.project = String(object.project); - if (object.parent != null) - message.parent = String(object.parent); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChatRequest.messages: object expected"); - message.messages[i] = $root.google.cloud.geminidataanalytics.v1beta.Message.fromObject(object.messages[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ChatRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest - * @static - * @param {google.cloud.geminidataanalytics.v1beta.ChatRequest} message ChatRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ChatRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.messages = []; - if (options.defaults) { - object.project = ""; - object.parent = ""; - } - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.cloud.geminidataanalytics.v1beta.Message.toObject(message.messages[j], options); - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) { - object.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.toObject(message.inlineContext, options); - if (options.oneofs) - object.contextProvider = "inlineContext"; - } - if (message.conversationReference != null && message.hasOwnProperty("conversationReference")) { - object.conversationReference = $root.google.cloud.geminidataanalytics.v1beta.ConversationReference.toObject(message.conversationReference, options); - if (options.oneofs) - object.contextProvider = "conversationReference"; - } - if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { - object.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.toObject(message.dataAgentContext, options); - if (options.oneofs) - object.contextProvider = "dataAgentContext"; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ConversationReference(); + if (object.conversation != null) + message.conversation = String(object.conversation); + if (object.dataAgentContext != null) { + if (typeof object.dataAgentContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ConversationReference.dataAgentContext: object expected"); + message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.fromObject(object.dataAgentContext); } - if (message.clientManagedResourceContext != null && message.hasOwnProperty("clientManagedResourceContext")) { - object.clientManagedResourceContext = $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.toObject(message.clientManagedResourceContext, options); - if (options.oneofs) - object.contextProvider = "clientManagedResourceContext"; + return message; + }; + + /** + * Creates a plain object from a ConversationReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @static + * @param {google.cloud.geminidataanalytics.v1beta.ConversationReference} message ConversationReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversation = ""; + object.dataAgentContext = null; } + if (message.conversation != null && message.hasOwnProperty("conversation")) + object.conversation = message.conversation; + if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) + object.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.toObject(message.dataAgentContext, options); return object; }; /** - * Converts this ChatRequest to JSON. + * Converts this ConversationReference to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @instance * @returns {Object.} JSON object */ - ChatRequest.prototype.toJSON = function toJSON() { + ConversationReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChatRequest + * Gets the default type url for ConversationReference * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ChatRequest + * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChatRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConversationReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChatRequest"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ConversationReference"; }; - return ChatRequest; + return ConversationReference; })(); - v1beta.DataAgentContext = (function() { + v1beta.ClientManagedResourceContext = (function() { /** - * Properties of a DataAgentContext. + * Properties of a ClientManagedResourceContext. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IDataAgentContext - * @property {string|null} [dataAgent] DataAgentContext dataAgent - * @property {google.cloud.geminidataanalytics.v1beta.ICredentials|null} [credentials] DataAgentContext credentials - * @property {google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion|null} [contextVersion] DataAgentContext contextVersion + * @interface IClientManagedResourceContext + * @property {google.cloud.geminidataanalytics.v1beta.IContext|null} [inlineContext] ClientManagedResourceContext inlineContext + * @property {string|null} [conversationId] ClientManagedResourceContext conversationId + * @property {string|null} [agentId] ClientManagedResourceContext agentId */ /** - * Constructs a new DataAgentContext. + * Constructs a new ClientManagedResourceContext. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a DataAgentContext. - * @implements IDataAgentContext + * @classdesc Represents a ClientManagedResourceContext. + * @implements IClientManagedResourceContext * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext=} [properties] Properties to set */ - function DataAgentContext(properties) { + function ClientManagedResourceContext(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46052,105 +47294,105 @@ } /** - * DataAgentContext dataAgent. - * @member {string} dataAgent - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * ClientManagedResourceContext inlineContext. + * @member {google.cloud.geminidataanalytics.v1beta.IContext|null|undefined} inlineContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @instance */ - DataAgentContext.prototype.dataAgent = ""; + ClientManagedResourceContext.prototype.inlineContext = null; /** - * DataAgentContext credentials. - * @member {google.cloud.geminidataanalytics.v1beta.ICredentials|null|undefined} credentials - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * ClientManagedResourceContext conversationId. + * @member {string} conversationId + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @instance */ - DataAgentContext.prototype.credentials = null; + ClientManagedResourceContext.prototype.conversationId = ""; /** - * DataAgentContext contextVersion. - * @member {google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion} contextVersion - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * ClientManagedResourceContext agentId. + * @member {string} agentId + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @instance */ - DataAgentContext.prototype.contextVersion = 0; + ClientManagedResourceContext.prototype.agentId = ""; /** - * Creates a new DataAgentContext instance using the specified properties. + * Creates a new ClientManagedResourceContext instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext instance + * @param {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext} ClientManagedResourceContext instance */ - DataAgentContext.create = function create(properties) { - return new DataAgentContext(properties); + ClientManagedResourceContext.create = function create(properties) { + return new ClientManagedResourceContext(properties); }; /** - * Encodes the specified DataAgentContext message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify|verify} messages. + * Encodes the specified ClientManagedResourceContext message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext} message DataAgentContext message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext} message ClientManagedResourceContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataAgentContext.encode = function encode(message, writer) { + ClientManagedResourceContext.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataAgent != null && Object.hasOwnProperty.call(message, "dataAgent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataAgent); - if (message.credentials != null && Object.hasOwnProperty.call(message, "credentials")) - $root.google.cloud.geminidataanalytics.v1beta.Credentials.encode(message.credentials, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.contextVersion != null && Object.hasOwnProperty.call(message, "contextVersion")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.contextVersion); + if (message.inlineContext != null && Object.hasOwnProperty.call(message, "inlineContext")) + $root.google.cloud.geminidataanalytics.v1beta.Context.encode(message.inlineContext, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conversationId != null && Object.hasOwnProperty.call(message, "conversationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversationId); + if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.agentId); return writer; }; /** - * Encodes the specified DataAgentContext message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify|verify} messages. + * Encodes the specified ClientManagedResourceContext message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataAgentContext} message DataAgentContext message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext} message ClientManagedResourceContext message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataAgentContext.encodeDelimited = function encodeDelimited(message, writer) { + ClientManagedResourceContext.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataAgentContext message from the specified reader or buffer. + * Decodes a ClientManagedResourceContext message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext + * @returns {google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext} ClientManagedResourceContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataAgentContext.decode = function decode(reader, length, error) { + ClientManagedResourceContext.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.dataAgent = reader.string(); + message.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.decode(reader, reader.uint32()); break; } case 2: { - message.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.decode(reader, reader.uint32()); + message.conversationId = reader.string(); break; } case 3: { - message.contextVersion = reader.int32(); + message.agentId = reader.string(); break; } default: @@ -46162,185 +47404,147 @@ }; /** - * Decodes a DataAgentContext message from the specified reader or buffer, length delimited. + * Decodes a ClientManagedResourceContext message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext + * @returns {google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext} ClientManagedResourceContext * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataAgentContext.decodeDelimited = function decodeDelimited(reader) { + ClientManagedResourceContext.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataAgentContext message. + * Verifies a ClientManagedResourceContext message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataAgentContext.verify = function verify(message) { + ClientManagedResourceContext.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) - if (!$util.isString(message.dataAgent)) - return "dataAgent: string expected"; - if (message.credentials != null && message.hasOwnProperty("credentials")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.Credentials.verify(message.credentials); + if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Context.verify(message.inlineContext); if (error) - return "credentials." + error; + return "inlineContext." + error; } - if (message.contextVersion != null && message.hasOwnProperty("contextVersion")) - switch (message.contextVersion) { - default: - return "contextVersion: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.conversationId != null && message.hasOwnProperty("conversationId")) + if (!$util.isString(message.conversationId)) + return "conversationId: string expected"; + if (message.agentId != null && message.hasOwnProperty("agentId")) + if (!$util.isString(message.agentId)) + return "agentId: string expected"; return null; }; /** - * Creates a DataAgentContext message from a plain object. Also converts values to their respective internal types. + * Creates a ClientManagedResourceContext message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.DataAgentContext} DataAgentContext + * @returns {google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext} ClientManagedResourceContext */ - DataAgentContext.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext) + ClientManagedResourceContext.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext(); - if (object.dataAgent != null) - message.dataAgent = String(object.dataAgent); - if (object.credentials != null) { - if (typeof object.credentials !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataAgentContext.credentials: object expected"); - message.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.fromObject(object.credentials); - } - switch (object.contextVersion) { - default: - if (typeof object.contextVersion === "number") { - message.contextVersion = object.contextVersion; - break; - } - break; - case "CONTEXT_VERSION_UNSPECIFIED": - case 0: - message.contextVersion = 0; - break; - case "STAGING": - case 1: - message.contextVersion = 1; - break; - case "PUBLISHED": - case 2: - message.contextVersion = 2; - break; + var message = new $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext(); + if (object.inlineContext != null) { + if (typeof object.inlineContext !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.inlineContext: object expected"); + message.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.fromObject(object.inlineContext); } + if (object.conversationId != null) + message.conversationId = String(object.conversationId); + if (object.agentId != null) + message.agentId = String(object.agentId); return message; }; /** - * Creates a plain object from a DataAgentContext message. Also converts values to other types if specified. + * Creates a plain object from a ClientManagedResourceContext message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @static - * @param {google.cloud.geminidataanalytics.v1beta.DataAgentContext} message DataAgentContext + * @param {google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext} message ClientManagedResourceContext * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataAgentContext.toObject = function toObject(message, options) { + ClientManagedResourceContext.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dataAgent = ""; - object.credentials = null; - object.contextVersion = options.enums === String ? "CONTEXT_VERSION_UNSPECIFIED" : 0; + object.inlineContext = null; + object.conversationId = ""; + object.agentId = ""; } - if (message.dataAgent != null && message.hasOwnProperty("dataAgent")) - object.dataAgent = message.dataAgent; - if (message.credentials != null && message.hasOwnProperty("credentials")) - object.credentials = $root.google.cloud.geminidataanalytics.v1beta.Credentials.toObject(message.credentials, options); - if (message.contextVersion != null && message.hasOwnProperty("contextVersion")) - object.contextVersion = options.enums === String ? $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion[message.contextVersion] === undefined ? message.contextVersion : $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion[message.contextVersion] : message.contextVersion; + if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) + object.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.toObject(message.inlineContext, options); + if (message.conversationId != null && message.hasOwnProperty("conversationId")) + object.conversationId = message.conversationId; + if (message.agentId != null && message.hasOwnProperty("agentId")) + object.agentId = message.agentId; return object; }; /** - * Converts this DataAgentContext to JSON. + * Converts this ClientManagedResourceContext to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @instance * @returns {Object.} JSON object */ - DataAgentContext.prototype.toJSON = function toJSON() { + ClientManagedResourceContext.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataAgentContext + * Gets the default type url for ClientManagedResourceContext * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.DataAgentContext + * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataAgentContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClientManagedResourceContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataAgentContext"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext"; }; - /** - * ContextVersion enum. - * @name google.cloud.geminidataanalytics.v1beta.DataAgentContext.ContextVersion - * @enum {number} - * @property {number} CONTEXT_VERSION_UNSPECIFIED=0 CONTEXT_VERSION_UNSPECIFIED value - * @property {number} STAGING=1 STAGING value - * @property {number} PUBLISHED=2 PUBLISHED value - */ - DataAgentContext.ContextVersion = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONTEXT_VERSION_UNSPECIFIED"] = 0; - values[valuesById[1] = "STAGING"] = 1; - values[valuesById[2] = "PUBLISHED"] = 2; - return values; - })(); - - return DataAgentContext; + return ClientManagedResourceContext; })(); - v1beta.ConversationReference = (function() { + v1beta.Message = (function() { /** - * Properties of a ConversationReference. + * Properties of a Message. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IConversationReference - * @property {string|null} [conversation] ConversationReference conversation - * @property {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null} [dataAgentContext] ConversationReference dataAgentContext + * @interface IMessage + * @property {google.cloud.geminidataanalytics.v1beta.IUserMessage|null} [userMessage] Message userMessage + * @property {google.cloud.geminidataanalytics.v1beta.ISystemMessage|null} [systemMessage] Message systemMessage + * @property {google.protobuf.ITimestamp|null} [timestamp] Message timestamp + * @property {string|null} [messageId] Message messageId */ /** - * Constructs a new ConversationReference. + * Constructs a new Message. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a ConversationReference. - * @implements IConversationReference + * @classdesc Represents a Message. + * @implements IMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IMessage=} [properties] Properties to set */ - function ConversationReference(properties) { + function Message(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46348,91 +47552,133 @@ } /** - * ConversationReference conversation. - * @member {string} conversation - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * Message userMessage. + * @member {google.cloud.geminidataanalytics.v1beta.IUserMessage|null|undefined} userMessage + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @instance */ - ConversationReference.prototype.conversation = ""; + Message.prototype.userMessage = null; /** - * ConversationReference dataAgentContext. - * @member {google.cloud.geminidataanalytics.v1beta.IDataAgentContext|null|undefined} dataAgentContext - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * Message systemMessage. + * @member {google.cloud.geminidataanalytics.v1beta.ISystemMessage|null|undefined} systemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @instance */ - ConversationReference.prototype.dataAgentContext = null; + Message.prototype.systemMessage = null; /** - * Creates a new ConversationReference instance using the specified properties. + * Message timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @instance + */ + Message.prototype.timestamp = null; + + /** + * Message messageId. + * @member {string} messageId + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @instance + */ + Message.prototype.messageId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Message kind. + * @member {"userMessage"|"systemMessage"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @instance + */ + Object.defineProperty(Message.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["userMessage", "systemMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Message instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @static - * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference instance + * @param {google.cloud.geminidataanalytics.v1beta.IMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message instance */ - ConversationReference.create = function create(properties) { - return new ConversationReference(properties); + Message.create = function create(properties) { + return new Message(properties); }; /** - * Encodes the specified ConversationReference message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationReference.verify|verify} messages. + * Encodes the specified Message message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Message.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @static - * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference} message ConversationReference message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IMessage} message Message message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationReference.encode = function encode(message, writer) { + Message.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversation); - if (message.dataAgentContext != null && Object.hasOwnProperty.call(message, "dataAgentContext")) - $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.encode(message.dataAgentContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.userMessage != null && Object.hasOwnProperty.call(message, "userMessage")) + $root.google.cloud.geminidataanalytics.v1beta.UserMessage.encode(message.userMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.systemMessage != null && Object.hasOwnProperty.call(message, "systemMessage")) + $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.encode(message.systemMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.messageId); return writer; }; /** - * Encodes the specified ConversationReference message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ConversationReference.verify|verify} messages. + * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Message.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @static - * @param {google.cloud.geminidataanalytics.v1beta.IConversationReference} message ConversationReference message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IMessage} message Message message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConversationReference.encodeDelimited = function encodeDelimited(message, writer) { + Message.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConversationReference message from the specified reader or buffer. + * Decodes a Message message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference + * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationReference.decode = function decode(reader, length, error) { + Message.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ConversationReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Message(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.conversation = reader.string(); + case 2: { + message.userMessage = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.decode(reader, reader.uint32()); break; } case 3: { - message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.decode(reader, reader.uint32()); + message.systemMessage = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.decode(reader, reader.uint32()); + break; + } + case 1: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.messageId = reader.string(); break; } default: @@ -46444,138 +47690,175 @@ }; /** - * Decodes a ConversationReference message from the specified reader or buffer, length delimited. + * Decodes a Message message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference + * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConversationReference.decodeDelimited = function decodeDelimited(reader) { + Message.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConversationReference message. + * Verifies a Message message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConversationReference.verify = function verify(message) { + Message.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversation != null && message.hasOwnProperty("conversation")) - if (!$util.isString(message.conversation)) - return "conversation: string expected"; - if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.verify(message.dataAgentContext); + var properties = {}; + if (message.userMessage != null && message.hasOwnProperty("userMessage")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.verify(message.userMessage); + if (error) + return "userMessage." + error; + } + } + if (message.systemMessage != null && message.hasOwnProperty("systemMessage")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.verify(message.systemMessage); + if (error) + return "systemMessage." + error; + } + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); if (error) - return "dataAgentContext." + error; + return "timestamp." + error; } + if (message.messageId != null && message.hasOwnProperty("messageId")) + if (!$util.isString(message.messageId)) + return "messageId: string expected"; return null; }; /** - * Creates a ConversationReference message from a plain object. Also converts values to their respective internal types. + * Creates a Message message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ConversationReference} ConversationReference + * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message */ - ConversationReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ConversationReference) + Message.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Message) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ConversationReference(); - if (object.conversation != null) - message.conversation = String(object.conversation); - if (object.dataAgentContext != null) { - if (typeof object.dataAgentContext !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ConversationReference.dataAgentContext: object expected"); - message.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.fromObject(object.dataAgentContext); + var message = new $root.google.cloud.geminidataanalytics.v1beta.Message(); + if (object.userMessage != null) { + if (typeof object.userMessage !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Message.userMessage: object expected"); + message.userMessage = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.fromObject(object.userMessage); + } + if (object.systemMessage != null) { + if (typeof object.systemMessage !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Message.systemMessage: object expected"); + message.systemMessage = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.fromObject(object.systemMessage); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.Message.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); } + if (object.messageId != null) + message.messageId = String(object.messageId); return message; }; /** - * Creates a plain object from a ConversationReference message. Also converts values to other types if specified. + * Creates a plain object from a Message message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @static - * @param {google.cloud.geminidataanalytics.v1beta.ConversationReference} message ConversationReference + * @param {google.cloud.geminidataanalytics.v1beta.Message} message Message * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConversationReference.toObject = function toObject(message, options) { + Message.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.conversation = ""; - object.dataAgentContext = null; + object.timestamp = null; + object.messageId = ""; } - if (message.conversation != null && message.hasOwnProperty("conversation")) - object.conversation = message.conversation; - if (message.dataAgentContext != null && message.hasOwnProperty("dataAgentContext")) - object.dataAgentContext = $root.google.cloud.geminidataanalytics.v1beta.DataAgentContext.toObject(message.dataAgentContext, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.userMessage != null && message.hasOwnProperty("userMessage")) { + object.userMessage = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.toObject(message.userMessage, options); + if (options.oneofs) + object.kind = "userMessage"; + } + if (message.systemMessage != null && message.hasOwnProperty("systemMessage")) { + object.systemMessage = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.toObject(message.systemMessage, options); + if (options.oneofs) + object.kind = "systemMessage"; + } + if (message.messageId != null && message.hasOwnProperty("messageId")) + object.messageId = message.messageId; return object; }; /** - * Converts this ConversationReference to JSON. + * Converts this Message to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @instance * @returns {Object.} JSON object */ - ConversationReference.prototype.toJSON = function toJSON() { + Message.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConversationReference + * Gets the default type url for Message * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ConversationReference + * @memberof google.cloud.geminidataanalytics.v1beta.Message * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConversationReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ConversationReference"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Message"; }; - return ConversationReference; + return Message; })(); - v1beta.ClientManagedResourceContext = (function() { + v1beta.UserMessage = (function() { /** - * Properties of a ClientManagedResourceContext. + * Properties of a UserMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IClientManagedResourceContext - * @property {google.cloud.geminidataanalytics.v1beta.IContext|null} [inlineContext] ClientManagedResourceContext inlineContext - * @property {string|null} [conversationId] ClientManagedResourceContext conversationId - * @property {string|null} [agentId] ClientManagedResourceContext agentId + * @interface IUserMessage + * @property {string|null} [text] UserMessage text */ /** - * Constructs a new ClientManagedResourceContext. + * Constructs a new UserMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a ClientManagedResourceContext. - * @implements IClientManagedResourceContext + * @classdesc Represents a UserMessage. + * @implements IUserMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage=} [properties] Properties to set */ - function ClientManagedResourceContext(properties) { + function UserMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46583,105 +47866,91 @@ } /** - * ClientManagedResourceContext inlineContext. - * @member {google.cloud.geminidataanalytics.v1beta.IContext|null|undefined} inlineContext - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * UserMessage text. + * @member {string|null|undefined} text + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @instance */ - ClientManagedResourceContext.prototype.inlineContext = null; + UserMessage.prototype.text = null; - /** - * ClientManagedResourceContext conversationId. - * @member {string} conversationId - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext - * @instance - */ - ClientManagedResourceContext.prototype.conversationId = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ClientManagedResourceContext agentId. - * @member {string} agentId - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * UserMessage kind. + * @member {"text"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @instance */ - ClientManagedResourceContext.prototype.agentId = ""; + Object.defineProperty(UserMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ClientManagedResourceContext instance using the specified properties. + * Creates a new UserMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext} ClientManagedResourceContext instance + * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage instance */ - ClientManagedResourceContext.create = function create(properties) { - return new ClientManagedResourceContext(properties); + UserMessage.create = function create(properties) { + return new UserMessage(properties); }; /** - * Encodes the specified ClientManagedResourceContext message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.verify|verify} messages. + * Encodes the specified UserMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UserMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext} message ClientManagedResourceContext message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage} message UserMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientManagedResourceContext.encode = function encode(message, writer) { + UserMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.inlineContext != null && Object.hasOwnProperty.call(message, "inlineContext")) - $root.google.cloud.geminidataanalytics.v1beta.Context.encode(message.inlineContext, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.conversationId != null && Object.hasOwnProperty.call(message, "conversationId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.conversationId); - if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.agentId); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); return writer; }; /** - * Encodes the specified ClientManagedResourceContext message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.verify|verify} messages. + * Encodes the specified UserMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UserMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IClientManagedResourceContext} message ClientManagedResourceContext message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage} message UserMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientManagedResourceContext.encodeDelimited = function encodeDelimited(message, writer) { + UserMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClientManagedResourceContext message from the specified reader or buffer. + * Decodes a UserMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext} ClientManagedResourceContext + * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientManagedResourceContext.decode = function decode(reader, length, error) { + UserMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.UserMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.decode(reader, reader.uint32()); - break; - } - case 2: { - message.conversationId = reader.string(); - break; - } - case 3: { - message.agentId = reader.string(); + message.text = reader.string(); break; } default: @@ -46693,147 +47962,134 @@ }; /** - * Decodes a ClientManagedResourceContext message from the specified reader or buffer, length delimited. + * Decodes a UserMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext} ClientManagedResourceContext + * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientManagedResourceContext.decodeDelimited = function decodeDelimited(reader) { + UserMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClientManagedResourceContext message. + * Verifies a UserMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClientManagedResourceContext.verify = function verify(message) { + UserMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.Context.verify(message.inlineContext); - if (error) - return "inlineContext." + error; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties.kind = 1; + if (!$util.isString(message.text)) + return "text: string expected"; } - if (message.conversationId != null && message.hasOwnProperty("conversationId")) - if (!$util.isString(message.conversationId)) - return "conversationId: string expected"; - if (message.agentId != null && message.hasOwnProperty("agentId")) - if (!$util.isString(message.agentId)) - return "agentId: string expected"; return null; }; /** - * Creates a ClientManagedResourceContext message from a plain object. Also converts values to their respective internal types. + * Creates a UserMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext} ClientManagedResourceContext + * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage */ - ClientManagedResourceContext.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext) + UserMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.UserMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext(); - if (object.inlineContext != null) { - if (typeof object.inlineContext !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext.inlineContext: object expected"); - message.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.fromObject(object.inlineContext); - } - if (object.conversationId != null) - message.conversationId = String(object.conversationId); - if (object.agentId != null) - message.agentId = String(object.agentId); + var message = new $root.google.cloud.geminidataanalytics.v1beta.UserMessage(); + if (object.text != null) + message.text = String(object.text); return message; }; /** - * Creates a plain object from a ClientManagedResourceContext message. Also converts values to other types if specified. + * Creates a plain object from a UserMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext} message ClientManagedResourceContext + * @param {google.cloud.geminidataanalytics.v1beta.UserMessage} message UserMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientManagedResourceContext.toObject = function toObject(message, options) { + UserMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.inlineContext = null; - object.conversationId = ""; - object.agentId = ""; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.kind = "text"; } - if (message.inlineContext != null && message.hasOwnProperty("inlineContext")) - object.inlineContext = $root.google.cloud.geminidataanalytics.v1beta.Context.toObject(message.inlineContext, options); - if (message.conversationId != null && message.hasOwnProperty("conversationId")) - object.conversationId = message.conversationId; - if (message.agentId != null && message.hasOwnProperty("agentId")) - object.agentId = message.agentId; return object; }; /** - * Converts this ClientManagedResourceContext to JSON. + * Converts this UserMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @instance * @returns {Object.} JSON object */ - ClientManagedResourceContext.prototype.toJSON = function toJSON() { + UserMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClientManagedResourceContext + * Gets the default type url for UserMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext + * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClientManagedResourceContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ClientManagedResourceContext"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.UserMessage"; }; - return ClientManagedResourceContext; + return UserMessage; })(); - v1beta.Message = (function() { + v1beta.SystemMessage = (function() { /** - * Properties of a Message. + * Properties of a SystemMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IMessage - * @property {google.cloud.geminidataanalytics.v1beta.IUserMessage|null} [userMessage] Message userMessage - * @property {google.cloud.geminidataanalytics.v1beta.ISystemMessage|null} [systemMessage] Message systemMessage - * @property {google.protobuf.ITimestamp|null} [timestamp] Message timestamp - * @property {string|null} [messageId] Message messageId + * @interface ISystemMessage + * @property {google.cloud.geminidataanalytics.v1beta.ITextMessage|null} [text] SystemMessage text + * @property {google.cloud.geminidataanalytics.v1beta.ISchemaMessage|null} [schema] SystemMessage schema + * @property {google.cloud.geminidataanalytics.v1beta.IDataMessage|null} [data] SystemMessage data + * @property {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage|null} [analysis] SystemMessage analysis + * @property {google.cloud.geminidataanalytics.v1beta.IChartMessage|null} [chart] SystemMessage chart + * @property {google.cloud.geminidataanalytics.v1beta.IErrorMessage|null} [error] SystemMessage error + * @property {google.cloud.geminidataanalytics.v1beta.IExampleQueries|null} [exampleQueries] SystemMessage exampleQueries + * @property {google.cloud.geminidataanalytics.v1beta.IClarificationMessage|null} [clarification] SystemMessage clarification + * @property {number|null} [groupId] SystemMessage groupId */ /** - * Constructs a new Message. + * Constructs a new SystemMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a Message. - * @implements IMessage + * @classdesc Represents a SystemMessage. + * @implements ISystemMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IMessage=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage=} [properties] Properties to set */ - function Message(properties) { + function SystemMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46841,133 +48097,209 @@ } /** - * Message userMessage. - * @member {google.cloud.geminidataanalytics.v1beta.IUserMessage|null|undefined} userMessage - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * SystemMessage text. + * @member {google.cloud.geminidataanalytics.v1beta.ITextMessage|null|undefined} text + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @instance */ - Message.prototype.userMessage = null; + SystemMessage.prototype.text = null; /** - * Message systemMessage. - * @member {google.cloud.geminidataanalytics.v1beta.ISystemMessage|null|undefined} systemMessage - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * SystemMessage schema. + * @member {google.cloud.geminidataanalytics.v1beta.ISchemaMessage|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @instance */ - Message.prototype.systemMessage = null; + SystemMessage.prototype.schema = null; /** - * Message timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * SystemMessage data. + * @member {google.cloud.geminidataanalytics.v1beta.IDataMessage|null|undefined} data + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @instance */ - Message.prototype.timestamp = null; + SystemMessage.prototype.data = null; /** - * Message messageId. - * @member {string} messageId - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * SystemMessage analysis. + * @member {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage|null|undefined} analysis + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @instance */ - Message.prototype.messageId = ""; + SystemMessage.prototype.analysis = null; + + /** + * SystemMessage chart. + * @member {google.cloud.geminidataanalytics.v1beta.IChartMessage|null|undefined} chart + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.chart = null; + + /** + * SystemMessage error. + * @member {google.cloud.geminidataanalytics.v1beta.IErrorMessage|null|undefined} error + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.error = null; + + /** + * SystemMessage exampleQueries. + * @member {google.cloud.geminidataanalytics.v1beta.IExampleQueries|null|undefined} exampleQueries + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.exampleQueries = null; + + /** + * SystemMessage clarification. + * @member {google.cloud.geminidataanalytics.v1beta.IClarificationMessage|null|undefined} clarification + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.clarification = null; + + /** + * SystemMessage groupId. + * @member {number|null|undefined} groupId + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @instance + */ + SystemMessage.prototype.groupId = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Message kind. - * @member {"userMessage"|"systemMessage"|undefined} kind - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * SystemMessage kind. + * @member {"text"|"schema"|"data"|"analysis"|"chart"|"error"|"exampleQueries"|"clarification"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @instance */ - Object.defineProperty(Message.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["userMessage", "systemMessage"]), + Object.defineProperty(SystemMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["text", "schema", "data", "analysis", "chart", "error", "exampleQueries", "clarification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SystemMessage.prototype, "_groupId", { + get: $util.oneOfGetter($oneOfFields = ["groupId"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Message instance using the specified properties. + * Creates a new SystemMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IMessage=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message instance + * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage instance */ - Message.create = function create(properties) { - return new Message(properties); + SystemMessage.create = function create(properties) { + return new SystemMessage(properties); }; /** - * Encodes the specified Message message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Message.verify|verify} messages. + * Encodes the specified SystemMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SystemMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IMessage} message Message message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage} message SystemMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Message.encode = function encode(message, writer) { + SystemMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.userMessage != null && Object.hasOwnProperty.call(message, "userMessage")) - $root.google.cloud.geminidataanalytics.v1beta.UserMessage.encode(message.userMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.systemMessage != null && Object.hasOwnProperty.call(message, "systemMessage")) - $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.encode(message.systemMessage, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.messageId); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + $root.google.cloud.geminidataanalytics.v1beta.TextMessage.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.encode(message.schema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.google.cloud.geminidataanalytics.v1beta.DataMessage.encode(message.data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.analysis != null && Object.hasOwnProperty.call(message, "analysis")) + $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.encode(message.analysis, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.chart != null && Object.hasOwnProperty.call(message, "chart")) + $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.encode(message.chart, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.encode(message.error, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.groupId); + if (message.exampleQueries != null && Object.hasOwnProperty.call(message, "exampleQueries")) + $root.google.cloud.geminidataanalytics.v1beta.ExampleQueries.encode(message.exampleQueries, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.clarification != null && Object.hasOwnProperty.call(message, "clarification")) + $root.google.cloud.geminidataanalytics.v1beta.ClarificationMessage.encode(message.clarification, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); return writer; }; /** - * Encodes the specified Message message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.Message.verify|verify} messages. + * Encodes the specified SystemMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SystemMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IMessage} message Message message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage} message SystemMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Message.encodeDelimited = function encodeDelimited(message, writer) { + SystemMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Message message from the specified reader or buffer. + * Decodes a SystemMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message + * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Message.decode = function decode(reader, length, error) { + SystemMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.Message(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SystemMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.text = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.decode(reader, reader.uint32()); + break; + } case 2: { - message.userMessage = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.decode(reader, reader.uint32()); + message.schema = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.decode(reader, reader.uint32()); break; } case 3: { - message.systemMessage = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.decode(reader, reader.uint32()); + message.data = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.decode(reader, reader.uint32()); break; } - case 1: { - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 4: { + message.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.decode(reader, reader.uint32()); break; } - case 4: { - message.messageId = reader.string(); + case 5: { + message.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.decode(reader, reader.uint32()); + break; + } + case 6: { + message.error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.decode(reader, reader.uint32()); + break; + } + case 13: { + message.exampleQueries = $root.google.cloud.geminidataanalytics.v1beta.ExampleQueries.decode(reader, reader.uint32()); + break; + } + case 14: { + message.clarification = $root.google.cloud.geminidataanalytics.v1beta.ClarificationMessage.decode(reader, reader.uint32()); + break; + } + case 12: { + message.groupId = reader.int32(); break; } default: @@ -46979,175 +48311,287 @@ }; /** - * Decodes a Message message from the specified reader or buffer, length delimited. + * Decodes a SystemMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message + * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Message.decodeDelimited = function decodeDelimited(reader) { + SystemMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Message message. + * Verifies a SystemMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Message.verify = function verify(message) { + SystemMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.userMessage != null && message.hasOwnProperty("userMessage")) { + if (message.text != null && message.hasOwnProperty("text")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.verify(message.text); + if (error) + return "text." + error; + } + } + if (message.schema != null && message.hasOwnProperty("schema")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify(message.schema); + if (error) + return "schema." + error; + } + } + if (message.data != null && message.hasOwnProperty("data")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.verify(message.data); + if (error) + return "data." + error; + } + } + if (message.analysis != null && message.hasOwnProperty("analysis")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify(message.analysis); + if (error) + return "analysis." + error; + } + } + if (message.chart != null && message.hasOwnProperty("chart")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.verify(message.chart); + if (error) + return "chart." + error; + } + } + if (message.error != null && message.hasOwnProperty("error")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { + if (properties.kind === 1) + return "kind: multiple values"; properties.kind = 1; { - var error = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.verify(message.userMessage); + var error = $root.google.cloud.geminidataanalytics.v1beta.ExampleQueries.verify(message.exampleQueries); if (error) - return "userMessage." + error; + return "exampleQueries." + error; } } - if (message.systemMessage != null && message.hasOwnProperty("systemMessage")) { + if (message.clarification != null && message.hasOwnProperty("clarification")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; { - var error = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.verify(message.systemMessage); + var error = $root.google.cloud.geminidataanalytics.v1beta.ClarificationMessage.verify(message.clarification); if (error) - return "systemMessage." + error; + return "clarification." + error; } } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; + if (message.groupId != null && message.hasOwnProperty("groupId")) { + properties._groupId = 1; + if (!$util.isInteger(message.groupId)) + return "groupId: integer expected"; } - if (message.messageId != null && message.hasOwnProperty("messageId")) - if (!$util.isString(message.messageId)) - return "messageId: string expected"; return null; }; /** - * Creates a Message message from a plain object. Also converts values to their respective internal types. + * Creates a SystemMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.Message} Message + * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage */ - Message.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.Message) + SystemMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SystemMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.Message(); - if (object.userMessage != null) { - if (typeof object.userMessage !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Message.userMessage: object expected"); - message.userMessage = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.fromObject(object.userMessage); + var message = new $root.google.cloud.geminidataanalytics.v1beta.SystemMessage(); + if (object.text != null) { + if (typeof object.text !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.text: object expected"); + message.text = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.fromObject(object.text); } - if (object.systemMessage != null) { - if (typeof object.systemMessage !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Message.systemMessage: object expected"); - message.systemMessage = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.fromObject(object.systemMessage); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.fromObject(object.schema); } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.Message.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.data: object expected"); + message.data = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.fromObject(object.data); } - if (object.messageId != null) - message.messageId = String(object.messageId); + if (object.analysis != null) { + if (typeof object.analysis !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.analysis: object expected"); + message.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.fromObject(object.analysis); + } + if (object.chart != null) { + if (typeof object.chart !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.chart: object expected"); + message.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.fromObject(object.chart); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.error: object expected"); + message.error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.fromObject(object.error); + } + if (object.exampleQueries != null) { + if (typeof object.exampleQueries !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.exampleQueries: object expected"); + message.exampleQueries = $root.google.cloud.geminidataanalytics.v1beta.ExampleQueries.fromObject(object.exampleQueries); + } + if (object.clarification != null) { + if (typeof object.clarification !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.clarification: object expected"); + message.clarification = $root.google.cloud.geminidataanalytics.v1beta.ClarificationMessage.fromObject(object.clarification); + } + if (object.groupId != null) + message.groupId = object.groupId | 0; return message; }; /** - * Creates a plain object from a Message message. Also converts values to other types if specified. + * Creates a plain object from a SystemMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.Message} message Message + * @param {google.cloud.geminidataanalytics.v1beta.SystemMessage} message SystemMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Message.toObject = function toObject(message, options) { + SystemMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.timestamp = null; - object.messageId = ""; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.toObject(message.text, options); + if (options.oneofs) + object.kind = "text"; } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.userMessage != null && message.hasOwnProperty("userMessage")) { - object.userMessage = $root.google.cloud.geminidataanalytics.v1beta.UserMessage.toObject(message.userMessage, options); + if (message.schema != null && message.hasOwnProperty("schema")) { + object.schema = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.toObject(message.schema, options); if (options.oneofs) - object.kind = "userMessage"; + object.kind = "schema"; } - if (message.systemMessage != null && message.hasOwnProperty("systemMessage")) { - object.systemMessage = $root.google.cloud.geminidataanalytics.v1beta.SystemMessage.toObject(message.systemMessage, options); + if (message.data != null && message.hasOwnProperty("data")) { + object.data = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.toObject(message.data, options); if (options.oneofs) - object.kind = "systemMessage"; + object.kind = "data"; + } + if (message.analysis != null && message.hasOwnProperty("analysis")) { + object.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.toObject(message.analysis, options); + if (options.oneofs) + object.kind = "analysis"; + } + if (message.chart != null && message.hasOwnProperty("chart")) { + object.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.toObject(message.chart, options); + if (options.oneofs) + object.kind = "chart"; + } + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.toObject(message.error, options); + if (options.oneofs) + object.kind = "error"; + } + if (message.groupId != null && message.hasOwnProperty("groupId")) { + object.groupId = message.groupId; + if (options.oneofs) + object._groupId = "groupId"; + } + if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { + object.exampleQueries = $root.google.cloud.geminidataanalytics.v1beta.ExampleQueries.toObject(message.exampleQueries, options); + if (options.oneofs) + object.kind = "exampleQueries"; + } + if (message.clarification != null && message.hasOwnProperty("clarification")) { + object.clarification = $root.google.cloud.geminidataanalytics.v1beta.ClarificationMessage.toObject(message.clarification, options); + if (options.oneofs) + object.kind = "clarification"; } - if (message.messageId != null && message.hasOwnProperty("messageId")) - object.messageId = message.messageId; return object; }; /** - * Converts this Message to JSON. + * Converts this SystemMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @instance * @returns {Object.} JSON object */ - Message.prototype.toJSON = function toJSON() { + SystemMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Message + * Gets the default type url for SystemMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.Message + * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SystemMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.Message"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SystemMessage"; }; - return Message; + return SystemMessage; })(); - v1beta.UserMessage = (function() { + v1beta.TextMessage = (function() { /** - * Properties of a UserMessage. + * Properties of a TextMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IUserMessage - * @property {string|null} [text] UserMessage text + * @interface ITextMessage + * @property {Array.|null} [parts] TextMessage parts + * @property {google.cloud.geminidataanalytics.v1beta.TextMessage.TextType|null} [textType] TextMessage textType + * @property {Uint8Array|null} [thoughtSignature] TextMessage thoughtSignature */ /** - * Constructs a new UserMessage. + * Constructs a new TextMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a UserMessage. - * @implements IUserMessage + * @classdesc Represents a TextMessage. + * @implements ITextMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage=} [properties] Properties to set */ - function UserMessage(properties) { + function TextMessage(properties) { + this.parts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47155,91 +48599,108 @@ } /** - * UserMessage text. - * @member {string|null|undefined} text - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * TextMessage parts. + * @member {Array.} parts + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @instance */ - UserMessage.prototype.text = null; + TextMessage.prototype.parts = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * TextMessage textType. + * @member {google.cloud.geminidataanalytics.v1beta.TextMessage.TextType} textType + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @instance + */ + TextMessage.prototype.textType = 0; /** - * UserMessage kind. - * @member {"text"|undefined} kind - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * TextMessage thoughtSignature. + * @member {Uint8Array} thoughtSignature + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @instance */ - Object.defineProperty(UserMessage.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["text"]), - set: $util.oneOfSetter($oneOfFields) - }); + TextMessage.prototype.thoughtSignature = $util.newBuffer([]); /** - * Creates a new UserMessage instance using the specified properties. + * Creates a new TextMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage instance + * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage instance */ - UserMessage.create = function create(properties) { - return new UserMessage(properties); + TextMessage.create = function create(properties) { + return new TextMessage(properties); }; /** - * Encodes the specified UserMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UserMessage.verify|verify} messages. + * Encodes the specified TextMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.TextMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage} message UserMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage} message TextMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserMessage.encode = function encode(message, writer) { + TextMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.parts != null && message.parts.length) + for (var i = 0; i < message.parts.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parts[i]); + if (message.textType != null && Object.hasOwnProperty.call(message, "textType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.textType); + if (message.thoughtSignature != null && Object.hasOwnProperty.call(message, "thoughtSignature")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.thoughtSignature); return writer; }; /** - * Encodes the specified UserMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.UserMessage.verify|verify} messages. + * Encodes the specified TextMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.TextMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IUserMessage} message UserMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage} message TextMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UserMessage.encodeDelimited = function encodeDelimited(message, writer) { + TextMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UserMessage message from the specified reader or buffer. + * Decodes a TextMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage + * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserMessage.decode = function decode(reader, length, error) { + TextMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.UserMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.TextMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.text = reader.string(); + if (!(message.parts && message.parts.length)) + message.parts = []; + message.parts.push(reader.string()); + break; + } + case 2: { + message.textType = reader.int32(); + break; + } + case 3: { + message.thoughtSignature = reader.bytes(); break; } default: @@ -47251,133 +48712,209 @@ }; /** - * Decodes a UserMessage message from the specified reader or buffer, length delimited. + * Decodes a TextMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage + * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UserMessage.decodeDelimited = function decodeDelimited(reader) { + TextMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UserMessage message. + * Verifies a TextMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UserMessage.verify = function verify(message) { + TextMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.kind = 1; - if (!$util.isString(message.text)) - return "text: string expected"; + if (message.parts != null && message.hasOwnProperty("parts")) { + if (!Array.isArray(message.parts)) + return "parts: array expected"; + for (var i = 0; i < message.parts.length; ++i) + if (!$util.isString(message.parts[i])) + return "parts: string[] expected"; } + if (message.textType != null && message.hasOwnProperty("textType")) + switch (message.textType) { + default: + return "textType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.thoughtSignature != null && message.hasOwnProperty("thoughtSignature")) + if (!(message.thoughtSignature && typeof message.thoughtSignature.length === "number" || $util.isString(message.thoughtSignature))) + return "thoughtSignature: buffer expected"; return null; }; /** - * Creates a UserMessage message from a plain object. Also converts values to their respective internal types. + * Creates a TextMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.UserMessage} UserMessage + * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage */ - UserMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.UserMessage) + TextMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.TextMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.UserMessage(); - if (object.text != null) - message.text = String(object.text); + var message = new $root.google.cloud.geminidataanalytics.v1beta.TextMessage(); + if (object.parts) { + if (!Array.isArray(object.parts)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.TextMessage.parts: array expected"); + message.parts = []; + for (var i = 0; i < object.parts.length; ++i) + message.parts[i] = String(object.parts[i]); + } + switch (object.textType) { + default: + if (typeof object.textType === "number") { + message.textType = object.textType; + break; + } + break; + case "TEXT_TYPE_UNSPECIFIED": + case 0: + message.textType = 0; + break; + case "FINAL_RESPONSE": + case 1: + message.textType = 1; + break; + case "THOUGHT": + case 2: + message.textType = 2; + break; + case "PROGRESS": + case 3: + message.textType = 3; + break; + } + if (object.thoughtSignature != null) + if (typeof object.thoughtSignature === "string") + $util.base64.decode(object.thoughtSignature, message.thoughtSignature = $util.newBuffer($util.base64.length(object.thoughtSignature)), 0); + else if (object.thoughtSignature.length >= 0) + message.thoughtSignature = object.thoughtSignature; return message; }; /** - * Creates a plain object from a UserMessage message. Also converts values to other types if specified. + * Creates a plain object from a TextMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.UserMessage} message UserMessage + * @param {google.cloud.geminidataanalytics.v1beta.TextMessage} message TextMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UserMessage.toObject = function toObject(message, options) { + TextMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = message.text; - if (options.oneofs) - object.kind = "text"; + if (options.arrays || options.defaults) + object.parts = []; + if (options.defaults) { + object.textType = options.enums === String ? "TEXT_TYPE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.thoughtSignature = ""; + else { + object.thoughtSignature = []; + if (options.bytes !== Array) + object.thoughtSignature = $util.newBuffer(object.thoughtSignature); + } + } + if (message.parts && message.parts.length) { + object.parts = []; + for (var j = 0; j < message.parts.length; ++j) + object.parts[j] = message.parts[j]; } + if (message.textType != null && message.hasOwnProperty("textType")) + object.textType = options.enums === String ? $root.google.cloud.geminidataanalytics.v1beta.TextMessage.TextType[message.textType] === undefined ? message.textType : $root.google.cloud.geminidataanalytics.v1beta.TextMessage.TextType[message.textType] : message.textType; + if (message.thoughtSignature != null && message.hasOwnProperty("thoughtSignature")) + object.thoughtSignature = options.bytes === String ? $util.base64.encode(message.thoughtSignature, 0, message.thoughtSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.thoughtSignature) : message.thoughtSignature; return object; }; /** - * Converts this UserMessage to JSON. + * Converts this TextMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @instance * @returns {Object.} JSON object */ - UserMessage.prototype.toJSON = function toJSON() { + TextMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UserMessage + * Gets the default type url for TextMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.UserMessage + * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UserMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TextMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.UserMessage"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.TextMessage"; }; - return UserMessage; + /** + * TextType enum. + * @name google.cloud.geminidataanalytics.v1beta.TextMessage.TextType + * @enum {number} + * @property {number} TEXT_TYPE_UNSPECIFIED=0 TEXT_TYPE_UNSPECIFIED value + * @property {number} FINAL_RESPONSE=1 FINAL_RESPONSE value + * @property {number} THOUGHT=2 THOUGHT value + * @property {number} PROGRESS=3 PROGRESS value + */ + TextMessage.TextType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TEXT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FINAL_RESPONSE"] = 1; + values[valuesById[2] = "THOUGHT"] = 2; + values[valuesById[3] = "PROGRESS"] = 3; + return values; + })(); + + return TextMessage; })(); - v1beta.SystemMessage = (function() { + v1beta.SchemaMessage = (function() { /** - * Properties of a SystemMessage. + * Properties of a SchemaMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface ISystemMessage - * @property {google.cloud.geminidataanalytics.v1beta.ITextMessage|null} [text] SystemMessage text - * @property {google.cloud.geminidataanalytics.v1beta.ISchemaMessage|null} [schema] SystemMessage schema - * @property {google.cloud.geminidataanalytics.v1beta.IDataMessage|null} [data] SystemMessage data - * @property {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage|null} [analysis] SystemMessage analysis - * @property {google.cloud.geminidataanalytics.v1beta.IChartMessage|null} [chart] SystemMessage chart - * @property {google.cloud.geminidataanalytics.v1beta.IErrorMessage|null} [error] SystemMessage error - * @property {google.cloud.geminidataanalytics.v1beta.IExampleQueries|null} [exampleQueries] SystemMessage exampleQueries - * @property {number|null} [groupId] SystemMessage groupId + * @interface ISchemaMessage + * @property {google.cloud.geminidataanalytics.v1beta.ISchemaQuery|null} [query] SchemaMessage query + * @property {google.cloud.geminidataanalytics.v1beta.ISchemaResult|null} [result] SchemaMessage result */ /** - * Constructs a new SystemMessage. + * Constructs a new SchemaMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a SystemMessage. - * @implements ISystemMessage + * @classdesc Represents a SchemaMessage. + * @implements ISchemaMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage=} [properties] Properties to set */ - function SystemMessage(properties) { + function SchemaMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47385,195 +48922,105 @@ } /** - * SystemMessage text. - * @member {google.cloud.geminidataanalytics.v1beta.ITextMessage|null|undefined} text - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage - * @instance - */ - SystemMessage.prototype.text = null; - - /** - * SystemMessage schema. - * @member {google.cloud.geminidataanalytics.v1beta.ISchemaMessage|null|undefined} schema - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage - * @instance - */ - SystemMessage.prototype.schema = null; - - /** - * SystemMessage data. - * @member {google.cloud.geminidataanalytics.v1beta.IDataMessage|null|undefined} data - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage - * @instance - */ - SystemMessage.prototype.data = null; - - /** - * SystemMessage analysis. - * @member {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage|null|undefined} analysis - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage - * @instance - */ - SystemMessage.prototype.analysis = null; - - /** - * SystemMessage chart. - * @member {google.cloud.geminidataanalytics.v1beta.IChartMessage|null|undefined} chart - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage - * @instance - */ - SystemMessage.prototype.chart = null; - - /** - * SystemMessage error. - * @member {google.cloud.geminidataanalytics.v1beta.IErrorMessage|null|undefined} error - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage - * @instance - */ - SystemMessage.prototype.error = null; - - /** - * SystemMessage exampleQueries. - * @member {google.cloud.geminidataanalytics.v1beta.IExampleQueries|null|undefined} exampleQueries - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * SchemaMessage query. + * @member {google.cloud.geminidataanalytics.v1beta.ISchemaQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @instance */ - SystemMessage.prototype.exampleQueries = null; + SchemaMessage.prototype.query = null; /** - * SystemMessage groupId. - * @member {number|null|undefined} groupId - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * SchemaMessage result. + * @member {google.cloud.geminidataanalytics.v1beta.ISchemaResult|null|undefined} result + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @instance */ - SystemMessage.prototype.groupId = null; + SchemaMessage.prototype.result = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * SystemMessage kind. - * @member {"text"|"schema"|"data"|"analysis"|"chart"|"error"|"exampleQueries"|undefined} kind - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * SchemaMessage kind. + * @member {"query"|"result"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @instance */ - Object.defineProperty(SystemMessage.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["text", "schema", "data", "analysis", "chart", "error", "exampleQueries"]), - set: $util.oneOfSetter($oneOfFields) - }); - - // Virtual OneOf for proto3 optional field - Object.defineProperty(SystemMessage.prototype, "_groupId", { - get: $util.oneOfGetter($oneOfFields = ["groupId"]), + Object.defineProperty(SchemaMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "result"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new SystemMessage instance using the specified properties. + * Creates a new SchemaMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage instance + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage instance */ - SystemMessage.create = function create(properties) { - return new SystemMessage(properties); + SchemaMessage.create = function create(properties) { + return new SchemaMessage(properties); }; /** - * Encodes the specified SystemMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SystemMessage.verify|verify} messages. + * Encodes the specified SchemaMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage} message SystemMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage} message SchemaMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SystemMessage.encode = function encode(message, writer) { + SchemaMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - $root.google.cloud.geminidataanalytics.v1beta.TextMessage.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.encode(message.schema, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - $root.google.cloud.geminidataanalytics.v1beta.DataMessage.encode(message.data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.analysis != null && Object.hasOwnProperty.call(message, "analysis")) - $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.encode(message.analysis, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.chart != null && Object.hasOwnProperty.call(message, "chart")) - $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.encode(message.chart, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.encode(message.error, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.groupId); - if (message.exampleQueries != null && Object.hasOwnProperty.call(message, "exampleQueries")) - $root.google.cloud.geminidataanalytics.v1beta.ExampleQueries.encode(message.exampleQueries, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified SystemMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SystemMessage.verify|verify} messages. + * Encodes the specified SchemaMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISystemMessage} message SystemMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage} message SchemaMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SystemMessage.encodeDelimited = function encodeDelimited(message, writer) { + SchemaMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SystemMessage message from the specified reader or buffer. + * Decodes a SchemaMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SystemMessage.decode = function decode(reader, length, error) { + SchemaMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SystemMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.text = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.decode(reader, reader.uint32()); + message.query = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.decode(reader, reader.uint32()); break; } case 2: { - message.schema = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.decode(reader, reader.uint32()); - break; - } - case 3: { - message.data = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.decode(reader, reader.uint32()); - break; - } - case 4: { - message.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.decode(reader, reader.uint32()); - break; - } - case 5: { - message.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.decode(reader, reader.uint32()); - break; - } - case 6: { - message.error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.decode(reader, reader.uint32()); - break; - } - case 13: { - message.exampleQueries = $root.google.cloud.geminidataanalytics.v1beta.ExampleQueries.decode(reader, reader.uint32()); - break; - } - case 12: { - message.groupId = reader.int32(); + message.result = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.decode(reader, reader.uint32()); break; } default: @@ -47585,266 +49032,152 @@ }; /** - * Decodes a SystemMessage message from the specified reader or buffer, length delimited. + * Decodes a SchemaMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SystemMessage.decodeDelimited = function decodeDelimited(reader) { + SchemaMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SystemMessage message. + * Verifies a SchemaMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SystemMessage.verify = function verify(message) { + SchemaMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.text != null && message.hasOwnProperty("text")) { - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.verify(message.text); - if (error) - return "text." + error; - } - } - if (message.schema != null && message.hasOwnProperty("schema")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify(message.schema); - if (error) - return "schema." + error; - } - } - if (message.data != null && message.hasOwnProperty("data")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.verify(message.data); - if (error) - return "data." + error; - } - } - if (message.analysis != null && message.hasOwnProperty("analysis")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify(message.analysis); - if (error) - return "analysis." + error; - } - } - if (message.chart != null && message.hasOwnProperty("chart")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.verify(message.chart); - if (error) - return "chart." + error; - } - } - if (message.error != null && message.hasOwnProperty("error")) { - if (properties.kind === 1) - return "kind: multiple values"; + if (message.query != null && message.hasOwnProperty("query")) { properties.kind = 1; { - var error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify(message.error); + var error = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify(message.query); if (error) - return "error." + error; + return "query." + error; } } - if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { + if (message.result != null && message.hasOwnProperty("result")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; { - var error = $root.google.cloud.geminidataanalytics.v1beta.ExampleQueries.verify(message.exampleQueries); + var error = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.verify(message.result); if (error) - return "exampleQueries." + error; + return "result." + error; } } - if (message.groupId != null && message.hasOwnProperty("groupId")) { - properties._groupId = 1; - if (!$util.isInteger(message.groupId)) - return "groupId: integer expected"; - } return null; }; /** - * Creates a SystemMessage message from a plain object. Also converts values to their respective internal types. + * Creates a SchemaMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.SystemMessage} SystemMessage + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage */ - SystemMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SystemMessage) + SchemaMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.SystemMessage(); - if (object.text != null) { - if (typeof object.text !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.text: object expected"); - message.text = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.fromObject(object.text); - } - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.schema: object expected"); - message.schema = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.fromObject(object.schema); - } - if (object.data != null) { - if (typeof object.data !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.data: object expected"); - message.data = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.fromObject(object.data); - } - if (object.analysis != null) { - if (typeof object.analysis !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.analysis: object expected"); - message.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.fromObject(object.analysis); - } - if (object.chart != null) { - if (typeof object.chart !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.chart: object expected"); - message.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.fromObject(object.chart); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.error: object expected"); - message.error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.fromObject(object.error); + var message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.fromObject(object.query); } - if (object.exampleQueries != null) { - if (typeof object.exampleQueries !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SystemMessage.exampleQueries: object expected"); - message.exampleQueries = $root.google.cloud.geminidataanalytics.v1beta.ExampleQueries.fromObject(object.exampleQueries); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaMessage.result: object expected"); + message.result = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.fromObject(object.result); } - if (object.groupId != null) - message.groupId = object.groupId | 0; return message; }; /** - * Creates a plain object from a SystemMessage message. Also converts values to other types if specified. + * Creates a plain object from a SchemaMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.SystemMessage} message SystemMessage + * @param {google.cloud.geminidataanalytics.v1beta.SchemaMessage} message SchemaMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SystemMessage.toObject = function toObject(message, options) { + SchemaMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.text != null && message.hasOwnProperty("text")) { - object.text = $root.google.cloud.geminidataanalytics.v1beta.TextMessage.toObject(message.text, options); - if (options.oneofs) - object.kind = "text"; - } - if (message.schema != null && message.hasOwnProperty("schema")) { - object.schema = $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage.toObject(message.schema, options); - if (options.oneofs) - object.kind = "schema"; - } - if (message.data != null && message.hasOwnProperty("data")) { - object.data = $root.google.cloud.geminidataanalytics.v1beta.DataMessage.toObject(message.data, options); - if (options.oneofs) - object.kind = "data"; - } - if (message.analysis != null && message.hasOwnProperty("analysis")) { - object.analysis = $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage.toObject(message.analysis, options); - if (options.oneofs) - object.kind = "analysis"; - } - if (message.chart != null && message.hasOwnProperty("chart")) { - object.chart = $root.google.cloud.geminidataanalytics.v1beta.ChartMessage.toObject(message.chart, options); - if (options.oneofs) - object.kind = "chart"; - } - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage.toObject(message.error, options); - if (options.oneofs) - object.kind = "error"; - } - if (message.groupId != null && message.hasOwnProperty("groupId")) { - object.groupId = message.groupId; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.toObject(message.query, options); if (options.oneofs) - object._groupId = "groupId"; + object.kind = "query"; } - if (message.exampleQueries != null && message.hasOwnProperty("exampleQueries")) { - object.exampleQueries = $root.google.cloud.geminidataanalytics.v1beta.ExampleQueries.toObject(message.exampleQueries, options); + if (message.result != null && message.hasOwnProperty("result")) { + object.result = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.toObject(message.result, options); if (options.oneofs) - object.kind = "exampleQueries"; + object.kind = "result"; } return object; }; /** - * Converts this SystemMessage to JSON. + * Converts this SchemaMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @instance * @returns {Object.} JSON object */ - SystemMessage.prototype.toJSON = function toJSON() { + SchemaMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SystemMessage + * Gets the default type url for SchemaMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.SystemMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SystemMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SchemaMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SystemMessage"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SchemaMessage"; }; - return SystemMessage; + return SchemaMessage; })(); - v1beta.TextMessage = (function() { + v1beta.SchemaQuery = (function() { /** - * Properties of a TextMessage. + * Properties of a SchemaQuery. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface ITextMessage - * @property {Array.|null} [parts] TextMessage parts - * @property {google.cloud.geminidataanalytics.v1beta.TextMessage.TextType|null} [textType] TextMessage textType + * @interface ISchemaQuery + * @property {string|null} [question] SchemaQuery question */ /** - * Constructs a new TextMessage. + * Constructs a new SchemaQuery. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a TextMessage. - * @implements ITextMessage + * @classdesc Represents a SchemaQuery. + * @implements ISchemaQuery * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery=} [properties] Properties to set */ - function TextMessage(properties) { - this.parts = []; + function SchemaQuery(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47852,94 +49185,77 @@ } /** - * TextMessage parts. - * @member {Array.} parts - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage - * @instance - */ - TextMessage.prototype.parts = $util.emptyArray; - - /** - * TextMessage textType. - * @member {google.cloud.geminidataanalytics.v1beta.TextMessage.TextType} textType - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * SchemaQuery question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @instance */ - TextMessage.prototype.textType = 0; + SchemaQuery.prototype.question = ""; /** - * Creates a new TextMessage instance using the specified properties. + * Creates a new SchemaQuery instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage instance + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery instance */ - TextMessage.create = function create(properties) { - return new TextMessage(properties); + SchemaQuery.create = function create(properties) { + return new SchemaQuery(properties); }; /** - * Encodes the specified TextMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.TextMessage.verify|verify} messages. + * Encodes the specified SchemaQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage} message TextMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery} message SchemaQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextMessage.encode = function encode(message, writer) { + SchemaQuery.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parts != null && message.parts.length) - for (var i = 0; i < message.parts.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parts[i]); - if (message.textType != null && Object.hasOwnProperty.call(message, "textType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.textType); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); return writer; }; /** - * Encodes the specified TextMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.TextMessage.verify|verify} messages. + * Encodes the specified SchemaQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.ITextMessage} message TextMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery} message SchemaQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextMessage.encodeDelimited = function encodeDelimited(message, writer) { + SchemaQuery.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextMessage message from the specified reader or buffer. + * Decodes a SchemaQuery message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextMessage.decode = function decode(reader, length, error) { + SchemaQuery.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.TextMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.parts && message.parts.length)) - message.parts = []; - message.parts.push(reader.string()); - break; - } - case 2: { - message.textType = reader.int32(); + message.question = reader.string(); break; } default: @@ -47951,191 +49267,123 @@ }; /** - * Decodes a TextMessage message from the specified reader or buffer, length delimited. + * Decodes a SchemaQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextMessage.decodeDelimited = function decodeDelimited(reader) { + SchemaQuery.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextMessage message. + * Verifies a SchemaQuery message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextMessage.verify = function verify(message) { + SchemaQuery.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parts != null && message.hasOwnProperty("parts")) { - if (!Array.isArray(message.parts)) - return "parts: array expected"; - for (var i = 0; i < message.parts.length; ++i) - if (!$util.isString(message.parts[i])) - return "parts: string[] expected"; - } - if (message.textType != null && message.hasOwnProperty("textType")) - switch (message.textType) { - default: - return "textType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; return null; }; /** - * Creates a TextMessage message from a plain object. Also converts values to their respective internal types. + * Creates a SchemaQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.TextMessage} TextMessage + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery */ - TextMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.TextMessage) + SchemaQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.TextMessage(); - if (object.parts) { - if (!Array.isArray(object.parts)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.TextMessage.parts: array expected"); - message.parts = []; - for (var i = 0; i < object.parts.length; ++i) - message.parts[i] = String(object.parts[i]); - } - switch (object.textType) { - default: - if (typeof object.textType === "number") { - message.textType = object.textType; - break; - } - break; - case "TEXT_TYPE_UNSPECIFIED": - case 0: - message.textType = 0; - break; - case "FINAL_RESPONSE": - case 1: - message.textType = 1; - break; - case "THOUGHT": - case 2: - message.textType = 2; - break; - case "PROGRESS": - case 3: - message.textType = 3; - break; - } + var message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery(); + if (object.question != null) + message.question = String(object.question); return message; }; /** - * Creates a plain object from a TextMessage message. Also converts values to other types if specified. + * Creates a plain object from a SchemaQuery message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.TextMessage} message TextMessage + * @param {google.cloud.geminidataanalytics.v1beta.SchemaQuery} message SchemaQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextMessage.toObject = function toObject(message, options) { + SchemaQuery.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.parts = []; if (options.defaults) - object.textType = options.enums === String ? "TEXT_TYPE_UNSPECIFIED" : 0; - if (message.parts && message.parts.length) { - object.parts = []; - for (var j = 0; j < message.parts.length; ++j) - object.parts[j] = message.parts[j]; - } - if (message.textType != null && message.hasOwnProperty("textType")) - object.textType = options.enums === String ? $root.google.cloud.geminidataanalytics.v1beta.TextMessage.TextType[message.textType] === undefined ? message.textType : $root.google.cloud.geminidataanalytics.v1beta.TextMessage.TextType[message.textType] : message.textType; + object.question = ""; + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; return object; }; /** - * Converts this TextMessage to JSON. + * Converts this SchemaQuery to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @instance * @returns {Object.} JSON object */ - TextMessage.prototype.toJSON = function toJSON() { + SchemaQuery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TextMessage + * Gets the default type url for SchemaQuery * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.TextMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TextMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SchemaQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.TextMessage"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SchemaQuery"; }; - /** - * TextType enum. - * @name google.cloud.geminidataanalytics.v1beta.TextMessage.TextType - * @enum {number} - * @property {number} TEXT_TYPE_UNSPECIFIED=0 TEXT_TYPE_UNSPECIFIED value - * @property {number} FINAL_RESPONSE=1 FINAL_RESPONSE value - * @property {number} THOUGHT=2 THOUGHT value - * @property {number} PROGRESS=3 PROGRESS value - */ - TextMessage.TextType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TEXT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FINAL_RESPONSE"] = 1; - values[valuesById[2] = "THOUGHT"] = 2; - values[valuesById[3] = "PROGRESS"] = 3; - return values; - })(); - - return TextMessage; + return SchemaQuery; })(); - v1beta.SchemaMessage = (function() { + v1beta.SchemaResult = (function() { /** - * Properties of a SchemaMessage. + * Properties of a SchemaResult. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface ISchemaMessage - * @property {google.cloud.geminidataanalytics.v1beta.ISchemaQuery|null} [query] SchemaMessage query - * @property {google.cloud.geminidataanalytics.v1beta.ISchemaResult|null} [result] SchemaMessage result + * @interface ISchemaResult + * @property {Array.|null} [datasources] SchemaResult datasources */ /** - * Constructs a new SchemaMessage. + * Constructs a new SchemaResult. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a SchemaMessage. - * @implements ISchemaMessage + * @classdesc Represents a SchemaResult. + * @implements ISchemaResult * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult=} [properties] Properties to set */ - function SchemaMessage(properties) { + function SchemaResult(properties) { + this.datasources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48143,105 +49391,80 @@ } /** - * SchemaMessage query. - * @member {google.cloud.geminidataanalytics.v1beta.ISchemaQuery|null|undefined} query - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage - * @instance - */ - SchemaMessage.prototype.query = null; - - /** - * SchemaMessage result. - * @member {google.cloud.geminidataanalytics.v1beta.ISchemaResult|null|undefined} result - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage - * @instance - */ - SchemaMessage.prototype.result = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SchemaMessage kind. - * @member {"query"|"result"|undefined} kind - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * SchemaResult datasources. + * @member {Array.} datasources + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @instance */ - Object.defineProperty(SchemaMessage.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["query", "result"]), - set: $util.oneOfSetter($oneOfFields) - }); + SchemaResult.prototype.datasources = $util.emptyArray; /** - * Creates a new SchemaMessage instance using the specified properties. + * Creates a new SchemaResult instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage instance + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult instance */ - SchemaMessage.create = function create(properties) { - return new SchemaMessage(properties); + SchemaResult.create = function create(properties) { + return new SchemaResult(properties); }; /** - * Encodes the specified SchemaMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify|verify} messages. + * Encodes the specified SchemaResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaResult.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage} message SchemaMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult} message SchemaResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SchemaMessage.encode = function encode(message, writer) { + SchemaResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.datasources != null && message.datasources.length) + for (var i = 0; i < message.datasources.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.Datasource.encode(message.datasources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SchemaMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaMessage.verify|verify} messages. + * Encodes the specified SchemaResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaMessage} message SchemaMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult} message SchemaResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SchemaMessage.encodeDelimited = function encodeDelimited(message, writer) { + SchemaResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SchemaMessage message from the specified reader or buffer. + * Decodes a SchemaResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SchemaMessage.decode = function decode(reader, length, error) { + SchemaResult.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.query = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.decode(reader, reader.uint32()); - break; - } - case 2: { - message.result = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.decode(reader, reader.uint32()); + if (!(message.datasources && message.datasources.length)) + message.datasources = []; + message.datasources.push($root.google.cloud.geminidataanalytics.v1beta.Datasource.decode(reader, reader.uint32())); break; } default: @@ -48253,152 +49476,143 @@ }; /** - * Decodes a SchemaMessage message from the specified reader or buffer, length delimited. + * Decodes a SchemaResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SchemaMessage.decodeDelimited = function decodeDelimited(reader) { + SchemaResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SchemaMessage message. + * Verifies a SchemaResult message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SchemaMessage.verify = function verify(message) { + SchemaResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.query != null && message.hasOwnProperty("query")) { - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify(message.query); - if (error) - return "query." + error; - } - } - if (message.result != null && message.hasOwnProperty("result")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.verify(message.result); + if (message.datasources != null && message.hasOwnProperty("datasources")) { + if (!Array.isArray(message.datasources)) + return "datasources: array expected"; + for (var i = 0; i < message.datasources.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Datasource.verify(message.datasources[i]); if (error) - return "result." + error; + return "datasources." + error; } } return null; }; /** - * Creates a SchemaMessage message from a plain object. Also converts values to their respective internal types. + * Creates a SchemaResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaMessage} SchemaMessage + * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult */ - SchemaMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage) + SchemaResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SchemaResult) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaMessage(); - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaMessage.query: object expected"); - message.query = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.fromObject(object.query); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaMessage.result: object expected"); - message.result = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.fromObject(object.result); + var message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaResult(); + if (object.datasources) { + if (!Array.isArray(object.datasources)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaResult.datasources: array expected"); + message.datasources = []; + for (var i = 0; i < object.datasources.length; ++i) { + if (typeof object.datasources[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaResult.datasources: object expected"); + message.datasources[i] = $root.google.cloud.geminidataanalytics.v1beta.Datasource.fromObject(object.datasources[i]); + } } return message; }; /** - * Creates a plain object from a SchemaMessage message. Also converts values to other types if specified. + * Creates a plain object from a SchemaResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.SchemaMessage} message SchemaMessage + * @param {google.cloud.geminidataanalytics.v1beta.SchemaResult} message SchemaResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SchemaMessage.toObject = function toObject(message, options) { + SchemaResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery.toObject(message.query, options); - if (options.oneofs) - object.kind = "query"; - } - if (message.result != null && message.hasOwnProperty("result")) { - object.result = $root.google.cloud.geminidataanalytics.v1beta.SchemaResult.toObject(message.result, options); - if (options.oneofs) - object.kind = "result"; + if (options.arrays || options.defaults) + object.datasources = []; + if (message.datasources && message.datasources.length) { + object.datasources = []; + for (var j = 0; j < message.datasources.length; ++j) + object.datasources[j] = $root.google.cloud.geminidataanalytics.v1beta.Datasource.toObject(message.datasources[j], options); } return object; }; /** - * Converts this SchemaMessage to JSON. + * Converts this SchemaResult to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @instance * @returns {Object.} JSON object */ - SchemaMessage.prototype.toJSON = function toJSON() { + SchemaResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SchemaMessage + * Gets the default type url for SchemaResult * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaMessage + * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SchemaMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SchemaResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SchemaMessage"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SchemaResult"; }; - return SchemaMessage; + return SchemaResult; })(); - v1beta.SchemaQuery = (function() { + v1beta.DataMessage = (function() { /** - * Properties of a SchemaQuery. + * Properties of a DataMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface ISchemaQuery - * @property {string|null} [question] SchemaQuery question + * @interface IDataMessage + * @property {google.cloud.geminidataanalytics.v1beta.IDataQuery|null} [query] DataMessage query + * @property {string|null} [generatedSql] DataMessage generatedSql + * @property {google.cloud.geminidataanalytics.v1beta.IDataResult|null} [result] DataMessage result + * @property {google.cloud.geminidataanalytics.v1beta.ILookerQuery|null} [generatedLookerQuery] DataMessage generatedLookerQuery + * @property {google.cloud.geminidataanalytics.v1beta.IBigQueryJob|null} [bigQueryJob] DataMessage bigQueryJob */ /** - * Constructs a new SchemaQuery. + * Constructs a new DataMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a SchemaQuery. - * @implements ISchemaQuery + * @classdesc Represents a DataMessage. + * @implements IDataMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage=} [properties] Properties to set */ - function SchemaQuery(properties) { + function DataMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48406,77 +49620,147 @@ } /** - * SchemaQuery question. - * @member {string} question - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * DataMessage query. + * @member {google.cloud.geminidataanalytics.v1beta.IDataQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + DataMessage.prototype.query = null; + + /** + * DataMessage generatedSql. + * @member {string|null|undefined} generatedSql + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + DataMessage.prototype.generatedSql = null; + + /** + * DataMessage result. + * @member {google.cloud.geminidataanalytics.v1beta.IDataResult|null|undefined} result + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + DataMessage.prototype.result = null; + + /** + * DataMessage generatedLookerQuery. + * @member {google.cloud.geminidataanalytics.v1beta.ILookerQuery|null|undefined} generatedLookerQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + DataMessage.prototype.generatedLookerQuery = null; + + /** + * DataMessage bigQueryJob. + * @member {google.cloud.geminidataanalytics.v1beta.IBigQueryJob|null|undefined} bigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @instance + */ + DataMessage.prototype.bigQueryJob = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataMessage kind. + * @member {"query"|"generatedSql"|"result"|"generatedLookerQuery"|"bigQueryJob"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @instance */ - SchemaQuery.prototype.question = ""; + Object.defineProperty(DataMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "generatedSql", "result", "generatedLookerQuery", "bigQueryJob"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new SchemaQuery instance using the specified properties. + * Creates a new DataMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery instance + * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage instance */ - SchemaQuery.create = function create(properties) { - return new SchemaQuery(properties); + DataMessage.create = function create(properties) { + return new DataMessage(properties); }; /** - * Encodes the specified SchemaQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify|verify} messages. + * Encodes the specified DataMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery} message SchemaQuery message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage} message DataMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SchemaQuery.encode = function encode(message, writer) { + DataMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.question != null && Object.hasOwnProperty.call(message, "question")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1beta.DataQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.generatedSql != null && Object.hasOwnProperty.call(message, "generatedSql")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.generatedSql); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.geminidataanalytics.v1beta.DataResult.encode(message.result, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.generatedLookerQuery != null && Object.hasOwnProperty.call(message, "generatedLookerQuery")) + $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.encode(message.generatedLookerQuery, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bigQueryJob != null && Object.hasOwnProperty.call(message, "bigQueryJob")) + $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.encode(message.bigQueryJob, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified SchemaQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaQuery.verify|verify} messages. + * Encodes the specified DataMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaQuery} message SchemaQuery message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage} message DataMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SchemaQuery.encodeDelimited = function encodeDelimited(message, writer) { + DataMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SchemaQuery message from the specified reader or buffer. + * Decodes a DataMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery + * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SchemaQuery.decode = function decode(reader, length, error) { + DataMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.question = reader.string(); + message.query = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.decode(reader, reader.uint32()); + break; + } + case 2: { + message.generatedSql = reader.string(); + break; + } + case 3: { + message.result = $root.google.cloud.geminidataanalytics.v1beta.DataResult.decode(reader, reader.uint32()); + break; + } + case 4: { + message.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.decode(reader, reader.uint32()); + break; + } + case 5: { + message.bigQueryJob = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.decode(reader, reader.uint32()); break; } default: @@ -48488,122 +49772,209 @@ }; /** - * Decodes a SchemaQuery message from the specified reader or buffer, length delimited. + * Decodes a DataMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery + * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SchemaQuery.decodeDelimited = function decodeDelimited(reader) { + DataMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SchemaQuery message. + * Verifies a DataMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SchemaQuery.verify = function verify(message) { + DataMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.question != null && message.hasOwnProperty("question")) - if (!$util.isString(message.question)) - return "question: string expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.generatedSql != null && message.hasOwnProperty("generatedSql")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.generatedSql)) + return "generatedSql: string expected"; + } + if (message.result != null && message.hasOwnProperty("result")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.DataResult.verify(message.result); + if (error) + return "result." + error; + } + } + if (message.generatedLookerQuery != null && message.hasOwnProperty("generatedLookerQuery")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.verify(message.generatedLookerQuery); + if (error) + return "generatedLookerQuery." + error; + } + } + if (message.bigQueryJob != null && message.hasOwnProperty("bigQueryJob")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify(message.bigQueryJob); + if (error) + return "bigQueryJob." + error; + } + } return null; }; /** - * Creates a SchemaQuery message from a plain object. Also converts values to their respective internal types. + * Creates a DataMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaQuery} SchemaQuery + * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage */ - SchemaQuery.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery) + DataMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaQuery(); - if (object.question != null) - message.question = String(object.question); + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.fromObject(object.query); + } + if (object.generatedSql != null) + message.generatedSql = String(object.generatedSql); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.result: object expected"); + message.result = $root.google.cloud.geminidataanalytics.v1beta.DataResult.fromObject(object.result); + } + if (object.generatedLookerQuery != null) { + if (typeof object.generatedLookerQuery !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.generatedLookerQuery: object expected"); + message.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.fromObject(object.generatedLookerQuery); + } + if (object.bigQueryJob != null) { + if (typeof object.bigQueryJob !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.bigQueryJob: object expected"); + message.bigQueryJob = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.fromObject(object.bigQueryJob); + } return message; }; /** - * Creates a plain object from a SchemaQuery message. Also converts values to other types if specified. + * Creates a plain object from a DataMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.SchemaQuery} message SchemaQuery + * @param {google.cloud.geminidataanalytics.v1beta.DataMessage} message DataMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SchemaQuery.toObject = function toObject(message, options) { + DataMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.question = ""; - if (message.question != null && message.hasOwnProperty("question")) - object.question = message.question; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; + } + if (message.generatedSql != null && message.hasOwnProperty("generatedSql")) { + object.generatedSql = message.generatedSql; + if (options.oneofs) + object.kind = "generatedSql"; + } + if (message.result != null && message.hasOwnProperty("result")) { + object.result = $root.google.cloud.geminidataanalytics.v1beta.DataResult.toObject(message.result, options); + if (options.oneofs) + object.kind = "result"; + } + if (message.generatedLookerQuery != null && message.hasOwnProperty("generatedLookerQuery")) { + object.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.toObject(message.generatedLookerQuery, options); + if (options.oneofs) + object.kind = "generatedLookerQuery"; + } + if (message.bigQueryJob != null && message.hasOwnProperty("bigQueryJob")) { + object.bigQueryJob = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.toObject(message.bigQueryJob, options); + if (options.oneofs) + object.kind = "bigQueryJob"; + } return object; }; /** - * Converts this SchemaQuery to JSON. + * Converts this DataMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @instance * @returns {Object.} JSON object */ - SchemaQuery.prototype.toJSON = function toJSON() { + DataMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SchemaQuery + * Gets the default type url for DataMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaQuery + * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SchemaQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SchemaQuery"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataMessage"; }; - return SchemaQuery; + return DataMessage; })(); - v1beta.SchemaResult = (function() { + v1beta.DataQuery = (function() { /** - * Properties of a SchemaResult. + * Properties of a DataQuery. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface ISchemaResult - * @property {Array.|null} [datasources] SchemaResult datasources + * @interface IDataQuery + * @property {google.cloud.geminidataanalytics.v1beta.ILookerQuery|null} [looker] DataQuery looker + * @property {string|null} [question] DataQuery question + * @property {string|null} [name] DataQuery name + * @property {Array.|null} [datasources] DataQuery datasources */ /** - * Constructs a new SchemaResult. + * Constructs a new DataQuery. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a SchemaResult. - * @implements ISchemaResult + * @classdesc Represents a DataQuery. + * @implements IDataQuery * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery=} [properties] Properties to set */ - function SchemaResult(properties) { + function DataQuery(properties) { this.datasources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -48612,77 +49983,133 @@ } /** - * SchemaResult datasources. + * DataQuery looker. + * @member {google.cloud.geminidataanalytics.v1beta.ILookerQuery|null|undefined} looker + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @instance + */ + DataQuery.prototype.looker = null; + + /** + * DataQuery question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @instance + */ + DataQuery.prototype.question = ""; + + /** + * DataQuery name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @instance + */ + DataQuery.prototype.name = ""; + + /** + * DataQuery datasources. * @member {Array.} datasources - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @instance */ - SchemaResult.prototype.datasources = $util.emptyArray; + DataQuery.prototype.datasources = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new SchemaResult instance using the specified properties. + * DataQuery queryType. + * @member {"looker"|undefined} queryType + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @instance + */ + Object.defineProperty(DataQuery.prototype, "queryType", { + get: $util.oneOfGetter($oneOfFields = ["looker"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataQuery instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult instance + * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery instance */ - SchemaResult.create = function create(properties) { - return new SchemaResult(properties); + DataQuery.create = function create(properties) { + return new DataQuery(properties); }; /** - * Encodes the specified SchemaResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaResult.verify|verify} messages. + * Encodes the specified DataQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataQuery.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult} message SchemaResult message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery} message DataQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SchemaResult.encode = function encode(message, writer) { + DataQuery.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); if (message.datasources != null && message.datasources.length) for (var i = 0; i < message.datasources.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.Datasource.encode(message.datasources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.geminidataanalytics.v1beta.Datasource.encode(message.datasources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.looker != null && Object.hasOwnProperty.call(message, "looker")) + $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.encode(message.looker, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified SchemaResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.SchemaResult.verify|verify} messages. + * Encodes the specified DataQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataQuery.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.ISchemaResult} message SchemaResult message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery} message DataQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SchemaResult.encodeDelimited = function encodeDelimited(message, writer) { + DataQuery.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SchemaResult message from the specified reader or buffer. + * Decodes a DataQuery message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult + * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SchemaResult.decode = function decode(reader, length, error) { + DataQuery.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataQuery(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 4: { + message.looker = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.decode(reader, reader.uint32()); + break; + } case 1: { + message.question = reader.string(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 2: { if (!(message.datasources && message.datasources.length)) message.datasources = []; message.datasources.push($root.google.cloud.geminidataanalytics.v1beta.Datasource.decode(reader, reader.uint32())); @@ -48697,32 +50124,47 @@ }; /** - * Decodes a SchemaResult message from the specified reader or buffer, length delimited. + * Decodes a DataQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult + * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SchemaResult.decodeDelimited = function decodeDelimited(reader) { + DataQuery.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SchemaResult message. + * Verifies a DataQuery message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SchemaResult.verify = function verify(message) { + DataQuery.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.looker != null && message.hasOwnProperty("looker")) { + properties.queryType = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.verify(message.looker); + if (error) + return "looker." + error; + } + } + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; if (message.datasources != null && message.hasOwnProperty("datasources")) { if (!Array.isArray(message.datasources)) return "datasources: array expected"; @@ -48736,24 +50178,33 @@ }; /** - * Creates a SchemaResult message from a plain object. Also converts values to their respective internal types. + * Creates a DataQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.SchemaResult} SchemaResult + * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery */ - SchemaResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.SchemaResult) + DataQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataQuery) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.SchemaResult(); + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataQuery(); + if (object.looker != null) { + if (typeof object.looker !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataQuery.looker: object expected"); + message.looker = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.fromObject(object.looker); + } + if (object.question != null) + message.question = String(object.question); + if (object.name != null) + message.name = String(object.name); if (object.datasources) { if (!Array.isArray(object.datasources)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaResult.datasources: array expected"); + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataQuery.datasources: array expected"); message.datasources = []; for (var i = 0; i < object.datasources.length; ++i) { if (typeof object.datasources[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.SchemaResult.datasources: object expected"); + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataQuery.datasources: object expected"); message.datasources[i] = $root.google.cloud.geminidataanalytics.v1beta.Datasource.fromObject(object.datasources[i]); } } @@ -48761,79 +50212,93 @@ }; /** - * Creates a plain object from a SchemaResult message. Also converts values to other types if specified. + * Creates a plain object from a DataQuery message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.SchemaResult} message SchemaResult + * @param {google.cloud.geminidataanalytics.v1beta.DataQuery} message DataQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SchemaResult.toObject = function toObject(message, options) { + DataQuery.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.datasources = []; + if (options.defaults) { + object.question = ""; + object.name = ""; + } + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; if (message.datasources && message.datasources.length) { object.datasources = []; for (var j = 0; j < message.datasources.length; ++j) object.datasources[j] = $root.google.cloud.geminidataanalytics.v1beta.Datasource.toObject(message.datasources[j], options); } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.looker != null && message.hasOwnProperty("looker")) { + object.looker = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.toObject(message.looker, options); + if (options.oneofs) + object.queryType = "looker"; + } return object; }; /** - * Converts this SchemaResult to JSON. + * Converts this DataQuery to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @instance * @returns {Object.} JSON object */ - SchemaResult.prototype.toJSON = function toJSON() { + DataQuery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SchemaResult + * Gets the default type url for DataQuery * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.SchemaResult + * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SchemaResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.SchemaResult"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataQuery"; }; - return SchemaResult; + return DataQuery; })(); - v1beta.DataMessage = (function() { + v1beta.DataResult = (function() { /** - * Properties of a DataMessage. + * Properties of a DataResult. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IDataMessage - * @property {google.cloud.geminidataanalytics.v1beta.IDataQuery|null} [query] DataMessage query - * @property {string|null} [generatedSql] DataMessage generatedSql - * @property {google.cloud.geminidataanalytics.v1beta.IDataResult|null} [result] DataMessage result - * @property {google.cloud.geminidataanalytics.v1beta.ILookerQuery|null} [generatedLookerQuery] DataMessage generatedLookerQuery - * @property {google.cloud.geminidataanalytics.v1beta.IBigQueryJob|null} [bigQueryJob] DataMessage bigQueryJob + * @interface IDataResult + * @property {string|null} [name] DataResult name + * @property {google.cloud.geminidataanalytics.v1beta.ISchema|null} [schema] DataResult schema + * @property {Array.|null} [data] DataResult data + * @property {Array.|null} [formattedData] DataResult formattedData */ /** - * Constructs a new DataMessage. + * Constructs a new DataResult. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a DataMessage. - * @implements IDataMessage + * @classdesc Represents a DataResult. + * @implements IDataResult * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IDataResult=} [properties] Properties to set */ - function DataMessage(properties) { + function DataResult(properties) { + this.data = []; + this.formattedData = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48841,147 +50306,125 @@ } /** - * DataMessage query. - * @member {google.cloud.geminidataanalytics.v1beta.IDataQuery|null|undefined} query - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage - * @instance - */ - DataMessage.prototype.query = null; - - /** - * DataMessage generatedSql. - * @member {string|null|undefined} generatedSql - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage - * @instance - */ - DataMessage.prototype.generatedSql = null; - - /** - * DataMessage result. - * @member {google.cloud.geminidataanalytics.v1beta.IDataResult|null|undefined} result - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * DataResult name. + * @member {string} name + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @instance */ - DataMessage.prototype.result = null; + DataResult.prototype.name = ""; /** - * DataMessage generatedLookerQuery. - * @member {google.cloud.geminidataanalytics.v1beta.ILookerQuery|null|undefined} generatedLookerQuery - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * DataResult schema. + * @member {google.cloud.geminidataanalytics.v1beta.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @instance */ - DataMessage.prototype.generatedLookerQuery = null; + DataResult.prototype.schema = null; /** - * DataMessage bigQueryJob. - * @member {google.cloud.geminidataanalytics.v1beta.IBigQueryJob|null|undefined} bigQueryJob - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * DataResult data. + * @member {Array.} data + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @instance */ - DataMessage.prototype.bigQueryJob = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DataResult.prototype.data = $util.emptyArray; /** - * DataMessage kind. - * @member {"query"|"generatedSql"|"result"|"generatedLookerQuery"|"bigQueryJob"|undefined} kind - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * DataResult formattedData. + * @member {Array.} formattedData + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @instance */ - Object.defineProperty(DataMessage.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["query", "generatedSql", "result", "generatedLookerQuery", "bigQueryJob"]), - set: $util.oneOfSetter($oneOfFields) - }); + DataResult.prototype.formattedData = $util.emptyArray; /** - * Creates a new DataMessage instance using the specified properties. + * Creates a new DataResult instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage instance + * @param {google.cloud.geminidataanalytics.v1beta.IDataResult=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult instance */ - DataMessage.create = function create(properties) { - return new DataMessage(properties); + DataResult.create = function create(properties) { + return new DataResult(properties); }; /** - * Encodes the specified DataMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataMessage.verify|verify} messages. + * Encodes the specified DataResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataResult.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage} message DataMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IDataResult} message DataResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataMessage.encode = function encode(message, writer) { + DataResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.google.cloud.geminidataanalytics.v1beta.DataQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.generatedSql != null && Object.hasOwnProperty.call(message, "generatedSql")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.generatedSql); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.google.cloud.geminidataanalytics.v1beta.DataResult.encode(message.result, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.generatedLookerQuery != null && Object.hasOwnProperty.call(message, "generatedLookerQuery")) - $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.encode(message.generatedLookerQuery, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bigQueryJob != null && Object.hasOwnProperty.call(message, "bigQueryJob")) - $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.encode(message.bigQueryJob, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.data != null && message.data.length) + for (var i = 0; i < message.data.length; ++i) + $root.google.protobuf.Struct.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1beta.Schema.encode(message.schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.formattedData != null && message.formattedData.length) + for (var i = 0; i < message.formattedData.length; ++i) + $root.google.protobuf.Struct.encode(message.formattedData[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified DataMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataMessage.verify|verify} messages. + * Encodes the specified DataResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataMessage} message DataMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IDataResult} message DataResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataMessage.encodeDelimited = function encodeDelimited(message, writer) { + DataResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataMessage message from the specified reader or buffer. + * Decodes a DataResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage + * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataMessage.decode = function decode(reader, length, error) { + DataResult.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.query = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.decode(reader, reader.uint32()); - break; - } - case 2: { - message.generatedSql = reader.string(); + case 3: { + message.name = reader.string(); break; } - case 3: { - message.result = $root.google.cloud.geminidataanalytics.v1beta.DataResult.decode(reader, reader.uint32()); + case 5: { + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.decode(reader, reader.uint32()); break; } - case 4: { - message.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.decode(reader, reader.uint32()); + case 2: { + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); break; } - case 5: { - message.bigQueryJob = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.decode(reader, reader.uint32()); + case 6: { + if (!(message.formattedData && message.formattedData.length)) + message.formattedData = []; + message.formattedData.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); break; } default: @@ -48993,210 +50436,192 @@ }; /** - * Decodes a DataMessage message from the specified reader or buffer, length delimited. + * Decodes a DataResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage + * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataMessage.decodeDelimited = function decodeDelimited(reader) { + DataResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataMessage message. + * Verifies a DataResult message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataMessage.verify = function verify(message) { + DataResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.query != null && message.hasOwnProperty("query")) { - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.verify(message.query); - if (error) - return "query." + error; - } - } - if (message.generatedSql != null && message.hasOwnProperty("generatedSql")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.generatedSql)) - return "generatedSql: string expected"; - } - if (message.result != null && message.hasOwnProperty("result")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.DataResult.verify(message.result); - if (error) - return "result." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Schema.verify(message.schema); + if (error) + return "schema." + error; } - if (message.generatedLookerQuery != null && message.hasOwnProperty("generatedLookerQuery")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.verify(message.generatedLookerQuery); + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (var i = 0; i < message.data.length; ++i) { + var error = $root.google.protobuf.Struct.verify(message.data[i]); if (error) - return "generatedLookerQuery." + error; + return "data." + error; } } - if (message.bigQueryJob != null && message.hasOwnProperty("bigQueryJob")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify(message.bigQueryJob); + if (message.formattedData != null && message.hasOwnProperty("formattedData")) { + if (!Array.isArray(message.formattedData)) + return "formattedData: array expected"; + for (var i = 0; i < message.formattedData.length; ++i) { + var error = $root.google.protobuf.Struct.verify(message.formattedData[i]); if (error) - return "bigQueryJob." + error; + return "formattedData." + error; } } return null; }; /** - * Creates a DataMessage message from a plain object. Also converts values to their respective internal types. + * Creates a DataResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.DataMessage} DataMessage + * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult */ - DataMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataMessage) + DataResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataResult) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.DataMessage(); - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.query: object expected"); - message.query = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.fromObject(object.query); - } - if (object.generatedSql != null) - message.generatedSql = String(object.generatedSql); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.result: object expected"); - message.result = $root.google.cloud.geminidataanalytics.v1beta.DataResult.fromObject(object.result); + var message = new $root.google.cloud.geminidataanalytics.v1beta.DataResult(); + if (object.name != null) + message.name = String(object.name); + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.fromObject(object.schema); } - if (object.generatedLookerQuery != null) { - if (typeof object.generatedLookerQuery !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.generatedLookerQuery: object expected"); - message.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.fromObject(object.generatedLookerQuery); + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.data: array expected"); + message.data = []; + for (var i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.data: object expected"); + message.data[i] = $root.google.protobuf.Struct.fromObject(object.data[i]); + } } - if (object.bigQueryJob != null) { - if (typeof object.bigQueryJob !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataMessage.bigQueryJob: object expected"); - message.bigQueryJob = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.fromObject(object.bigQueryJob); + if (object.formattedData) { + if (!Array.isArray(object.formattedData)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.formattedData: array expected"); + message.formattedData = []; + for (var i = 0; i < object.formattedData.length; ++i) { + if (typeof object.formattedData[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.formattedData: object expected"); + message.formattedData[i] = $root.google.protobuf.Struct.fromObject(object.formattedData[i]); + } } return message; }; /** - * Creates a plain object from a DataMessage message. Also converts values to other types if specified. + * Creates a plain object from a DataResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.DataMessage} message DataMessage + * @param {google.cloud.geminidataanalytics.v1beta.DataResult} message DataResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataMessage.toObject = function toObject(message, options) { + DataResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.google.cloud.geminidataanalytics.v1beta.DataQuery.toObject(message.query, options); - if (options.oneofs) - object.kind = "query"; - } - if (message.generatedSql != null && message.hasOwnProperty("generatedSql")) { - object.generatedSql = message.generatedSql; - if (options.oneofs) - object.kind = "generatedSql"; + if (options.arrays || options.defaults) { + object.data = []; + object.formattedData = []; } - if (message.result != null && message.hasOwnProperty("result")) { - object.result = $root.google.cloud.geminidataanalytics.v1beta.DataResult.toObject(message.result, options); - if (options.oneofs) - object.kind = "result"; + if (options.defaults) { + object.name = ""; + object.schema = null; } - if (message.generatedLookerQuery != null && message.hasOwnProperty("generatedLookerQuery")) { - object.generatedLookerQuery = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.toObject(message.generatedLookerQuery, options); - if (options.oneofs) - object.kind = "generatedLookerQuery"; + if (message.data && message.data.length) { + object.data = []; + for (var j = 0; j < message.data.length; ++j) + object.data[j] = $root.google.protobuf.Struct.toObject(message.data[j], options); } - if (message.bigQueryJob != null && message.hasOwnProperty("bigQueryJob")) { - object.bigQueryJob = $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob.toObject(message.bigQueryJob, options); - if (options.oneofs) - object.kind = "bigQueryJob"; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.toObject(message.schema, options); + if (message.formattedData && message.formattedData.length) { + object.formattedData = []; + for (var j = 0; j < message.formattedData.length; ++j) + object.formattedData[j] = $root.google.protobuf.Struct.toObject(message.formattedData[j], options); } return object; }; /** - * Converts this DataMessage to JSON. + * Converts this DataResult to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @instance * @returns {Object.} JSON object */ - DataMessage.prototype.toJSON = function toJSON() { + DataResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataMessage + * Gets the default type url for DataResult * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.DataMessage + * @memberof google.cloud.geminidataanalytics.v1beta.DataResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DataResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataMessage"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataResult"; }; - return DataMessage; + return DataResult; })(); - v1beta.DataQuery = (function() { + v1beta.BigQueryJob = (function() { /** - * Properties of a DataQuery. + * Properties of a BigQueryJob. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IDataQuery - * @property {google.cloud.geminidataanalytics.v1beta.ILookerQuery|null} [looker] DataQuery looker - * @property {string|null} [question] DataQuery question - * @property {string|null} [name] DataQuery name - * @property {Array.|null} [datasources] DataQuery datasources + * @interface IBigQueryJob + * @property {string|null} [projectId] BigQueryJob projectId + * @property {string|null} [jobId] BigQueryJob jobId + * @property {string|null} [location] BigQueryJob location + * @property {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null} [destinationTable] BigQueryJob destinationTable + * @property {google.cloud.geminidataanalytics.v1beta.ISchema|null} [schema] BigQueryJob schema */ /** - * Constructs a new DataQuery. + * Constructs a new BigQueryJob. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a DataQuery. - * @implements IDataQuery + * @classdesc Represents a BigQueryJob. + * @implements IBigQueryJob * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob=} [properties] Properties to set */ - function DataQuery(properties) { - this.datasources = []; + function BigQueryJob(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49204,136 +50629,133 @@ } /** - * DataQuery looker. - * @member {google.cloud.geminidataanalytics.v1beta.ILookerQuery|null|undefined} looker - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * BigQueryJob projectId. + * @member {string} projectId + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @instance */ - DataQuery.prototype.looker = null; + BigQueryJob.prototype.projectId = ""; /** - * DataQuery question. - * @member {string} question - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * BigQueryJob jobId. + * @member {string} jobId + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @instance */ - DataQuery.prototype.question = ""; + BigQueryJob.prototype.jobId = ""; /** - * DataQuery name. - * @member {string} name - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * BigQueryJob location. + * @member {string} location + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @instance */ - DataQuery.prototype.name = ""; + BigQueryJob.prototype.location = ""; /** - * DataQuery datasources. - * @member {Array.} datasources - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * BigQueryJob destinationTable. + * @member {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null|undefined} destinationTable + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @instance */ - DataQuery.prototype.datasources = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + BigQueryJob.prototype.destinationTable = null; /** - * DataQuery queryType. - * @member {"looker"|undefined} queryType - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * BigQueryJob schema. + * @member {google.cloud.geminidataanalytics.v1beta.ISchema|null|undefined} schema + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @instance */ - Object.defineProperty(DataQuery.prototype, "queryType", { - get: $util.oneOfGetter($oneOfFields = ["looker"]), - set: $util.oneOfSetter($oneOfFields) - }); + BigQueryJob.prototype.schema = null; /** - * Creates a new DataQuery instance using the specified properties. + * Creates a new BigQueryJob instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery instance + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob instance */ - DataQuery.create = function create(properties) { - return new DataQuery(properties); + BigQueryJob.create = function create(properties) { + return new BigQueryJob(properties); }; /** - * Encodes the specified DataQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataQuery.verify|verify} messages. + * Encodes the specified BigQueryJob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery} message DataQuery message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob} message BigQueryJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataQuery.encode = function encode(message, writer) { + BigQueryJob.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.question != null && Object.hasOwnProperty.call(message, "question")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); - if (message.datasources != null && message.datasources.length) - for (var i = 0; i < message.datasources.length; ++i) - $root.google.cloud.geminidataanalytics.v1beta.Datasource.encode(message.datasources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.looker != null && Object.hasOwnProperty.call(message, "looker")) - $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.encode(message.looker, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); + if (message.destinationTable != null && Object.hasOwnProperty.call(message, "destinationTable")) + $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.encode(message.destinationTable, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.location); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + $root.google.cloud.geminidataanalytics.v1beta.Schema.encode(message.schema, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified DataQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataQuery.verify|verify} messages. + * Encodes the specified BigQueryJob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataQuery} message DataQuery message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob} message BigQueryJob message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataQuery.encodeDelimited = function encodeDelimited(message, writer) { + BigQueryJob.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataQuery message from the specified reader or buffer. + * Decodes a BigQueryJob message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataQuery.decode = function decode(reader, length, error) { + BigQueryJob.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataQuery(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 4: { - message.looker = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.decode(reader, reader.uint32()); + case 1: { + message.projectId = reader.string(); break; } - case 1: { - message.question = reader.string(); + case 2: { + message.jobId = reader.string(); + break; + } + case 5: { + message.location = reader.string(); break; } case 3: { - message.name = reader.string(); + message.destinationTable = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.decode(reader, reader.uint32()); break; } - case 2: { - if (!(message.datasources && message.datasources.length)) - message.datasources = []; - message.datasources.push($root.google.cloud.geminidataanalytics.v1beta.Datasource.decode(reader, reader.uint32())); + case 7: { + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.decode(reader, reader.uint32()); break; } default: @@ -49345,179 +50767,166 @@ }; /** - * Decodes a DataQuery message from the specified reader or buffer, length delimited. + * Decodes a BigQueryJob message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataQuery.decodeDelimited = function decodeDelimited(reader) { + BigQueryJob.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataQuery message. + * Verifies a BigQueryJob message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataQuery.verify = function verify(message) { + BigQueryJob.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.looker != null && message.hasOwnProperty("looker")) { - properties.queryType = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.verify(message.looker); - if (error) - return "looker." + error; - } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.destinationTable != null && message.hasOwnProperty("destinationTable")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.verify(message.destinationTable); + if (error) + return "destinationTable." + error; } - if (message.question != null && message.hasOwnProperty("question")) - if (!$util.isString(message.question)) - return "question: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.datasources != null && message.hasOwnProperty("datasources")) { - if (!Array.isArray(message.datasources)) - return "datasources: array expected"; - for (var i = 0; i < message.datasources.length; ++i) { - var error = $root.google.cloud.geminidataanalytics.v1beta.Datasource.verify(message.datasources[i]); - if (error) - return "datasources." + error; - } + if (message.schema != null && message.hasOwnProperty("schema")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Schema.verify(message.schema); + if (error) + return "schema." + error; } return null; }; /** - * Creates a DataQuery message from a plain object. Also converts values to their respective internal types. + * Creates a BigQueryJob message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.DataQuery} DataQuery + * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob */ - DataQuery.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataQuery) + BigQueryJob.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.DataQuery(); - if (object.looker != null) { - if (typeof object.looker !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataQuery.looker: object expected"); - message.looker = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.fromObject(object.looker); + var message = new $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.location != null) + message.location = String(object.location); + if (object.destinationTable != null) { + if (typeof object.destinationTable !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.BigQueryJob.destinationTable: object expected"); + message.destinationTable = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.fromObject(object.destinationTable); } - if (object.question != null) - message.question = String(object.question); - if (object.name != null) - message.name = String(object.name); - if (object.datasources) { - if (!Array.isArray(object.datasources)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataQuery.datasources: array expected"); - message.datasources = []; - for (var i = 0; i < object.datasources.length; ++i) { - if (typeof object.datasources[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataQuery.datasources: object expected"); - message.datasources[i] = $root.google.cloud.geminidataanalytics.v1beta.Datasource.fromObject(object.datasources[i]); - } + if (object.schema != null) { + if (typeof object.schema !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.BigQueryJob.schema: object expected"); + message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.fromObject(object.schema); } return message; }; /** - * Creates a plain object from a DataQuery message. Also converts values to other types if specified. + * Creates a plain object from a BigQueryJob message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @static - * @param {google.cloud.geminidataanalytics.v1beta.DataQuery} message DataQuery + * @param {google.cloud.geminidataanalytics.v1beta.BigQueryJob} message BigQueryJob * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataQuery.toObject = function toObject(message, options) { + BigQueryJob.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.datasources = []; if (options.defaults) { - object.question = ""; - object.name = ""; - } - if (message.question != null && message.hasOwnProperty("question")) - object.question = message.question; - if (message.datasources && message.datasources.length) { - object.datasources = []; - for (var j = 0; j < message.datasources.length; ++j) - object.datasources[j] = $root.google.cloud.geminidataanalytics.v1beta.Datasource.toObject(message.datasources[j], options); - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.looker != null && message.hasOwnProperty("looker")) { - object.looker = $root.google.cloud.geminidataanalytics.v1beta.LookerQuery.toObject(message.looker, options); - if (options.oneofs) - object.queryType = "looker"; + object.projectId = ""; + object.jobId = ""; + object.destinationTable = null; + object.location = ""; + object.schema = null; } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.destinationTable != null && message.hasOwnProperty("destinationTable")) + object.destinationTable = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.toObject(message.destinationTable, options); + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.toObject(message.schema, options); return object; }; /** - * Converts this DataQuery to JSON. + * Converts this BigQueryJob to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @instance * @returns {Object.} JSON object */ - DataQuery.prototype.toJSON = function toJSON() { + BigQueryJob.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataQuery + * Gets the default type url for BigQueryJob * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.DataQuery + * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BigQueryJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataQuery"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.BigQueryJob"; }; - return DataQuery; + return BigQueryJob; })(); - v1beta.DataResult = (function() { + v1beta.AnalysisMessage = (function() { /** - * Properties of a DataResult. + * Properties of an AnalysisMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IDataResult - * @property {string|null} [name] DataResult name - * @property {google.cloud.geminidataanalytics.v1beta.ISchema|null} [schema] DataResult schema - * @property {Array.|null} [data] DataResult data + * @interface IAnalysisMessage + * @property {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery|null} [query] AnalysisMessage query + * @property {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent|null} [progressEvent] AnalysisMessage progressEvent */ /** - * Constructs a new DataResult. + * Constructs a new AnalysisMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a DataResult. - * @implements IDataResult + * @classdesc Represents an AnalysisMessage. + * @implements IAnalysisMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IDataResult=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage=} [properties] Properties to set */ - function DataResult(properties) { - this.data = []; + function AnalysisMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49525,108 +50934,105 @@ } /** - * DataResult name. - * @member {string} name - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * AnalysisMessage query. + * @member {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @instance */ - DataResult.prototype.name = ""; + AnalysisMessage.prototype.query = null; /** - * DataResult schema. - * @member {google.cloud.geminidataanalytics.v1beta.ISchema|null|undefined} schema - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * AnalysisMessage progressEvent. + * @member {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent|null|undefined} progressEvent + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @instance */ - DataResult.prototype.schema = null; + AnalysisMessage.prototype.progressEvent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DataResult data. - * @member {Array.} data - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * AnalysisMessage kind. + * @member {"query"|"progressEvent"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @instance */ - DataResult.prototype.data = $util.emptyArray; + Object.defineProperty(AnalysisMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "progressEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DataResult instance using the specified properties. + * Creates a new AnalysisMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataResult=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult instance + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage instance */ - DataResult.create = function create(properties) { - return new DataResult(properties); + AnalysisMessage.create = function create(properties) { + return new AnalysisMessage(properties); }; /** - * Encodes the specified DataResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataResult.verify|verify} messages. + * Encodes the specified AnalysisMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataResult} message DataResult message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage} message AnalysisMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataResult.encode = function encode(message, writer) { + AnalysisMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.data != null && message.data.length) - for (var i = 0; i < message.data.length; ++i) - $root.google.protobuf.Struct.encode(message.data[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.cloud.geminidataanalytics.v1beta.Schema.encode(message.schema, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.progressEvent != null && Object.hasOwnProperty.call(message, "progressEvent")) + $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.encode(message.progressEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DataResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.DataResult.verify|verify} messages. + * Encodes the specified AnalysisMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IDataResult} message DataResult message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage} message AnalysisMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataResult.encodeDelimited = function encodeDelimited(message, writer) { + AnalysisMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataResult message from the specified reader or buffer. + * Decodes an AnalysisMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataResult.decode = function decode(reader, length, error) { + AnalysisMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.DataResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 3: { - message.name = reader.string(); - break; - } - case 5: { - message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.decode(reader, reader.uint32()); + case 1: { + message.query = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.data && message.data.length)) - message.data = []; - message.data.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); + message.progressEvent = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.decode(reader, reader.uint32()); break; } default: @@ -49638,166 +51044,154 @@ }; /** - * Decodes a DataResult message from the specified reader or buffer, length delimited. + * Decodes an AnalysisMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataResult.decodeDelimited = function decodeDelimited(reader) { + AnalysisMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataResult message. + * Verifies an AnalysisMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataResult.verify = function verify(message) { + AnalysisMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.schema != null && message.hasOwnProperty("schema")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.Schema.verify(message.schema); - if (error) - return "schema." + error; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify(message.query); + if (error) + return "query." + error; + } } - if (message.data != null && message.hasOwnProperty("data")) { - if (!Array.isArray(message.data)) - return "data: array expected"; - for (var i = 0; i < message.data.length; ++i) { - var error = $root.google.protobuf.Struct.verify(message.data[i]); + if (message.progressEvent != null && message.hasOwnProperty("progressEvent")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify(message.progressEvent); if (error) - return "data." + error; + return "progressEvent." + error; } } return null; }; /** - * Creates a DataResult message from a plain object. Also converts values to their respective internal types. + * Creates an AnalysisMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.DataResult} DataResult + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage */ - DataResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.DataResult) + AnalysisMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.DataResult(); - if (object.name != null) - message.name = String(object.name); - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.schema: object expected"); - message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.fromObject(object.schema); + var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.AnalysisMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.fromObject(object.query); } - if (object.data) { - if (!Array.isArray(object.data)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.data: array expected"); - message.data = []; - for (var i = 0; i < object.data.length; ++i) { - if (typeof object.data[i] !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.DataResult.data: object expected"); - message.data[i] = $root.google.protobuf.Struct.fromObject(object.data[i]); - } + if (object.progressEvent != null) { + if (typeof object.progressEvent !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.AnalysisMessage.progressEvent: object expected"); + message.progressEvent = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.fromObject(object.progressEvent); } return message; }; /** - * Creates a plain object from a DataResult message. Also converts values to other types if specified. + * Creates a plain object from an AnalysisMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.DataResult} message DataResult + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} message AnalysisMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataResult.toObject = function toObject(message, options) { + AnalysisMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.data = []; - if (options.defaults) { - object.name = ""; - object.schema = null; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; } - if (message.data && message.data.length) { - object.data = []; - for (var j = 0; j < message.data.length; ++j) - object.data[j] = $root.google.protobuf.Struct.toObject(message.data[j], options); + if (message.progressEvent != null && message.hasOwnProperty("progressEvent")) { + object.progressEvent = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.toObject(message.progressEvent, options); + if (options.oneofs) + object.kind = "progressEvent"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.toObject(message.schema, options); return object; }; /** - * Converts this DataResult to JSON. + * Converts this AnalysisMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @instance * @returns {Object.} JSON object */ - DataResult.prototype.toJSON = function toJSON() { + AnalysisMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataResult + * Gets the default type url for AnalysisMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.DataResult + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalysisMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.DataResult"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisMessage"; }; - return DataResult; + return AnalysisMessage; })(); - v1beta.BigQueryJob = (function() { + v1beta.AnalysisQuery = (function() { /** - * Properties of a BigQueryJob. + * Properties of an AnalysisQuery. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IBigQueryJob - * @property {string|null} [projectId] BigQueryJob projectId - * @property {string|null} [jobId] BigQueryJob jobId - * @property {string|null} [location] BigQueryJob location - * @property {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null} [destinationTable] BigQueryJob destinationTable - * @property {google.cloud.geminidataanalytics.v1beta.ISchema|null} [schema] BigQueryJob schema + * @interface IAnalysisQuery + * @property {string|null} [question] AnalysisQuery question + * @property {Array.|null} [dataResultNames] AnalysisQuery dataResultNames */ /** - * Constructs a new BigQueryJob. + * Constructs a new AnalysisQuery. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a BigQueryJob. - * @implements IBigQueryJob + * @classdesc Represents an AnalysisQuery. + * @implements IAnalysisQuery * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery=} [properties] Properties to set */ - function BigQueryJob(properties) { + function AnalysisQuery(properties) { + this.dataResultNames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49805,133 +51199,94 @@ } /** - * BigQueryJob projectId. - * @member {string} projectId - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob - * @instance - */ - BigQueryJob.prototype.projectId = ""; - - /** - * BigQueryJob jobId. - * @member {string} jobId - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob - * @instance - */ - BigQueryJob.prototype.jobId = ""; - - /** - * BigQueryJob location. - * @member {string} location - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob - * @instance - */ - BigQueryJob.prototype.location = ""; - - /** - * BigQueryJob destinationTable. - * @member {google.cloud.geminidataanalytics.v1beta.IBigQueryTableReference|null|undefined} destinationTable - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * AnalysisQuery question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @instance */ - BigQueryJob.prototype.destinationTable = null; + AnalysisQuery.prototype.question = ""; /** - * BigQueryJob schema. - * @member {google.cloud.geminidataanalytics.v1beta.ISchema|null|undefined} schema - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * AnalysisQuery dataResultNames. + * @member {Array.} dataResultNames + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @instance */ - BigQueryJob.prototype.schema = null; + AnalysisQuery.prototype.dataResultNames = $util.emptyArray; /** - * Creates a new BigQueryJob instance using the specified properties. + * Creates a new AnalysisQuery instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob instance + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery instance */ - BigQueryJob.create = function create(properties) { - return new BigQueryJob(properties); + AnalysisQuery.create = function create(properties) { + return new AnalysisQuery(properties); }; /** - * Encodes the specified BigQueryJob message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify|verify} messages. + * Encodes the specified AnalysisQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob} message BigQueryJob message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery} message AnalysisQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryJob.encode = function encode(message, writer) { + AnalysisQuery.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.jobId); - if (message.destinationTable != null && Object.hasOwnProperty.call(message, "destinationTable")) - $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.encode(message.destinationTable, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.location); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.cloud.geminidataanalytics.v1beta.Schema.encode(message.schema, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.dataResultNames != null && message.dataResultNames.length) + for (var i = 0; i < message.dataResultNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataResultNames[i]); return writer; }; /** - * Encodes the specified BigQueryJob message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.BigQueryJob.verify|verify} messages. + * Encodes the specified AnalysisQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.IBigQueryJob} message BigQueryJob message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery} message AnalysisQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryJob.encodeDelimited = function encodeDelimited(message, writer) { + AnalysisQuery.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryJob message from the specified reader or buffer. + * Decodes an AnalysisQuery message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryJob.decode = function decode(reader, length, error) { + AnalysisQuery.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.projectId = reader.string(); + message.question = reader.string(); break; } case 2: { - message.jobId = reader.string(); - break; - } - case 5: { - message.location = reader.string(); - break; - } - case 3: { - message.destinationTable = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.decode(reader, reader.uint32()); - break; - } - case 7: { - message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.decode(reader, reader.uint32()); + if (!(message.dataResultNames && message.dataResultNames.length)) + message.dataResultNames = []; + message.dataResultNames.push(reader.string()); break; } default: @@ -49943,166 +51298,152 @@ }; /** - * Decodes a BigQueryJob message from the specified reader or buffer, length delimited. + * Decodes an AnalysisQuery message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryJob.decodeDelimited = function decodeDelimited(reader) { + AnalysisQuery.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryJob message. + * Verifies an AnalysisQuery message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryJob.verify = function verify(message) { + AnalysisQuery.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.jobId != null && message.hasOwnProperty("jobId")) - if (!$util.isString(message.jobId)) - return "jobId: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.destinationTable != null && message.hasOwnProperty("destinationTable")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.verify(message.destinationTable); - if (error) - return "destinationTable." + error; - } - if (message.schema != null && message.hasOwnProperty("schema")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.Schema.verify(message.schema); - if (error) - return "schema." + error; + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.dataResultNames != null && message.hasOwnProperty("dataResultNames")) { + if (!Array.isArray(message.dataResultNames)) + return "dataResultNames: array expected"; + for (var i = 0; i < message.dataResultNames.length; ++i) + if (!$util.isString(message.dataResultNames[i])) + return "dataResultNames: string[] expected"; } return null; }; /** - * Creates a BigQueryJob message from a plain object. Also converts values to their respective internal types. + * Creates an AnalysisQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.BigQueryJob} BigQueryJob + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery */ - BigQueryJob.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob) + AnalysisQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.BigQueryJob(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.jobId != null) - message.jobId = String(object.jobId); - if (object.location != null) - message.location = String(object.location); - if (object.destinationTable != null) { - if (typeof object.destinationTable !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.BigQueryJob.destinationTable: object expected"); - message.destinationTable = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.fromObject(object.destinationTable); - } - if (object.schema != null) { - if (typeof object.schema !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.BigQueryJob.schema: object expected"); - message.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.fromObject(object.schema); + var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery(); + if (object.question != null) + message.question = String(object.question); + if (object.dataResultNames) { + if (!Array.isArray(object.dataResultNames)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.AnalysisQuery.dataResultNames: array expected"); + message.dataResultNames = []; + for (var i = 0; i < object.dataResultNames.length; ++i) + message.dataResultNames[i] = String(object.dataResultNames[i]); } return message; }; /** - * Creates a plain object from a BigQueryJob message. Also converts values to other types if specified. + * Creates a plain object from an AnalysisQuery message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.BigQueryJob} message BigQueryJob + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} message AnalysisQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryJob.toObject = function toObject(message, options) { + AnalysisQuery.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.projectId = ""; - object.jobId = ""; - object.destinationTable = null; - object.location = ""; - object.schema = null; + if (options.arrays || options.defaults) + object.dataResultNames = []; + if (options.defaults) + object.question = ""; + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.dataResultNames && message.dataResultNames.length) { + object.dataResultNames = []; + for (var j = 0; j < message.dataResultNames.length; ++j) + object.dataResultNames[j] = message.dataResultNames[j]; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.jobId != null && message.hasOwnProperty("jobId")) - object.jobId = message.jobId; - if (message.destinationTable != null && message.hasOwnProperty("destinationTable")) - object.destinationTable = $root.google.cloud.geminidataanalytics.v1beta.BigQueryTableReference.toObject(message.destinationTable, options); - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = $root.google.cloud.geminidataanalytics.v1beta.Schema.toObject(message.schema, options); return object; }; /** - * Converts this BigQueryJob to JSON. + * Converts this AnalysisQuery to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @instance * @returns {Object.} JSON object */ - BigQueryJob.prototype.toJSON = function toJSON() { + AnalysisQuery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryJob + * Gets the default type url for AnalysisQuery * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.BigQueryJob + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalysisQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.BigQueryJob"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisQuery"; }; - return BigQueryJob; + return AnalysisQuery; })(); - v1beta.AnalysisMessage = (function() { + v1beta.AnalysisEvent = (function() { /** - * Properties of an AnalysisMessage. + * Properties of an AnalysisEvent. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IAnalysisMessage - * @property {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery|null} [query] AnalysisMessage query - * @property {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent|null} [progressEvent] AnalysisMessage progressEvent + * @interface IAnalysisEvent + * @property {string|null} [plannerReasoning] AnalysisEvent plannerReasoning + * @property {string|null} [coderInstruction] AnalysisEvent coderInstruction + * @property {string|null} [code] AnalysisEvent code + * @property {string|null} [executionOutput] AnalysisEvent executionOutput + * @property {string|null} [executionError] AnalysisEvent executionError + * @property {string|null} [resultVegaChartJson] AnalysisEvent resultVegaChartJson + * @property {string|null} [resultNaturalLanguage] AnalysisEvent resultNaturalLanguage + * @property {string|null} [resultCsvData] AnalysisEvent resultCsvData + * @property {string|null} [resultReferenceData] AnalysisEvent resultReferenceData + * @property {string|null} [error] AnalysisEvent error */ /** - * Constructs a new AnalysisMessage. + * Constructs a new AnalysisEvent. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents an AnalysisMessage. - * @implements IAnalysisMessage + * @classdesc Represents an AnalysisEvent. + * @implements IAnalysisEvent * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent=} [properties] Properties to set */ - function AnalysisMessage(properties) { + function AnalysisEvent(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50110,105 +51451,217 @@ } /** - * AnalysisMessage query. - * @member {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery|null|undefined} query - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * AnalysisEvent plannerReasoning. + * @member {string|null|undefined} plannerReasoning + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @instance */ - AnalysisMessage.prototype.query = null; + AnalysisEvent.prototype.plannerReasoning = null; /** - * AnalysisMessage progressEvent. - * @member {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent|null|undefined} progressEvent - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * AnalysisEvent coderInstruction. + * @member {string|null|undefined} coderInstruction + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @instance */ - AnalysisMessage.prototype.progressEvent = null; + AnalysisEvent.prototype.coderInstruction = null; + + /** + * AnalysisEvent code. + * @member {string|null|undefined} code + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.code = null; + + /** + * AnalysisEvent executionOutput. + * @member {string|null|undefined} executionOutput + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.executionOutput = null; + + /** + * AnalysisEvent executionError. + * @member {string|null|undefined} executionError + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.executionError = null; + + /** + * AnalysisEvent resultVegaChartJson. + * @member {string|null|undefined} resultVegaChartJson + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultVegaChartJson = null; + + /** + * AnalysisEvent resultNaturalLanguage. + * @member {string|null|undefined} resultNaturalLanguage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultNaturalLanguage = null; + + /** + * AnalysisEvent resultCsvData. + * @member {string|null|undefined} resultCsvData + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultCsvData = null; + + /** + * AnalysisEvent resultReferenceData. + * @member {string|null|undefined} resultReferenceData + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.resultReferenceData = null; + + /** + * AnalysisEvent error. + * @member {string|null|undefined} error + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @instance + */ + AnalysisEvent.prototype.error = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * AnalysisMessage kind. - * @member {"query"|"progressEvent"|undefined} kind - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * AnalysisEvent kind. + * @member {"plannerReasoning"|"coderInstruction"|"code"|"executionOutput"|"executionError"|"resultVegaChartJson"|"resultNaturalLanguage"|"resultCsvData"|"resultReferenceData"|"error"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @instance */ - Object.defineProperty(AnalysisMessage.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["query", "progressEvent"]), + Object.defineProperty(AnalysisEvent.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["plannerReasoning", "coderInstruction", "code", "executionOutput", "executionError", "resultVegaChartJson", "resultNaturalLanguage", "resultCsvData", "resultReferenceData", "error"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new AnalysisMessage instance using the specified properties. + * Creates a new AnalysisEvent instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage instance + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent instance */ - AnalysisMessage.create = function create(properties) { - return new AnalysisMessage(properties); + AnalysisEvent.create = function create(properties) { + return new AnalysisEvent(properties); }; /** - * Encodes the specified AnalysisMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify|verify} messages. + * Encodes the specified AnalysisEvent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage} message AnalysisMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent} message AnalysisEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalysisMessage.encode = function encode(message, writer) { + AnalysisEvent.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.progressEvent != null && Object.hasOwnProperty.call(message, "progressEvent")) - $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.encode(message.progressEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.plannerReasoning != null && Object.hasOwnProperty.call(message, "plannerReasoning")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.plannerReasoning); + if (message.coderInstruction != null && Object.hasOwnProperty.call(message, "coderInstruction")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.coderInstruction); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); + if (message.executionOutput != null && Object.hasOwnProperty.call(message, "executionOutput")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.executionOutput); + if (message.executionError != null && Object.hasOwnProperty.call(message, "executionError")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.executionError); + if (message.resultVegaChartJson != null && Object.hasOwnProperty.call(message, "resultVegaChartJson")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.resultVegaChartJson); + if (message.resultNaturalLanguage != null && Object.hasOwnProperty.call(message, "resultNaturalLanguage")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resultNaturalLanguage); + if (message.resultCsvData != null && Object.hasOwnProperty.call(message, "resultCsvData")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.resultCsvData); + if (message.resultReferenceData != null && Object.hasOwnProperty.call(message, "resultReferenceData")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.resultReferenceData); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.error); return writer; }; /** - * Encodes the specified AnalysisMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisMessage.verify|verify} messages. + * Encodes the specified AnalysisEvent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisMessage} message AnalysisMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent} message AnalysisEvent message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalysisMessage.encodeDelimited = function encodeDelimited(message, writer) { + AnalysisEvent.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalysisMessage message from the specified reader or buffer. + * Decodes an AnalysisEvent message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalysisMessage.decode = function decode(reader, length, error) { + AnalysisEvent.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.query = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.decode(reader, reader.uint32()); + case 2: { + message.plannerReasoning = reader.string(); break; } - case 2: { - message.progressEvent = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.decode(reader, reader.uint32()); + case 3: { + message.coderInstruction = reader.string(); + break; + } + case 4: { + message.code = reader.string(); + break; + } + case 5: { + message.executionOutput = reader.string(); + break; + } + case 6: { + message.executionError = reader.string(); + break; + } + case 7: { + message.resultVegaChartJson = reader.string(); + break; + } + case 8: { + message.resultNaturalLanguage = reader.string(); + break; + } + case 9: { + message.resultCsvData = reader.string(); + break; + } + case 10: { + message.resultReferenceData = reader.string(); + break; + } + case 11: { + message.error = reader.string(); break; } default: @@ -50220,154 +51673,253 @@ }; /** - * Decodes an AnalysisMessage message from the specified reader or buffer, length delimited. + * Decodes an AnalysisEvent message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalysisMessage.decodeDelimited = function decodeDelimited(reader) { + AnalysisEvent.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalysisMessage message. + * Verifies an AnalysisEvent message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalysisMessage.verify = function verify(message) { + AnalysisEvent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.query != null && message.hasOwnProperty("query")) { + if (message.plannerReasoning != null && message.hasOwnProperty("plannerReasoning")) { properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify(message.query); - if (error) - return "query." + error; - } + if (!$util.isString(message.plannerReasoning)) + return "plannerReasoning: string expected"; } - if (message.progressEvent != null && message.hasOwnProperty("progressEvent")) { + if (message.coderInstruction != null && message.hasOwnProperty("coderInstruction")) { if (properties.kind === 1) return "kind: multiple values"; properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify(message.progressEvent); - if (error) - return "progressEvent." + error; - } + if (!$util.isString(message.coderInstruction)) + return "coderInstruction: string expected"; + } + if (message.code != null && message.hasOwnProperty("code")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.code)) + return "code: string expected"; + } + if (message.executionOutput != null && message.hasOwnProperty("executionOutput")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.executionOutput)) + return "executionOutput: string expected"; + } + if (message.executionError != null && message.hasOwnProperty("executionError")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.executionError)) + return "executionError: string expected"; + } + if (message.resultVegaChartJson != null && message.hasOwnProperty("resultVegaChartJson")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultVegaChartJson)) + return "resultVegaChartJson: string expected"; + } + if (message.resultNaturalLanguage != null && message.hasOwnProperty("resultNaturalLanguage")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultNaturalLanguage)) + return "resultNaturalLanguage: string expected"; + } + if (message.resultCsvData != null && message.hasOwnProperty("resultCsvData")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultCsvData)) + return "resultCsvData: string expected"; + } + if (message.resultReferenceData != null && message.hasOwnProperty("resultReferenceData")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.resultReferenceData)) + return "resultReferenceData: string expected"; + } + if (message.error != null && message.hasOwnProperty("error")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.error)) + return "error: string expected"; } return null; }; /** - * Creates an AnalysisMessage message from a plain object. Also converts values to their respective internal types. + * Creates an AnalysisEvent message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} AnalysisMessage + * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent */ - AnalysisMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage) + AnalysisEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisMessage(); - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.AnalysisMessage.query: object expected"); - message.query = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.fromObject(object.query); - } - if (object.progressEvent != null) { - if (typeof object.progressEvent !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.AnalysisMessage.progressEvent: object expected"); - message.progressEvent = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.fromObject(object.progressEvent); - } + var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent(); + if (object.plannerReasoning != null) + message.plannerReasoning = String(object.plannerReasoning); + if (object.coderInstruction != null) + message.coderInstruction = String(object.coderInstruction); + if (object.code != null) + message.code = String(object.code); + if (object.executionOutput != null) + message.executionOutput = String(object.executionOutput); + if (object.executionError != null) + message.executionError = String(object.executionError); + if (object.resultVegaChartJson != null) + message.resultVegaChartJson = String(object.resultVegaChartJson); + if (object.resultNaturalLanguage != null) + message.resultNaturalLanguage = String(object.resultNaturalLanguage); + if (object.resultCsvData != null) + message.resultCsvData = String(object.resultCsvData); + if (object.resultReferenceData != null) + message.resultReferenceData = String(object.resultReferenceData); + if (object.error != null) + message.error = String(object.error); return message; }; /** - * Creates a plain object from an AnalysisMessage message. Also converts values to other types if specified. + * Creates a plain object from an AnalysisEvent message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @static - * @param {google.cloud.geminidataanalytics.v1beta.AnalysisMessage} message AnalysisMessage + * @param {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} message AnalysisEvent * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalysisMessage.toObject = function toObject(message, options) { + AnalysisEvent.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery.toObject(message.query, options); + if (message.plannerReasoning != null && message.hasOwnProperty("plannerReasoning")) { + object.plannerReasoning = message.plannerReasoning; if (options.oneofs) - object.kind = "query"; + object.kind = "plannerReasoning"; } - if (message.progressEvent != null && message.hasOwnProperty("progressEvent")) { - object.progressEvent = $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent.toObject(message.progressEvent, options); + if (message.coderInstruction != null && message.hasOwnProperty("coderInstruction")) { + object.coderInstruction = message.coderInstruction; if (options.oneofs) - object.kind = "progressEvent"; + object.kind = "coderInstruction"; + } + if (message.code != null && message.hasOwnProperty("code")) { + object.code = message.code; + if (options.oneofs) + object.kind = "code"; + } + if (message.executionOutput != null && message.hasOwnProperty("executionOutput")) { + object.executionOutput = message.executionOutput; + if (options.oneofs) + object.kind = "executionOutput"; + } + if (message.executionError != null && message.hasOwnProperty("executionError")) { + object.executionError = message.executionError; + if (options.oneofs) + object.kind = "executionError"; + } + if (message.resultVegaChartJson != null && message.hasOwnProperty("resultVegaChartJson")) { + object.resultVegaChartJson = message.resultVegaChartJson; + if (options.oneofs) + object.kind = "resultVegaChartJson"; + } + if (message.resultNaturalLanguage != null && message.hasOwnProperty("resultNaturalLanguage")) { + object.resultNaturalLanguage = message.resultNaturalLanguage; + if (options.oneofs) + object.kind = "resultNaturalLanguage"; + } + if (message.resultCsvData != null && message.hasOwnProperty("resultCsvData")) { + object.resultCsvData = message.resultCsvData; + if (options.oneofs) + object.kind = "resultCsvData"; + } + if (message.resultReferenceData != null && message.hasOwnProperty("resultReferenceData")) { + object.resultReferenceData = message.resultReferenceData; + if (options.oneofs) + object.kind = "resultReferenceData"; + } + if (message.error != null && message.hasOwnProperty("error")) { + object.error = message.error; + if (options.oneofs) + object.kind = "error"; } return object; }; /** - * Converts this AnalysisMessage to JSON. + * Converts this AnalysisEvent to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @instance * @returns {Object.} JSON object */ - AnalysisMessage.prototype.toJSON = function toJSON() { + AnalysisEvent.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalysisMessage + * Gets the default type url for AnalysisEvent * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisMessage + * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalysisMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AnalysisEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisMessage"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisEvent"; }; - return AnalysisMessage; + return AnalysisEvent; })(); - v1beta.AnalysisQuery = (function() { + v1beta.ChartMessage = (function() { /** - * Properties of an AnalysisQuery. + * Properties of a ChartMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IAnalysisQuery - * @property {string|null} [question] AnalysisQuery question - * @property {Array.|null} [dataResultNames] AnalysisQuery dataResultNames + * @interface IChartMessage + * @property {google.cloud.geminidataanalytics.v1beta.IChartQuery|null} [query] ChartMessage query + * @property {google.cloud.geminidataanalytics.v1beta.IChartResult|null} [result] ChartMessage result */ /** - * Constructs a new AnalysisQuery. + * Constructs a new ChartMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents an AnalysisQuery. - * @implements IAnalysisQuery + * @classdesc Represents a ChartMessage. + * @implements IChartMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage=} [properties] Properties to set */ - function AnalysisQuery(properties) { - this.dataResultNames = []; + function ChartMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50375,94 +51927,105 @@ } /** - * AnalysisQuery question. - * @member {string} question - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * ChartMessage query. + * @member {google.cloud.geminidataanalytics.v1beta.IChartQuery|null|undefined} query + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @instance */ - AnalysisQuery.prototype.question = ""; + ChartMessage.prototype.query = null; /** - * AnalysisQuery dataResultNames. - * @member {Array.} dataResultNames - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * ChartMessage result. + * @member {google.cloud.geminidataanalytics.v1beta.IChartResult|null|undefined} result + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @instance */ - AnalysisQuery.prototype.dataResultNames = $util.emptyArray; + ChartMessage.prototype.result = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new AnalysisQuery instance using the specified properties. + * ChartMessage kind. + * @member {"query"|"result"|undefined} kind + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @instance + */ + Object.defineProperty(ChartMessage.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["query", "result"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChartMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery instance + * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage instance */ - AnalysisQuery.create = function create(properties) { - return new AnalysisQuery(properties); + ChartMessage.create = function create(properties) { + return new ChartMessage(properties); }; /** - * Encodes the specified AnalysisQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify|verify} messages. + * Encodes the specified ChartMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery} message AnalysisQuery message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage} message ChartMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalysisQuery.encode = function encode(message, writer) { + ChartMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.question != null && Object.hasOwnProperty.call(message, "question")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); - if (message.dataResultNames != null && message.dataResultNames.length) - for (var i = 0; i < message.dataResultNames.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataResultNames[i]); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.geminidataanalytics.v1beta.ChartResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AnalysisQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisQuery.verify|verify} messages. + * Encodes the specified ChartMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisQuery} message AnalysisQuery message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage} message ChartMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalysisQuery.encodeDelimited = function encodeDelimited(message, writer) { + ChartMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalysisQuery message from the specified reader or buffer. + * Decodes a ChartMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery + * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalysisQuery.decode = function decode(reader, length, error) { + ChartMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.question = reader.string(); + message.query = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.dataResultNames && message.dataResultNames.length)) - message.dataResultNames = []; - message.dataResultNames.push(reader.string()); + message.result = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.decode(reader, reader.uint32()); break; } default: @@ -50474,370 +52037,245 @@ }; /** - * Decodes an AnalysisQuery message from the specified reader or buffer, length delimited. + * Decodes a ChartMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery + * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalysisQuery.decodeDelimited = function decodeDelimited(reader) { + ChartMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnalysisQuery message. + * Verifies a ChartMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnalysisQuery.verify = function verify(message) { + ChartMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.question != null && message.hasOwnProperty("question")) - if (!$util.isString(message.question)) - return "question: string expected"; - if (message.dataResultNames != null && message.hasOwnProperty("dataResultNames")) { - if (!Array.isArray(message.dataResultNames)) - return "dataResultNames: array expected"; - for (var i = 0; i < message.dataResultNames.length; ++i) - if (!$util.isString(message.dataResultNames[i])) - return "dataResultNames: string[] expected"; + var properties = {}; + if (message.query != null && message.hasOwnProperty("query")) { + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.result != null && message.hasOwnProperty("result")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.verify(message.result); + if (error) + return "result." + error; + } } return null; }; /** - * Creates an AnalysisQuery message from a plain object. Also converts values to their respective internal types. + * Creates a ChartMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} AnalysisQuery + * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage */ - AnalysisQuery.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery) + ChartMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisQuery(); - if (object.question != null) - message.question = String(object.question); - if (object.dataResultNames) { - if (!Array.isArray(object.dataResultNames)) - throw TypeError(".google.cloud.geminidataanalytics.v1beta.AnalysisQuery.dataResultNames: array expected"); - message.dataResultNames = []; - for (var i = 0; i < object.dataResultNames.length; ++i) - message.dataResultNames[i] = String(object.dataResultNames[i]); + var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartMessage(); + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartMessage.query: object expected"); + message.query = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.fromObject(object.query); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartMessage.result: object expected"); + message.result = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.fromObject(object.result); } return message; }; /** - * Creates a plain object from an AnalysisQuery message. Also converts values to other types if specified. + * Creates a plain object from a ChartMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.AnalysisQuery} message AnalysisQuery + * @param {google.cloud.geminidataanalytics.v1beta.ChartMessage} message ChartMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalysisQuery.toObject = function toObject(message, options) { + ChartMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.dataResultNames = []; - if (options.defaults) - object.question = ""; - if (message.question != null && message.hasOwnProperty("question")) - object.question = message.question; - if (message.dataResultNames && message.dataResultNames.length) { - object.dataResultNames = []; - for (var j = 0; j < message.dataResultNames.length; ++j) - object.dataResultNames[j] = message.dataResultNames[j]; + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.toObject(message.query, options); + if (options.oneofs) + object.kind = "query"; + } + if (message.result != null && message.hasOwnProperty("result")) { + object.result = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.toObject(message.result, options); + if (options.oneofs) + object.kind = "result"; } return object; }; /** - * Converts this AnalysisQuery to JSON. + * Converts this ChartMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @instance * @returns {Object.} JSON object */ - AnalysisQuery.prototype.toJSON = function toJSON() { + ChartMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalysisQuery + * Gets the default type url for ChartMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalysisQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChartMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisQuery"; - }; - - return AnalysisQuery; - })(); - - v1beta.AnalysisEvent = (function() { - - /** - * Properties of an AnalysisEvent. - * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IAnalysisEvent - * @property {string|null} [plannerReasoning] AnalysisEvent plannerReasoning - * @property {string|null} [coderInstruction] AnalysisEvent coderInstruction - * @property {string|null} [code] AnalysisEvent code - * @property {string|null} [executionOutput] AnalysisEvent executionOutput - * @property {string|null} [executionError] AnalysisEvent executionError - * @property {string|null} [resultVegaChartJson] AnalysisEvent resultVegaChartJson - * @property {string|null} [resultNaturalLanguage] AnalysisEvent resultNaturalLanguage - * @property {string|null} [resultCsvData] AnalysisEvent resultCsvData - * @property {string|null} [resultReferenceData] AnalysisEvent resultReferenceData - * @property {string|null} [error] AnalysisEvent error - */ - - /** - * Constructs a new AnalysisEvent. - * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents an AnalysisEvent. - * @implements IAnalysisEvent - * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent=} [properties] Properties to set - */ - function AnalysisEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AnalysisEvent plannerReasoning. - * @member {string|null|undefined} plannerReasoning - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @instance - */ - AnalysisEvent.prototype.plannerReasoning = null; - - /** - * AnalysisEvent coderInstruction. - * @member {string|null|undefined} coderInstruction - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @instance - */ - AnalysisEvent.prototype.coderInstruction = null; - - /** - * AnalysisEvent code. - * @member {string|null|undefined} code - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @instance - */ - AnalysisEvent.prototype.code = null; - - /** - * AnalysisEvent executionOutput. - * @member {string|null|undefined} executionOutput - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @instance - */ - AnalysisEvent.prototype.executionOutput = null; - - /** - * AnalysisEvent executionError. - * @member {string|null|undefined} executionError - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @instance - */ - AnalysisEvent.prototype.executionError = null; - - /** - * AnalysisEvent resultVegaChartJson. - * @member {string|null|undefined} resultVegaChartJson - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @instance - */ - AnalysisEvent.prototype.resultVegaChartJson = null; - - /** - * AnalysisEvent resultNaturalLanguage. - * @member {string|null|undefined} resultNaturalLanguage - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @instance - */ - AnalysisEvent.prototype.resultNaturalLanguage = null; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartMessage"; + }; + + return ChartMessage; + })(); + + v1beta.ChartQuery = (function() { /** - * AnalysisEvent resultCsvData. - * @member {string|null|undefined} resultCsvData - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @instance + * Properties of a ChartQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @interface IChartQuery + * @property {string|null} [instructions] ChartQuery instructions + * @property {string|null} [dataResultName] ChartQuery dataResultName */ - AnalysisEvent.prototype.resultCsvData = null; /** - * AnalysisEvent resultReferenceData. - * @member {string|null|undefined} resultReferenceData - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @instance + * Constructs a new ChartQuery. + * @memberof google.cloud.geminidataanalytics.v1beta + * @classdesc Represents a ChartQuery. + * @implements IChartQuery + * @constructor + * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery=} [properties] Properties to set */ - AnalysisEvent.prototype.resultReferenceData = null; + function ChartQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * AnalysisEvent error. - * @member {string|null|undefined} error - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * ChartQuery instructions. + * @member {string} instructions + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery * @instance */ - AnalysisEvent.prototype.error = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ChartQuery.prototype.instructions = ""; /** - * AnalysisEvent kind. - * @member {"plannerReasoning"|"coderInstruction"|"code"|"executionOutput"|"executionError"|"resultVegaChartJson"|"resultNaturalLanguage"|"resultCsvData"|"resultReferenceData"|"error"|undefined} kind - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * ChartQuery dataResultName. + * @member {string} dataResultName + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery * @instance */ - Object.defineProperty(AnalysisEvent.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["plannerReasoning", "coderInstruction", "code", "executionOutput", "executionError", "resultVegaChartJson", "resultNaturalLanguage", "resultCsvData", "resultReferenceData", "error"]), - set: $util.oneOfSetter($oneOfFields) - }); + ChartQuery.prototype.dataResultName = ""; /** - * Creates a new AnalysisEvent instance using the specified properties. + * Creates a new ChartQuery instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent instance + * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery instance */ - AnalysisEvent.create = function create(properties) { - return new AnalysisEvent(properties); + ChartQuery.create = function create(properties) { + return new ChartQuery(properties); }; /** - * Encodes the specified AnalysisEvent message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify|verify} messages. + * Encodes the specified ChartQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartQuery.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent} message AnalysisEvent message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery} message ChartQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalysisEvent.encode = function encode(message, writer) { + ChartQuery.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.plannerReasoning != null && Object.hasOwnProperty.call(message, "plannerReasoning")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.plannerReasoning); - if (message.coderInstruction != null && Object.hasOwnProperty.call(message, "coderInstruction")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.coderInstruction); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.code); - if (message.executionOutput != null && Object.hasOwnProperty.call(message, "executionOutput")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.executionOutput); - if (message.executionError != null && Object.hasOwnProperty.call(message, "executionError")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.executionError); - if (message.resultVegaChartJson != null && Object.hasOwnProperty.call(message, "resultVegaChartJson")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.resultVegaChartJson); - if (message.resultNaturalLanguage != null && Object.hasOwnProperty.call(message, "resultNaturalLanguage")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.resultNaturalLanguage); - if (message.resultCsvData != null && Object.hasOwnProperty.call(message, "resultCsvData")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.resultCsvData); - if (message.resultReferenceData != null && Object.hasOwnProperty.call(message, "resultReferenceData")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.resultReferenceData); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.error); + if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.instructions); + if (message.dataResultName != null && Object.hasOwnProperty.call(message, "dataResultName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataResultName); return writer; }; /** - * Encodes the specified AnalysisEvent message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.AnalysisEvent.verify|verify} messages. + * Encodes the specified ChartQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartQuery.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.IAnalysisEvent} message AnalysisEvent message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery} message ChartQuery message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnalysisEvent.encodeDelimited = function encodeDelimited(message, writer) { + ChartQuery.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnalysisEvent message from the specified reader or buffer. + * Decodes a ChartQuery message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent + * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnalysisEvent.decode = function decode(reader, length, error) { + ChartQuery.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartQuery(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 2: { - message.plannerReasoning = reader.string(); - break; - } - case 3: { - message.coderInstruction = reader.string(); - break; - } - case 4: { - message.code = reader.string(); - break; - } - case 5: { - message.executionOutput = reader.string(); - break; - } - case 6: { - message.executionError = reader.string(); - break; - } - case 7: { - message.resultVegaChartJson = reader.string(); - break; - } - case 8: { - message.resultNaturalLanguage = reader.string(); - break; - } - case 9: { - message.resultCsvData = reader.string(); - break; - } - case 10: { - message.resultReferenceData = reader.string(); + case 1: { + message.instructions = reader.string(); break; } - case 11: { - message.error = reader.string(); + case 2: { + message.dataResultName = reader.string(); break; } default: @@ -50845,257 +52283,136 @@ break; } } - return message; - }; - - /** - * Decodes an AnalysisEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnalysisEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AnalysisEvent message. - * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnalysisEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.plannerReasoning != null && message.hasOwnProperty("plannerReasoning")) { - properties.kind = 1; - if (!$util.isString(message.plannerReasoning)) - return "plannerReasoning: string expected"; - } - if (message.coderInstruction != null && message.hasOwnProperty("coderInstruction")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.coderInstruction)) - return "coderInstruction: string expected"; - } - if (message.code != null && message.hasOwnProperty("code")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.code)) - return "code: string expected"; - } - if (message.executionOutput != null && message.hasOwnProperty("executionOutput")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.executionOutput)) - return "executionOutput: string expected"; - } - if (message.executionError != null && message.hasOwnProperty("executionError")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.executionError)) - return "executionError: string expected"; - } - if (message.resultVegaChartJson != null && message.hasOwnProperty("resultVegaChartJson")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.resultVegaChartJson)) - return "resultVegaChartJson: string expected"; - } - if (message.resultNaturalLanguage != null && message.hasOwnProperty("resultNaturalLanguage")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.resultNaturalLanguage)) - return "resultNaturalLanguage: string expected"; - } - if (message.resultCsvData != null && message.hasOwnProperty("resultCsvData")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.resultCsvData)) - return "resultCsvData: string expected"; - } - if (message.resultReferenceData != null && message.hasOwnProperty("resultReferenceData")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.resultReferenceData)) - return "resultReferenceData: string expected"; - } - if (message.error != null && message.hasOwnProperty("error")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.error)) - return "error: string expected"; - } + return message; + }; + + /** + * Decodes a ChartQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChartQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChartQuery message. + * @function verify + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChartQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.instructions != null && message.hasOwnProperty("instructions")) + if (!$util.isString(message.instructions)) + return "instructions: string expected"; + if (message.dataResultName != null && message.hasOwnProperty("dataResultName")) + if (!$util.isString(message.dataResultName)) + return "dataResultName: string expected"; return null; }; /** - * Creates an AnalysisEvent message from a plain object. Also converts values to their respective internal types. + * Creates a ChartQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} AnalysisEvent + * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery */ - AnalysisEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent) + ChartQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartQuery) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.AnalysisEvent(); - if (object.plannerReasoning != null) - message.plannerReasoning = String(object.plannerReasoning); - if (object.coderInstruction != null) - message.coderInstruction = String(object.coderInstruction); - if (object.code != null) - message.code = String(object.code); - if (object.executionOutput != null) - message.executionOutput = String(object.executionOutput); - if (object.executionError != null) - message.executionError = String(object.executionError); - if (object.resultVegaChartJson != null) - message.resultVegaChartJson = String(object.resultVegaChartJson); - if (object.resultNaturalLanguage != null) - message.resultNaturalLanguage = String(object.resultNaturalLanguage); - if (object.resultCsvData != null) - message.resultCsvData = String(object.resultCsvData); - if (object.resultReferenceData != null) - message.resultReferenceData = String(object.resultReferenceData); - if (object.error != null) - message.error = String(object.error); + var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartQuery(); + if (object.instructions != null) + message.instructions = String(object.instructions); + if (object.dataResultName != null) + message.dataResultName = String(object.dataResultName); return message; }; /** - * Creates a plain object from an AnalysisEvent message. Also converts values to other types if specified. + * Creates a plain object from a ChartQuery message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery * @static - * @param {google.cloud.geminidataanalytics.v1beta.AnalysisEvent} message AnalysisEvent + * @param {google.cloud.geminidataanalytics.v1beta.ChartQuery} message ChartQuery * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnalysisEvent.toObject = function toObject(message, options) { + ChartQuery.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.plannerReasoning != null && message.hasOwnProperty("plannerReasoning")) { - object.plannerReasoning = message.plannerReasoning; - if (options.oneofs) - object.kind = "plannerReasoning"; - } - if (message.coderInstruction != null && message.hasOwnProperty("coderInstruction")) { - object.coderInstruction = message.coderInstruction; - if (options.oneofs) - object.kind = "coderInstruction"; - } - if (message.code != null && message.hasOwnProperty("code")) { - object.code = message.code; - if (options.oneofs) - object.kind = "code"; - } - if (message.executionOutput != null && message.hasOwnProperty("executionOutput")) { - object.executionOutput = message.executionOutput; - if (options.oneofs) - object.kind = "executionOutput"; - } - if (message.executionError != null && message.hasOwnProperty("executionError")) { - object.executionError = message.executionError; - if (options.oneofs) - object.kind = "executionError"; - } - if (message.resultVegaChartJson != null && message.hasOwnProperty("resultVegaChartJson")) { - object.resultVegaChartJson = message.resultVegaChartJson; - if (options.oneofs) - object.kind = "resultVegaChartJson"; - } - if (message.resultNaturalLanguage != null && message.hasOwnProperty("resultNaturalLanguage")) { - object.resultNaturalLanguage = message.resultNaturalLanguage; - if (options.oneofs) - object.kind = "resultNaturalLanguage"; - } - if (message.resultCsvData != null && message.hasOwnProperty("resultCsvData")) { - object.resultCsvData = message.resultCsvData; - if (options.oneofs) - object.kind = "resultCsvData"; - } - if (message.resultReferenceData != null && message.hasOwnProperty("resultReferenceData")) { - object.resultReferenceData = message.resultReferenceData; - if (options.oneofs) - object.kind = "resultReferenceData"; - } - if (message.error != null && message.hasOwnProperty("error")) { - object.error = message.error; - if (options.oneofs) - object.kind = "error"; + if (options.defaults) { + object.instructions = ""; + object.dataResultName = ""; } + if (message.instructions != null && message.hasOwnProperty("instructions")) + object.instructions = message.instructions; + if (message.dataResultName != null && message.hasOwnProperty("dataResultName")) + object.dataResultName = message.dataResultName; return object; }; /** - * Converts this AnalysisEvent to JSON. + * Converts this ChartQuery to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery * @instance * @returns {Object.} JSON object */ - AnalysisEvent.prototype.toJSON = function toJSON() { + ChartQuery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AnalysisEvent + * Gets the default type url for ChartQuery * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.AnalysisEvent + * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AnalysisEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChartQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.AnalysisEvent"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartQuery"; }; - return AnalysisEvent; + return ChartQuery; })(); - v1beta.ChartMessage = (function() { + v1beta.ChartResult = (function() { /** - * Properties of a ChartMessage. + * Properties of a ChartResult. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IChartMessage - * @property {google.cloud.geminidataanalytics.v1beta.IChartQuery|null} [query] ChartMessage query - * @property {google.cloud.geminidataanalytics.v1beta.IChartResult|null} [result] ChartMessage result + * @interface IChartResult + * @property {google.protobuf.IStruct|null} [vegaConfig] ChartResult vegaConfig + * @property {google.cloud.geminidataanalytics.v1beta.IBlob|null} [image] ChartResult image */ /** - * Constructs a new ChartMessage. + * Constructs a new ChartResult. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a ChartMessage. - * @implements IChartMessage + * @classdesc Represents a ChartResult. + * @implements IChartResult * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IChartResult=} [properties] Properties to set */ - function ChartMessage(properties) { + function ChartResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51103,105 +52420,91 @@ } /** - * ChartMessage query. - * @member {google.cloud.geminidataanalytics.v1beta.IChartQuery|null|undefined} query - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage - * @instance - */ - ChartMessage.prototype.query = null; - - /** - * ChartMessage result. - * @member {google.cloud.geminidataanalytics.v1beta.IChartResult|null|undefined} result - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * ChartResult vegaConfig. + * @member {google.protobuf.IStruct|null|undefined} vegaConfig + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @instance */ - ChartMessage.prototype.result = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ChartResult.prototype.vegaConfig = null; /** - * ChartMessage kind. - * @member {"query"|"result"|undefined} kind - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * ChartResult image. + * @member {google.cloud.geminidataanalytics.v1beta.IBlob|null|undefined} image + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @instance */ - Object.defineProperty(ChartMessage.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["query", "result"]), - set: $util.oneOfSetter($oneOfFields) - }); + ChartResult.prototype.image = null; /** - * Creates a new ChartMessage instance using the specified properties. + * Creates a new ChartResult instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage instance + * @param {google.cloud.geminidataanalytics.v1beta.IChartResult=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult instance */ - ChartMessage.create = function create(properties) { - return new ChartMessage(properties); + ChartResult.create = function create(properties) { + return new ChartResult(properties); }; /** - * Encodes the specified ChartMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartMessage.verify|verify} messages. + * Encodes the specified ChartResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartResult.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage} message ChartMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IChartResult} message ChartResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChartMessage.encode = function encode(message, writer) { + ChartResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.encode(message.query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.google.cloud.geminidataanalytics.v1beta.ChartResult.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.vegaConfig != null && Object.hasOwnProperty.call(message, "vegaConfig")) + $root.google.protobuf.Struct.encode(message.vegaConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.image != null && Object.hasOwnProperty.call(message, "image")) + $root.google.cloud.geminidataanalytics.v1beta.Blob.encode(message.image, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ChartMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartMessage.verify|verify} messages. + * Encodes the specified ChartResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChartMessage} message ChartMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IChartResult} message ChartResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChartMessage.encodeDelimited = function encodeDelimited(message, writer) { + ChartResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChartMessage message from the specified reader or buffer. + * Decodes a ChartResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage + * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChartMessage.decode = function decode(reader, length, error) { + ChartResult.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.query = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.decode(reader, reader.uint32()); + case 2: { + message.vegaConfig = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } - case 2: { - message.result = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.decode(reader, reader.uint32()); + case 3: { + message.image = $root.google.cloud.geminidataanalytics.v1beta.Blob.decode(reader, reader.uint32()); break; } default: @@ -51213,153 +52516,141 @@ }; /** - * Decodes a ChartMessage message from the specified reader or buffer, length delimited. + * Decodes a ChartResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage + * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChartMessage.decodeDelimited = function decodeDelimited(reader) { + ChartResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChartMessage message. + * Verifies a ChartResult message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChartMessage.verify = function verify(message) { + ChartResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.query != null && message.hasOwnProperty("query")) { - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.verify(message.query); - if (error) - return "query." + error; - } + if (message.vegaConfig != null && message.hasOwnProperty("vegaConfig")) { + var error = $root.google.protobuf.Struct.verify(message.vegaConfig); + if (error) + return "vegaConfig." + error; } - if (message.result != null && message.hasOwnProperty("result")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.verify(message.result); - if (error) - return "result." + error; - } + if (message.image != null && message.hasOwnProperty("image")) { + var error = $root.google.cloud.geminidataanalytics.v1beta.Blob.verify(message.image); + if (error) + return "image." + error; } return null; }; /** - * Creates a ChartMessage message from a plain object. Also converts values to their respective internal types. + * Creates a ChartResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ChartMessage} ChartMessage + * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult */ - ChartMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartMessage) + ChartResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartResult) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartMessage(); - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartMessage.query: object expected"); - message.query = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.fromObject(object.query); + var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartResult(); + if (object.vegaConfig != null) { + if (typeof object.vegaConfig !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartResult.vegaConfig: object expected"); + message.vegaConfig = $root.google.protobuf.Struct.fromObject(object.vegaConfig); } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartMessage.result: object expected"); - message.result = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.fromObject(object.result); + if (object.image != null) { + if (typeof object.image !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartResult.image: object expected"); + message.image = $root.google.cloud.geminidataanalytics.v1beta.Blob.fromObject(object.image); } return message; }; /** - * Creates a plain object from a ChartMessage message. Also converts values to other types if specified. + * Creates a plain object from a ChartResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @static - * @param {google.cloud.geminidataanalytics.v1beta.ChartMessage} message ChartMessage + * @param {google.cloud.geminidataanalytics.v1beta.ChartResult} message ChartResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChartMessage.toObject = function toObject(message, options) { + ChartResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.google.cloud.geminidataanalytics.v1beta.ChartQuery.toObject(message.query, options); - if (options.oneofs) - object.kind = "query"; - } - if (message.result != null && message.hasOwnProperty("result")) { - object.result = $root.google.cloud.geminidataanalytics.v1beta.ChartResult.toObject(message.result, options); - if (options.oneofs) - object.kind = "result"; + if (options.defaults) { + object.vegaConfig = null; + object.image = null; } + if (message.vegaConfig != null && message.hasOwnProperty("vegaConfig")) + object.vegaConfig = $root.google.protobuf.Struct.toObject(message.vegaConfig, options); + if (message.image != null && message.hasOwnProperty("image")) + object.image = $root.google.cloud.geminidataanalytics.v1beta.Blob.toObject(message.image, options); return object; }; /** - * Converts this ChartMessage to JSON. + * Converts this ChartResult to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @instance * @returns {Object.} JSON object */ - ChartMessage.prototype.toJSON = function toJSON() { + ChartResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChartMessage + * Gets the default type url for ChartResult * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ChartMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChartMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChartResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartMessage"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartResult"; }; - return ChartMessage; + return ChartResult; })(); - v1beta.ChartQuery = (function() { + v1beta.ErrorMessage = (function() { /** - * Properties of a ChartQuery. + * Properties of an ErrorMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IChartQuery - * @property {string|null} [instructions] ChartQuery instructions - * @property {string|null} [dataResultName] ChartQuery dataResultName + * @interface IErrorMessage + * @property {string|null} [text] ErrorMessage text */ /** - * Constructs a new ChartQuery. + * Constructs a new ErrorMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a ChartQuery. - * @implements IChartQuery + * @classdesc Represents an ErrorMessage. + * @implements IErrorMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage=} [properties] Properties to set */ - function ChartQuery(properties) { + function ErrorMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51367,91 +52658,77 @@ } /** - * ChartQuery instructions. - * @member {string} instructions - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery - * @instance - */ - ChartQuery.prototype.instructions = ""; - - /** - * ChartQuery dataResultName. - * @member {string} dataResultName - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * ErrorMessage text. + * @member {string} text + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @instance */ - ChartQuery.prototype.dataResultName = ""; + ErrorMessage.prototype.text = ""; /** - * Creates a new ChartQuery instance using the specified properties. + * Creates a new ErrorMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery instance + * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage instance */ - ChartQuery.create = function create(properties) { - return new ChartQuery(properties); + ErrorMessage.create = function create(properties) { + return new ErrorMessage(properties); }; /** - * Encodes the specified ChartQuery message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartQuery.verify|verify} messages. + * Encodes the specified ErrorMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery} message ChartQuery message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage} message ErrorMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChartQuery.encode = function encode(message, writer) { + ErrorMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.instructions != null && Object.hasOwnProperty.call(message, "instructions")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.instructions); - if (message.dataResultName != null && Object.hasOwnProperty.call(message, "dataResultName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataResultName); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); return writer; }; /** - * Encodes the specified ChartQuery message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartQuery.verify|verify} messages. + * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChartQuery} message ChartQuery message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage} message ErrorMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChartQuery.encodeDelimited = function encodeDelimited(message, writer) { + ErrorMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChartQuery message from the specified reader or buffer. + * Decodes an ErrorMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery + * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChartQuery.decode = function decode(reader, length, error) { + ErrorMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartQuery(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.instructions = reader.string(); - break; - } - case 2: { - message.dataResultName = reader.string(); + message.text = reader.string(); break; } default: @@ -51463,132 +52740,126 @@ }; /** - * Decodes a ChartQuery message from the specified reader or buffer, length delimited. + * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery + * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChartQuery.decodeDelimited = function decodeDelimited(reader) { + ErrorMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChartQuery message. + * Verifies an ErrorMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChartQuery.verify = function verify(message) { + ErrorMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.instructions != null && message.hasOwnProperty("instructions")) - if (!$util.isString(message.instructions)) - return "instructions: string expected"; - if (message.dataResultName != null && message.hasOwnProperty("dataResultName")) - if (!$util.isString(message.dataResultName)) - return "dataResultName: string expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; return null; }; /** - * Creates a ChartQuery message from a plain object. Also converts values to their respective internal types. + * Creates an ErrorMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ChartQuery} ChartQuery + * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage */ - ChartQuery.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartQuery) + ErrorMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartQuery(); - if (object.instructions != null) - message.instructions = String(object.instructions); - if (object.dataResultName != null) - message.dataResultName = String(object.dataResultName); + var message = new $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage(); + if (object.text != null) + message.text = String(object.text); return message; }; /** - * Creates a plain object from a ChartQuery message. Also converts values to other types if specified. + * Creates a plain object from an ErrorMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.ChartQuery} message ChartQuery + * @param {google.cloud.geminidataanalytics.v1beta.ErrorMessage} message ErrorMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChartQuery.toObject = function toObject(message, options) { + ErrorMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.instructions = ""; - object.dataResultName = ""; - } - if (message.instructions != null && message.hasOwnProperty("instructions")) - object.instructions = message.instructions; - if (message.dataResultName != null && message.hasOwnProperty("dataResultName")) - object.dataResultName = message.dataResultName; + if (options.defaults) + object.text = ""; + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; return object; }; /** - * Converts this ChartQuery to JSON. + * Converts this ErrorMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @instance * @returns {Object.} JSON object */ - ChartQuery.prototype.toJSON = function toJSON() { + ErrorMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChartQuery + * Gets the default type url for ErrorMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ChartQuery + * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChartQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ErrorMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartQuery"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ErrorMessage"; }; - return ChartQuery; + return ErrorMessage; })(); - v1beta.ChartResult = (function() { + v1beta.ClarificationQuestion = (function() { /** - * Properties of a ChartResult. + * Properties of a ClarificationQuestion. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IChartResult - * @property {google.protobuf.IStruct|null} [vegaConfig] ChartResult vegaConfig - * @property {google.cloud.geminidataanalytics.v1beta.IBlob|null} [image] ChartResult image + * @interface IClarificationQuestion + * @property {string|null} [question] ClarificationQuestion question + * @property {google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.SelectionMode|null} [selectionMode] ClarificationQuestion selectionMode + * @property {Array.|null} [options] ClarificationQuestion options + * @property {google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.ClarificationQuestionType|null} [clarificationQuestionType] ClarificationQuestion clarificationQuestionType */ /** - * Constructs a new ChartResult. + * Constructs a new ClarificationQuestion. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents a ChartResult. - * @implements IChartResult + * @classdesc Represents a ClarificationQuestion. + * @implements IClarificationQuestion * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IChartResult=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IClarificationQuestion=} [properties] Properties to set */ - function ChartResult(properties) { + function ClarificationQuestion(properties) { + this.options = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51596,91 +52867,122 @@ } /** - * ChartResult vegaConfig. - * @member {google.protobuf.IStruct|null|undefined} vegaConfig - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * ClarificationQuestion question. + * @member {string} question + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @instance */ - ChartResult.prototype.vegaConfig = null; + ClarificationQuestion.prototype.question = ""; /** - * ChartResult image. - * @member {google.cloud.geminidataanalytics.v1beta.IBlob|null|undefined} image - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * ClarificationQuestion selectionMode. + * @member {google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.SelectionMode} selectionMode + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @instance */ - ChartResult.prototype.image = null; + ClarificationQuestion.prototype.selectionMode = 0; /** - * Creates a new ChartResult instance using the specified properties. + * ClarificationQuestion options. + * @member {Array.} options + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion + * @instance + */ + ClarificationQuestion.prototype.options = $util.emptyArray; + + /** + * ClarificationQuestion clarificationQuestionType. + * @member {google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.ClarificationQuestionType} clarificationQuestionType + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion + * @instance + */ + ClarificationQuestion.prototype.clarificationQuestionType = 0; + + /** + * Creates a new ClarificationQuestion instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChartResult=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult instance + * @param {google.cloud.geminidataanalytics.v1beta.IClarificationQuestion=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ClarificationQuestion} ClarificationQuestion instance */ - ChartResult.create = function create(properties) { - return new ChartResult(properties); + ClarificationQuestion.create = function create(properties) { + return new ClarificationQuestion(properties); }; /** - * Encodes the specified ChartResult message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartResult.verify|verify} messages. + * Encodes the specified ClarificationQuestion message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChartResult} message ChartResult message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IClarificationQuestion} message ClarificationQuestion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChartResult.encode = function encode(message, writer) { + ClarificationQuestion.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vegaConfig != null && Object.hasOwnProperty.call(message, "vegaConfig")) - $root.google.protobuf.Struct.encode(message.vegaConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.image != null && Object.hasOwnProperty.call(message, "image")) - $root.google.cloud.geminidataanalytics.v1beta.Blob.encode(message.image, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.question != null && Object.hasOwnProperty.call(message, "question")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.question); + if (message.selectionMode != null && Object.hasOwnProperty.call(message, "selectionMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.selectionMode); + if (message.options != null && message.options.length) + for (var i = 0; i < message.options.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.options[i]); + if (message.clarificationQuestionType != null && Object.hasOwnProperty.call(message, "clarificationQuestionType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.clarificationQuestionType); return writer; }; /** - * Encodes the specified ChartResult message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ChartResult.verify|verify} messages. + * Encodes the specified ClarificationQuestion message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @static - * @param {google.cloud.geminidataanalytics.v1beta.IChartResult} message ChartResult message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IClarificationQuestion} message ClarificationQuestion message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChartResult.encodeDelimited = function encodeDelimited(message, writer) { + ClarificationQuestion.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChartResult message from the specified reader or buffer. + * Decodes a ClarificationQuestion message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult + * @returns {google.cloud.geminidataanalytics.v1beta.ClarificationQuestion} ClarificationQuestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChartResult.decode = function decode(reader, length, error) { + ClarificationQuestion.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ChartResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.question = reader.string(); + break; + } case 2: { - message.vegaConfig = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.selectionMode = reader.int32(); break; } case 3: { - message.image = $root.google.cloud.geminidataanalytics.v1beta.Blob.decode(reader, reader.uint32()); + if (!(message.options && message.options.length)) + message.options = []; + message.options.push(reader.string()); + break; + } + case 4: { + message.clarificationQuestionType = reader.int32(); break; } default: @@ -51692,141 +52994,241 @@ }; /** - * Decodes a ChartResult message from the specified reader or buffer, length delimited. + * Decodes a ClarificationQuestion message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult + * @returns {google.cloud.geminidataanalytics.v1beta.ClarificationQuestion} ClarificationQuestion * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChartResult.decodeDelimited = function decodeDelimited(reader) { + ClarificationQuestion.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChartResult message. + * Verifies a ClarificationQuestion message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChartResult.verify = function verify(message) { + ClarificationQuestion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vegaConfig != null && message.hasOwnProperty("vegaConfig")) { - var error = $root.google.protobuf.Struct.verify(message.vegaConfig); - if (error) - return "vegaConfig." + error; - } - if (message.image != null && message.hasOwnProperty("image")) { - var error = $root.google.cloud.geminidataanalytics.v1beta.Blob.verify(message.image); - if (error) - return "image." + error; - } + if (message.question != null && message.hasOwnProperty("question")) + if (!$util.isString(message.question)) + return "question: string expected"; + if (message.selectionMode != null && message.hasOwnProperty("selectionMode")) + switch (message.selectionMode) { + default: + return "selectionMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.options != null && message.hasOwnProperty("options")) { + if (!Array.isArray(message.options)) + return "options: array expected"; + for (var i = 0; i < message.options.length; ++i) + if (!$util.isString(message.options[i])) + return "options: string[] expected"; + } + if (message.clarificationQuestionType != null && message.hasOwnProperty("clarificationQuestionType")) + switch (message.clarificationQuestionType) { + default: + return "clarificationQuestionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a ChartResult message from a plain object. Also converts values to their respective internal types. + * Creates a ClarificationQuestion message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ChartResult} ChartResult + * @returns {google.cloud.geminidataanalytics.v1beta.ClarificationQuestion} ClarificationQuestion */ - ChartResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ChartResult) + ClarificationQuestion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ChartResult(); - if (object.vegaConfig != null) { - if (typeof object.vegaConfig !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartResult.vegaConfig: object expected"); - message.vegaConfig = $root.google.protobuf.Struct.fromObject(object.vegaConfig); + var message = new $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion(); + if (object.question != null) + message.question = String(object.question); + switch (object.selectionMode) { + default: + if (typeof object.selectionMode === "number") { + message.selectionMode = object.selectionMode; + break; + } + break; + case "SELECTION_MODE_UNSPECIFIED": + case 0: + message.selectionMode = 0; + break; + case "SINGLE_SELECT": + case 1: + message.selectionMode = 1; + break; + case "MULTI_SELECT": + case 2: + message.selectionMode = 2; + break; } - if (object.image != null) { - if (typeof object.image !== "object") - throw TypeError(".google.cloud.geminidataanalytics.v1beta.ChartResult.image: object expected"); - message.image = $root.google.cloud.geminidataanalytics.v1beta.Blob.fromObject(object.image); + if (object.options) { + if (!Array.isArray(object.options)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.options: array expected"); + message.options = []; + for (var i = 0; i < object.options.length; ++i) + message.options[i] = String(object.options[i]); + } + switch (object.clarificationQuestionType) { + default: + if (typeof object.clarificationQuestionType === "number") { + message.clarificationQuestionType = object.clarificationQuestionType; + break; + } + break; + case "CLARIFICATION_QUESTION_TYPE_UNSPECIFIED": + case 0: + message.clarificationQuestionType = 0; + break; + case "FILTER_VALUES": + case 1: + message.clarificationQuestionType = 1; + break; + case "FIELDS": + case 2: + message.clarificationQuestionType = 2; + break; } return message; }; /** - * Creates a plain object from a ChartResult message. Also converts values to other types if specified. + * Creates a plain object from a ClarificationQuestion message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @static - * @param {google.cloud.geminidataanalytics.v1beta.ChartResult} message ChartResult + * @param {google.cloud.geminidataanalytics.v1beta.ClarificationQuestion} message ClarificationQuestion * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChartResult.toObject = function toObject(message, options) { + ClarificationQuestion.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.options = []; if (options.defaults) { - object.vegaConfig = null; - object.image = null; + object.question = ""; + object.selectionMode = options.enums === String ? "SELECTION_MODE_UNSPECIFIED" : 0; + object.clarificationQuestionType = options.enums === String ? "CLARIFICATION_QUESTION_TYPE_UNSPECIFIED" : 0; } - if (message.vegaConfig != null && message.hasOwnProperty("vegaConfig")) - object.vegaConfig = $root.google.protobuf.Struct.toObject(message.vegaConfig, options); - if (message.image != null && message.hasOwnProperty("image")) - object.image = $root.google.cloud.geminidataanalytics.v1beta.Blob.toObject(message.image, options); + if (message.question != null && message.hasOwnProperty("question")) + object.question = message.question; + if (message.selectionMode != null && message.hasOwnProperty("selectionMode")) + object.selectionMode = options.enums === String ? $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.SelectionMode[message.selectionMode] === undefined ? message.selectionMode : $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.SelectionMode[message.selectionMode] : message.selectionMode; + if (message.options && message.options.length) { + object.options = []; + for (var j = 0; j < message.options.length; ++j) + object.options[j] = message.options[j]; + } + if (message.clarificationQuestionType != null && message.hasOwnProperty("clarificationQuestionType")) + object.clarificationQuestionType = options.enums === String ? $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.ClarificationQuestionType[message.clarificationQuestionType] === undefined ? message.clarificationQuestionType : $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.ClarificationQuestionType[message.clarificationQuestionType] : message.clarificationQuestionType; return object; }; /** - * Converts this ChartResult to JSON. + * Converts this ClarificationQuestion to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @instance * @returns {Object.} JSON object */ - ChartResult.prototype.toJSON = function toJSON() { + ClarificationQuestion.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChartResult + * Gets the default type url for ClarificationQuestion * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ChartResult + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationQuestion * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChartResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClarificationQuestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ChartResult"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ClarificationQuestion"; }; - return ChartResult; + /** + * SelectionMode enum. + * @name google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.SelectionMode + * @enum {number} + * @property {number} SELECTION_MODE_UNSPECIFIED=0 SELECTION_MODE_UNSPECIFIED value + * @property {number} SINGLE_SELECT=1 SINGLE_SELECT value + * @property {number} MULTI_SELECT=2 MULTI_SELECT value + */ + ClarificationQuestion.SelectionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SELECTION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SINGLE_SELECT"] = 1; + values[valuesById[2] = "MULTI_SELECT"] = 2; + return values; + })(); + + /** + * ClarificationQuestionType enum. + * @name google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.ClarificationQuestionType + * @enum {number} + * @property {number} CLARIFICATION_QUESTION_TYPE_UNSPECIFIED=0 CLARIFICATION_QUESTION_TYPE_UNSPECIFIED value + * @property {number} FILTER_VALUES=1 FILTER_VALUES value + * @property {number} FIELDS=2 FIELDS value + */ + ClarificationQuestion.ClarificationQuestionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLARIFICATION_QUESTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FILTER_VALUES"] = 1; + values[valuesById[2] = "FIELDS"] = 2; + return values; + })(); + + return ClarificationQuestion; })(); - v1beta.ErrorMessage = (function() { + v1beta.ClarificationMessage = (function() { /** - * Properties of an ErrorMessage. + * Properties of a ClarificationMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @interface IErrorMessage - * @property {string|null} [text] ErrorMessage text + * @interface IClarificationMessage + * @property {Array.|null} [questions] ClarificationMessage questions */ /** - * Constructs a new ErrorMessage. + * Constructs a new ClarificationMessage. * @memberof google.cloud.geminidataanalytics.v1beta - * @classdesc Represents an ErrorMessage. - * @implements IErrorMessage + * @classdesc Represents a ClarificationMessage. + * @implements IClarificationMessage * @constructor - * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage=} [properties] Properties to set + * @param {google.cloud.geminidataanalytics.v1beta.IClarificationMessage=} [properties] Properties to set */ - function ErrorMessage(properties) { + function ClarificationMessage(properties) { + this.questions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51834,77 +53236,80 @@ } /** - * ErrorMessage text. - * @member {string} text - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * ClarificationMessage questions. + * @member {Array.} questions + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @instance */ - ErrorMessage.prototype.text = ""; + ClarificationMessage.prototype.questions = $util.emptyArray; /** - * Creates a new ErrorMessage instance using the specified properties. + * Creates a new ClarificationMessage instance using the specified properties. * @function create - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage=} [properties] Properties to set - * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage instance + * @param {google.cloud.geminidataanalytics.v1beta.IClarificationMessage=} [properties] Properties to set + * @returns {google.cloud.geminidataanalytics.v1beta.ClarificationMessage} ClarificationMessage instance */ - ErrorMessage.create = function create(properties) { - return new ErrorMessage(properties); + ClarificationMessage.create = function create(properties) { + return new ClarificationMessage(properties); }; /** - * Encodes the specified ErrorMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify|verify} messages. + * Encodes the specified ClarificationMessage message. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClarificationMessage.verify|verify} messages. * @function encode - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage} message ErrorMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IClarificationMessage} message ClarificationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ErrorMessage.encode = function encode(message, writer) { + ClarificationMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.questions != null && message.questions.length) + for (var i = 0; i < message.questions.length; ++i) + $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.encode(message.questions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ErrorMessage.verify|verify} messages. + * Encodes the specified ClarificationMessage message, length delimited. Does not implicitly {@link google.cloud.geminidataanalytics.v1beta.ClarificationMessage.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.IErrorMessage} message ErrorMessage message or plain object to encode + * @param {google.cloud.geminidataanalytics.v1beta.IClarificationMessage} message ClarificationMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ErrorMessage.encodeDelimited = function encodeDelimited(message, writer) { + ClarificationMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ErrorMessage message from the specified reader or buffer. + * Decodes a ClarificationMessage message from the specified reader or buffer. * @function decode - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage + * @returns {google.cloud.geminidataanalytics.v1beta.ClarificationMessage} ClarificationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ErrorMessage.decode = function decode(reader, length, error) { + ClarificationMessage.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.geminidataanalytics.v1beta.ClarificationMessage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.text = reader.string(); + if (!(message.questions && message.questions.length)) + message.questions = []; + message.questions.push($root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.decode(reader, reader.uint32())); break; } default: @@ -51916,102 +53321,119 @@ }; /** - * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. + * Decodes a ClarificationMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage + * @returns {google.cloud.geminidataanalytics.v1beta.ClarificationMessage} ClarificationMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ErrorMessage.decodeDelimited = function decodeDelimited(reader) { + ClarificationMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ErrorMessage message. + * Verifies a ClarificationMessage message. * @function verify - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ErrorMessage.verify = function verify(message) { + ClarificationMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; + if (message.questions != null && message.hasOwnProperty("questions")) { + if (!Array.isArray(message.questions)) + return "questions: array expected"; + for (var i = 0; i < message.questions.length; ++i) { + var error = $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.verify(message.questions[i]); + if (error) + return "questions." + error; + } + } return null; }; /** - * Creates an ErrorMessage message from a plain object. Also converts values to their respective internal types. + * Creates a ClarificationMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @static * @param {Object.} object Plain object - * @returns {google.cloud.geminidataanalytics.v1beta.ErrorMessage} ErrorMessage + * @returns {google.cloud.geminidataanalytics.v1beta.ClarificationMessage} ClarificationMessage */ - ErrorMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage) + ClarificationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.geminidataanalytics.v1beta.ClarificationMessage) return object; - var message = new $root.google.cloud.geminidataanalytics.v1beta.ErrorMessage(); - if (object.text != null) - message.text = String(object.text); + var message = new $root.google.cloud.geminidataanalytics.v1beta.ClarificationMessage(); + if (object.questions) { + if (!Array.isArray(object.questions)) + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ClarificationMessage.questions: array expected"); + message.questions = []; + for (var i = 0; i < object.questions.length; ++i) { + if (typeof object.questions[i] !== "object") + throw TypeError(".google.cloud.geminidataanalytics.v1beta.ClarificationMessage.questions: object expected"); + message.questions[i] = $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.fromObject(object.questions[i]); + } + } return message; }; /** - * Creates a plain object from an ErrorMessage message. Also converts values to other types if specified. + * Creates a plain object from a ClarificationMessage message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @static - * @param {google.cloud.geminidataanalytics.v1beta.ErrorMessage} message ErrorMessage + * @param {google.cloud.geminidataanalytics.v1beta.ClarificationMessage} message ClarificationMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ErrorMessage.toObject = function toObject(message, options) { + ClarificationMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; + if (options.arrays || options.defaults) + object.questions = []; + if (message.questions && message.questions.length) { + object.questions = []; + for (var j = 0; j < message.questions.length; ++j) + object.questions[j] = $root.google.cloud.geminidataanalytics.v1beta.ClarificationQuestion.toObject(message.questions[j], options); + } return object; }; /** - * Converts this ErrorMessage to JSON. + * Converts this ClarificationMessage to JSON. * @function toJSON - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @instance * @returns {Object.} JSON object */ - ErrorMessage.prototype.toJSON = function toJSON() { + ClarificationMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ErrorMessage + * Gets the default type url for ClarificationMessage * @function getTypeUrl - * @memberof google.cloud.geminidataanalytics.v1beta.ErrorMessage + * @memberof google.cloud.geminidataanalytics.v1beta.ClarificationMessage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ErrorMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClarificationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ErrorMessage"; + return typeUrlPrefix + "/google.cloud.geminidataanalytics.v1beta.ClarificationMessage"; }; - return ErrorMessage; + return ClarificationMessage; })(); v1beta.ExampleQueries = (function() { diff --git a/packages/google-cloud-geminidataanalytics/protos/protos.json b/packages/google-cloud-geminidataanalytics/protos/protos.json index b02e157ff8f..67ade593eb9 100644 --- a/packages/google-cloud-geminidataanalytics/protos/protos.json +++ b/packages/google-cloud-geminidataanalytics/protos/protos.json @@ -2393,7 +2393,8 @@ "analysis", "chart", "error", - "exampleQueries" + "exampleQueries", + "clarification" ] }, "_groupId": { @@ -2434,6 +2435,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "clarification": { + "type": "ClarificationMessage", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "groupId": { "type": "int32", "id": 12, @@ -2459,6 +2467,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "thoughtSignature": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -2616,6 +2631,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "formattedData": { + "rule": "repeated", + "type": "google.protobuf.Struct", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -2824,6 +2847,67 @@ } } }, + "ClarificationQuestion": { + "fields": { + "question": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "selectionMode": { + "type": "SelectionMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "options": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clarificationQuestionType": { + "type": "ClarificationQuestionType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SelectionMode": { + "values": { + "SELECTION_MODE_UNSPECIFIED": 0, + "SINGLE_SELECT": 1, + "MULTI_SELECT": 2 + } + }, + "ClarificationQuestionType": { + "values": { + "CLARIFICATION_QUESTION_TYPE_UNSPECIFIED": 0, + "FILTER_VALUES": 1, + "FIELDS": 2 + } + } + } + }, + "ClarificationMessage": { + "fields": { + "questions": { + "rule": "repeated", + "type": "ClarificationQuestion", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "ExampleQueries": { "fields": { "exampleQueries": { @@ -5243,7 +5327,8 @@ "analysis", "chart", "error", - "exampleQueries" + "exampleQueries", + "clarification" ] }, "_groupId": { @@ -5284,6 +5369,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "clarification": { + "type": "ClarificationMessage", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "groupId": { "type": "int32", "id": 12, @@ -5309,6 +5401,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "thoughtSignature": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -5466,6 +5565,14 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "formattedData": { + "rule": "repeated", + "type": "google.protobuf.Struct", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -5674,6 +5781,67 @@ } } }, + "ClarificationQuestion": { + "fields": { + "question": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "selectionMode": { + "type": "SelectionMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "options": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clarificationQuestionType": { + "type": "ClarificationQuestionType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SelectionMode": { + "values": { + "SELECTION_MODE_UNSPECIFIED": 0, + "SINGLE_SELECT": 1, + "MULTI_SELECT": 2 + } + }, + "ClarificationQuestionType": { + "values": { + "CLARIFICATION_QUESTION_TYPE_UNSPECIFIED": 0, + "FILTER_VALUES": 1, + "FIELDS": 2 + } + } + } + }, + "ClarificationMessage": { + "fields": { + "questions": { + "rule": "repeated", + "type": "ClarificationQuestion", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "ExampleQueries": { "fields": { "exampleQueries": {