diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/content.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/content.proto index 55041862d78..fc656beea9b 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/content.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/content.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -108,6 +108,33 @@ message Content { // A `Part` must have a fixed IANA MIME type identifying the type and subtype // of the media if `inline_data` or `file_data` field is filled with raw bytes. message Part { + // per part media resolution. + // Media resolution for the input media. + message MediaResolution { + // The media resolution level. + enum Level { + // Media resolution has not been set. + MEDIA_RESOLUTION_UNSPECIFIED = 0; + + // Media resolution set to low. + MEDIA_RESOLUTION_LOW = 1; + + // Media resolution set to medium. + MEDIA_RESOLUTION_MEDIUM = 2; + + // Media resolution set to high. + MEDIA_RESOLUTION_HIGH = 3; + + // Media resolution set to ultra high. This is for image only. + MEDIA_RESOLUTION_ULTRA_HIGH = 4; + } + + oneof value { + // The tokenization quality used for given media. + Level level = 1; + } + } + oneof data { // Optional. Text part (can be code). string text = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -150,6 +177,10 @@ message Part { // video data is presented in inline_data or file_data. VideoMetadata video_metadata = 4 [(google.api.field_behavior) = OPTIONAL]; } + + // per part media resolution. + // Media resolution for the input media. + MediaResolution media_resolution = 12; } // Content blob. @@ -182,6 +213,10 @@ message VideoMetadata { // Optional. The end offset of the video. google.protobuf.Duration end_offset = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The frame rate of the video sent to the model. If not specified, + // the default value is 1.0. The valid range is (0.0, 24.0]. + double fps = 3 [(google.api.field_behavior) = OPTIONAL]; } // Configuration for a prebuilt voice. @@ -202,7 +237,6 @@ message ReplicatedVoiceConfig { bytes voice_sample_audio = 2 [(google.api.field_behavior) = OPTIONAL]; } - // Configuration for a voice. message VoiceConfig { // The configuration for the speaker to use. @@ -250,6 +284,37 @@ message SpeechConfig { // Config for image generation features. message ImageConfig { + // The image output format for generated images. + message ImageOutputOptions { + // Optional. The image format that the output should be saved as. + optional string mime_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The compression quality of the output image. + optional int32 compression_quality = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Enum for controlling the generation of people in images. + enum PersonGeneration { + // The default behavior is unspecified. The model will decide whether to + // generate images of people. + PERSON_GENERATION_UNSPECIFIED = 0; + + // Allows the model to generate images of people, including adults and + // children. + ALLOW_ALL = 1; + + // Allows the model to generate images of adults, but not children. + ALLOW_ADULT = 2; + + // Prevents the model from generating images of people. + ALLOW_NONE = 3; + } + + // Optional. The image output format for generated images. + optional ImageOutputOptions image_output_options = 1 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. The desired aspect ratio for the generated images. The following // aspect ratios are supported: // @@ -260,6 +325,14 @@ message ImageConfig { // "9:16", "16:9" // "21:9" optional string aspect_ratio = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Controls whether the model can generate people. + optional PersonGeneration person_generation = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the size of generated images. Supported values are + // `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`. + optional string image_size = 4 [(google.api.field_behavior) = OPTIONAL]; } // Generation config. @@ -308,6 +381,24 @@ message GenerationConfig { // Config for thinking features. message ThinkingConfig { + // The thinking level for the model. + enum ThinkingLevel { + // Unspecified thinking level. + THINKING_LEVEL_UNSPECIFIED = 0; + + // Low thinking level. + LOW = 1; + + // Medium thinking level. + MEDIUM = 2; + + // High thinking level. + HIGH = 3; + + // MINIMAL thinking level. + MINIMAL = 4; + } + // Indicates whether to include thoughts in the response. // If true, thoughts are returned only when available. optional bool include_thoughts = 1 [(google.api.field_behavior) = OPTIONAL]; @@ -315,6 +406,40 @@ message GenerationConfig { // Optional. Indicates the thinking budget in tokens. // This is only applied when enable_thinking is true. optional int32 thinking_budget = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of thoughts tokens that the model should generate. + optional ThinkingLevel thinking_level = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The modalities of the response. + enum Modality { + // Unspecified modality. Will be processed as text. + MODALITY_UNSPECIFIED = 0; + + // Text modality. + TEXT = 1; + + // Image modality. + IMAGE = 2; + + // Audio modality. + AUDIO = 3; + } + + // Media resolution for the input media. + enum MediaResolution { + // Media resolution has not been set. + MEDIA_RESOLUTION_UNSPECIFIED = 0; + + // Media resolution set to low (64 tokens). + MEDIA_RESOLUTION_LOW = 1; + + // Media resolution set to medium (256 tokens). + MEDIA_RESOLUTION_MEDIUM = 2; + + // Media resolution set to high (zoomed reframing with 256 tokens). + MEDIA_RESOLUTION_HIGH = 3; } // Optional. Controls the randomness of predictions. @@ -411,6 +536,27 @@ message GenerationConfig { optional RoutingConfig routing_config = 17 [(google.api.field_behavior) = OPTIONAL]; + // Optional. If enabled, audio timestamps will be included in the request to + // the model. This can be useful for synchronizing audio with other modalities + // in the response. + optional bool audio_timestamp = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The modalities of the response. The model will generate a + // response that includes all the specified modalities. For example, if this + // is set to `[TEXT, IMAGE]`, the response will include both text and an + // image. + repeated Modality response_modalities = 21 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The token resolution at which input media content is sampled. + // This is used to control the trade-off between the quality of the response + // and the number of tokens used to represent the media. A higher resolution + // allows the model to perceive more detail, which can lead to a more nuanced + // response, but it will also use more tokens. This does not affect the + // image dimensions sent to the model. + optional MediaResolution media_resolution = 22 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. The speech generation config. optional SpeechConfig speech_config = 23 [(google.api.field_behavior) = OPTIONAL]; diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index 89952bb8b5b..c33b05ee6d1 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -11417,6 +11417,9 @@ export namespace google { /** Part videoMetadata */ videoMetadata?: (google.cloud.aiplatform.v1.IVideoMetadata|null); + + /** Part mediaResolution */ + mediaResolution?: (google.cloud.aiplatform.v1.Part.IMediaResolution|null); } /** Represents a Part. */ @@ -11458,6 +11461,9 @@ export namespace google { /** Part videoMetadata. */ public videoMetadata?: (google.cloud.aiplatform.v1.IVideoMetadata|null); + /** Part mediaResolution. */ + public mediaResolution?: (google.cloud.aiplatform.v1.Part.IMediaResolution|null); + /** Part data. */ public data?: ("text"|"inlineData"|"fileData"|"functionCall"|"functionResponse"|"executableCode"|"codeExecutionResult"); @@ -11542,6 +11548,121 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace Part { + + /** Properties of a MediaResolution. */ + interface IMediaResolution { + + /** MediaResolution level */ + level?: (google.cloud.aiplatform.v1.Part.MediaResolution.Level|keyof typeof google.cloud.aiplatform.v1.Part.MediaResolution.Level|null); + } + + /** Represents a MediaResolution. */ + class MediaResolution implements IMediaResolution { + + /** + * Constructs a new MediaResolution. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.Part.IMediaResolution); + + /** MediaResolution level. */ + public level?: (google.cloud.aiplatform.v1.Part.MediaResolution.Level|keyof typeof google.cloud.aiplatform.v1.Part.MediaResolution.Level|null); + + /** MediaResolution value. */ + public value?: "level"; + + /** + * Creates a new MediaResolution instance using the specified properties. + * @param [properties] Properties to set + * @returns MediaResolution instance + */ + public static create(properties?: google.cloud.aiplatform.v1.Part.IMediaResolution): google.cloud.aiplatform.v1.Part.MediaResolution; + + /** + * Encodes the specified MediaResolution message. Does not implicitly {@link google.cloud.aiplatform.v1.Part.MediaResolution.verify|verify} messages. + * @param message MediaResolution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.Part.IMediaResolution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MediaResolution message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.Part.MediaResolution.verify|verify} messages. + * @param message MediaResolution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.Part.IMediaResolution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MediaResolution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MediaResolution + * @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.aiplatform.v1.Part.MediaResolution; + + /** + * Decodes a MediaResolution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MediaResolution + * @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.aiplatform.v1.Part.MediaResolution; + + /** + * Verifies a MediaResolution 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 MediaResolution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MediaResolution + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.Part.MediaResolution; + + /** + * Creates a plain object from a MediaResolution message. Also converts values to other types if specified. + * @param message MediaResolution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.Part.MediaResolution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MediaResolution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MediaResolution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MediaResolution { + + /** Level enum. */ + enum Level { + MEDIA_RESOLUTION_UNSPECIFIED = 0, + MEDIA_RESOLUTION_LOW = 1, + MEDIA_RESOLUTION_MEDIUM = 2, + MEDIA_RESOLUTION_HIGH = 3, + MEDIA_RESOLUTION_ULTRA_HIGH = 4 + } + } + } + /** Properties of a Blob. */ interface IBlob { @@ -11756,6 +11877,9 @@ export namespace google { /** VideoMetadata endOffset */ endOffset?: (google.protobuf.IDuration|null); + + /** VideoMetadata fps */ + fps?: (number|null); } /** Represents a VideoMetadata. */ @@ -11773,6 +11897,9 @@ export namespace google { /** VideoMetadata endOffset. */ public endOffset?: (google.protobuf.IDuration|null); + /** VideoMetadata fps. */ + public fps: number; + /** * Creates a new VideoMetadata instance using the specified properties. * @param [properties] Properties to set @@ -12469,8 +12596,17 @@ export namespace google { /** Properties of an ImageConfig. */ interface IImageConfig { + /** ImageConfig imageOutputOptions */ + imageOutputOptions?: (google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions|null); + /** ImageConfig aspectRatio */ aspectRatio?: (string|null); + + /** ImageConfig personGeneration */ + personGeneration?: (google.cloud.aiplatform.v1.ImageConfig.PersonGeneration|keyof typeof google.cloud.aiplatform.v1.ImageConfig.PersonGeneration|null); + + /** ImageConfig imageSize */ + imageSize?: (string|null); } /** Represents an ImageConfig. */ @@ -12482,9 +12618,18 @@ export namespace google { */ constructor(properties?: google.cloud.aiplatform.v1.IImageConfig); + /** ImageConfig imageOutputOptions. */ + public imageOutputOptions?: (google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions|null); + /** ImageConfig aspectRatio. */ public aspectRatio?: (string|null); + /** ImageConfig personGeneration. */ + public personGeneration?: (google.cloud.aiplatform.v1.ImageConfig.PersonGeneration|keyof typeof google.cloud.aiplatform.v1.ImageConfig.PersonGeneration|null); + + /** ImageConfig imageSize. */ + public imageSize?: (string|null); + /** * Creates a new ImageConfig instance using the specified properties. * @param [properties] Properties to set @@ -12563,6 +12708,120 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace ImageConfig { + + /** Properties of an ImageOutputOptions. */ + interface IImageOutputOptions { + + /** ImageOutputOptions mimeType */ + mimeType?: (string|null); + + /** ImageOutputOptions compressionQuality */ + compressionQuality?: (number|null); + } + + /** Represents an ImageOutputOptions. */ + class ImageOutputOptions implements IImageOutputOptions { + + /** + * Constructs a new ImageOutputOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions); + + /** ImageOutputOptions mimeType. */ + public mimeType?: (string|null); + + /** ImageOutputOptions compressionQuality. */ + public compressionQuality?: (number|null); + + /** + * Creates a new ImageOutputOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageOutputOptions instance + */ + public static create(properties?: google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions): google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions; + + /** + * Encodes the specified ImageOutputOptions message. Does not implicitly {@link google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions.verify|verify} messages. + * @param message ImageOutputOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageOutputOptions message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions.verify|verify} messages. + * @param message ImageOutputOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageOutputOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageOutputOptions + * @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.aiplatform.v1.ImageConfig.ImageOutputOptions; + + /** + * Decodes an ImageOutputOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageOutputOptions + * @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.aiplatform.v1.ImageConfig.ImageOutputOptions; + + /** + * Verifies an ImageOutputOptions 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 an ImageOutputOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageOutputOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions; + + /** + * Creates a plain object from an ImageOutputOptions message. Also converts values to other types if specified. + * @param message ImageOutputOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageOutputOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageOutputOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PersonGeneration enum. */ + enum PersonGeneration { + PERSON_GENERATION_UNSPECIFIED = 0, + ALLOW_ALL = 1, + ALLOW_ADULT = 2, + ALLOW_NONE = 3 + } + } + /** Properties of a GenerationConfig. */ interface IGenerationConfig { @@ -12611,6 +12870,15 @@ export namespace google { /** GenerationConfig routingConfig */ routingConfig?: (google.cloud.aiplatform.v1.GenerationConfig.IRoutingConfig|null); + /** GenerationConfig audioTimestamp */ + audioTimestamp?: (boolean|null); + + /** GenerationConfig responseModalities */ + responseModalities?: (google.cloud.aiplatform.v1.GenerationConfig.Modality[]|null); + + /** GenerationConfig mediaResolution */ + mediaResolution?: (google.cloud.aiplatform.v1.GenerationConfig.MediaResolution|keyof typeof google.cloud.aiplatform.v1.GenerationConfig.MediaResolution|null); + /** GenerationConfig speechConfig */ speechConfig?: (google.cloud.aiplatform.v1.ISpeechConfig|null); @@ -12675,6 +12943,15 @@ export namespace google { /** GenerationConfig routingConfig. */ public routingConfig?: (google.cloud.aiplatform.v1.GenerationConfig.IRoutingConfig|null); + /** GenerationConfig audioTimestamp. */ + public audioTimestamp?: (boolean|null); + + /** GenerationConfig responseModalities. */ + public responseModalities: google.cloud.aiplatform.v1.GenerationConfig.Modality[]; + + /** GenerationConfig mediaResolution. */ + public mediaResolution?: (google.cloud.aiplatform.v1.GenerationConfig.MediaResolution|keyof typeof google.cloud.aiplatform.v1.GenerationConfig.MediaResolution|null); + /** GenerationConfig speechConfig. */ public speechConfig?: (google.cloud.aiplatform.v1.ISpeechConfig|null); @@ -13086,6 +13363,9 @@ export namespace google { /** ThinkingConfig thinkingBudget */ thinkingBudget?: (number|null); + + /** ThinkingConfig thinkingLevel */ + thinkingLevel?: (google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.ThinkingLevel|keyof typeof google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.ThinkingLevel|null); } /** Represents a ThinkingConfig. */ @@ -13103,6 +13383,9 @@ export namespace google { /** ThinkingConfig thinkingBudget. */ public thinkingBudget?: (number|null); + /** ThinkingConfig thinkingLevel. */ + public thinkingLevel?: (google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.ThinkingLevel|keyof typeof google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.ThinkingLevel|null); + /** * Creates a new ThinkingConfig instance using the specified properties. * @param [properties] Properties to set @@ -13180,6 +13463,34 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + namespace ThinkingConfig { + + /** ThinkingLevel enum. */ + enum ThinkingLevel { + THINKING_LEVEL_UNSPECIFIED = 0, + LOW = 1, + MEDIUM = 2, + HIGH = 3, + MINIMAL = 4 + } + } + + /** Modality enum. */ + enum Modality { + MODALITY_UNSPECIFIED = 0, + TEXT = 1, + IMAGE = 2, + AUDIO = 3 + } + + /** MediaResolution enum. */ + enum MediaResolution { + MEDIA_RESOLUTION_UNSPECIFIED = 0, + MEDIA_RESOLUTION_LOW = 1, + MEDIA_RESOLUTION_MEDIUM = 2, + MEDIA_RESOLUTION_HIGH = 3 + } } /** Properties of a SafetySetting. */ diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index 16828a82ab3..e150388955e 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -29438,6 +29438,7 @@ * @property {boolean|null} [thought] Part thought * @property {Uint8Array|null} [thoughtSignature] Part thoughtSignature * @property {google.cloud.aiplatform.v1.IVideoMetadata|null} [videoMetadata] Part videoMetadata + * @property {google.cloud.aiplatform.v1.Part.IMediaResolution|null} [mediaResolution] Part mediaResolution */ /** @@ -29535,6 +29536,14 @@ */ Part.prototype.videoMetadata = null; + /** + * Part mediaResolution. + * @member {google.cloud.aiplatform.v1.Part.IMediaResolution|null|undefined} mediaResolution + * @memberof google.cloud.aiplatform.v1.Part + * @instance + */ + Part.prototype.mediaResolution = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -29604,6 +29613,8 @@ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.thought); if (message.thoughtSignature != null && Object.hasOwnProperty.call(message, "thoughtSignature")) writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.thoughtSignature); + if (message.mediaResolution != null && Object.hasOwnProperty.call(message, "mediaResolution")) + $root.google.cloud.aiplatform.v1.Part.MediaResolution.encode(message.mediaResolution, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; @@ -29680,6 +29691,10 @@ message.videoMetadata = $root.google.cloud.aiplatform.v1.VideoMetadata.decode(reader, reader.uint32()); break; } + case 12: { + message.mediaResolution = $root.google.cloud.aiplatform.v1.Part.MediaResolution.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -29795,6 +29810,11 @@ return "videoMetadata." + error; } } + if (message.mediaResolution != null && message.hasOwnProperty("mediaResolution")) { + var error = $root.google.cloud.aiplatform.v1.Part.MediaResolution.verify(message.mediaResolution); + if (error) + return "mediaResolution." + error; + } return null; }; @@ -29854,6 +29874,11 @@ throw TypeError(".google.cloud.aiplatform.v1.Part.videoMetadata: object expected"); message.videoMetadata = $root.google.cloud.aiplatform.v1.VideoMetadata.fromObject(object.videoMetadata); } + if (object.mediaResolution != null) { + if (typeof object.mediaResolution !== "object") + throw TypeError(".google.cloud.aiplatform.v1.Part.mediaResolution: object expected"); + message.mediaResolution = $root.google.cloud.aiplatform.v1.Part.MediaResolution.fromObject(object.mediaResolution); + } return message; }; @@ -29879,6 +29904,7 @@ if (options.bytes !== Array) object.thoughtSignature = $util.newBuffer(object.thoughtSignature); } + object.mediaResolution = null; } if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; @@ -29924,6 +29950,8 @@ object.thought = message.thought; 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; + if (message.mediaResolution != null && message.hasOwnProperty("mediaResolution")) + object.mediaResolution = $root.google.cloud.aiplatform.v1.Part.MediaResolution.toObject(message.mediaResolution, options); return object; }; @@ -29953,6 +29981,283 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1.Part"; }; + Part.MediaResolution = (function() { + + /** + * Properties of a MediaResolution. + * @memberof google.cloud.aiplatform.v1.Part + * @interface IMediaResolution + * @property {google.cloud.aiplatform.v1.Part.MediaResolution.Level|null} [level] MediaResolution level + */ + + /** + * Constructs a new MediaResolution. + * @memberof google.cloud.aiplatform.v1.Part + * @classdesc Represents a MediaResolution. + * @implements IMediaResolution + * @constructor + * @param {google.cloud.aiplatform.v1.Part.IMediaResolution=} [properties] Properties to set + */ + function MediaResolution(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]]; + } + + /** + * MediaResolution level. + * @member {google.cloud.aiplatform.v1.Part.MediaResolution.Level|null|undefined} level + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @instance + */ + MediaResolution.prototype.level = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MediaResolution value. + * @member {"level"|undefined} value + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @instance + */ + Object.defineProperty(MediaResolution.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["level"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MediaResolution instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @static + * @param {google.cloud.aiplatform.v1.Part.IMediaResolution=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.Part.MediaResolution} MediaResolution instance + */ + MediaResolution.create = function create(properties) { + return new MediaResolution(properties); + }; + + /** + * Encodes the specified MediaResolution message. Does not implicitly {@link google.cloud.aiplatform.v1.Part.MediaResolution.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @static + * @param {google.cloud.aiplatform.v1.Part.IMediaResolution} message MediaResolution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaResolution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.level != null && Object.hasOwnProperty.call(message, "level")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.level); + return writer; + }; + + /** + * Encodes the specified MediaResolution message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.Part.MediaResolution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @static + * @param {google.cloud.aiplatform.v1.Part.IMediaResolution} message MediaResolution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MediaResolution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MediaResolution message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.Part.MediaResolution} MediaResolution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaResolution.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.aiplatform.v1.Part.MediaResolution(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.level = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MediaResolution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.Part.MediaResolution} MediaResolution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MediaResolution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MediaResolution message. + * @function verify + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MediaResolution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.level != null && message.hasOwnProperty("level")) { + properties.value = 1; + switch (message.level) { + default: + return "level: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + return null; + }; + + /** + * Creates a MediaResolution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.Part.MediaResolution} MediaResolution + */ + MediaResolution.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.Part.MediaResolution) + return object; + var message = new $root.google.cloud.aiplatform.v1.Part.MediaResolution(); + switch (object.level) { + default: + if (typeof object.level === "number") { + message.level = object.level; + break; + } + break; + case "MEDIA_RESOLUTION_UNSPECIFIED": + case 0: + message.level = 0; + break; + case "MEDIA_RESOLUTION_LOW": + case 1: + message.level = 1; + break; + case "MEDIA_RESOLUTION_MEDIUM": + case 2: + message.level = 2; + break; + case "MEDIA_RESOLUTION_HIGH": + case 3: + message.level = 3; + break; + case "MEDIA_RESOLUTION_ULTRA_HIGH": + case 4: + message.level = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a MediaResolution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @static + * @param {google.cloud.aiplatform.v1.Part.MediaResolution} message MediaResolution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MediaResolution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.level != null && message.hasOwnProperty("level")) { + object.level = options.enums === String ? $root.google.cloud.aiplatform.v1.Part.MediaResolution.Level[message.level] === undefined ? message.level : $root.google.cloud.aiplatform.v1.Part.MediaResolution.Level[message.level] : message.level; + if (options.oneofs) + object.value = "level"; + } + return object; + }; + + /** + * Converts this MediaResolution to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @instance + * @returns {Object.} JSON object + */ + MediaResolution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MediaResolution + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.Part.MediaResolution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MediaResolution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.Part.MediaResolution"; + }; + + /** + * Level enum. + * @name google.cloud.aiplatform.v1.Part.MediaResolution.Level + * @enum {number} + * @property {number} MEDIA_RESOLUTION_UNSPECIFIED=0 MEDIA_RESOLUTION_UNSPECIFIED value + * @property {number} MEDIA_RESOLUTION_LOW=1 MEDIA_RESOLUTION_LOW value + * @property {number} MEDIA_RESOLUTION_MEDIUM=2 MEDIA_RESOLUTION_MEDIUM value + * @property {number} MEDIA_RESOLUTION_HIGH=3 MEDIA_RESOLUTION_HIGH value + * @property {number} MEDIA_RESOLUTION_ULTRA_HIGH=4 MEDIA_RESOLUTION_ULTRA_HIGH value + */ + MediaResolution.Level = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MEDIA_RESOLUTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "MEDIA_RESOLUTION_LOW"] = 1; + values[valuesById[2] = "MEDIA_RESOLUTION_MEDIUM"] = 2; + values[valuesById[3] = "MEDIA_RESOLUTION_HIGH"] = 3; + values[valuesById[4] = "MEDIA_RESOLUTION_ULTRA_HIGH"] = 4; + return values; + })(); + + return MediaResolution; + })(); + return Part; })(); @@ -30431,6 +30736,7 @@ * @interface IVideoMetadata * @property {google.protobuf.IDuration|null} [startOffset] VideoMetadata startOffset * @property {google.protobuf.IDuration|null} [endOffset] VideoMetadata endOffset + * @property {number|null} [fps] VideoMetadata fps */ /** @@ -30464,6 +30770,14 @@ */ VideoMetadata.prototype.endOffset = null; + /** + * VideoMetadata fps. + * @member {number} fps + * @memberof google.cloud.aiplatform.v1.VideoMetadata + * @instance + */ + VideoMetadata.prototype.fps = 0; + /** * Creates a new VideoMetadata instance using the specified properties. * @function create @@ -30492,6 +30806,8 @@ $root.google.protobuf.Duration.encode(message.startOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset")) $root.google.protobuf.Duration.encode(message.endOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.fps != null && Object.hasOwnProperty.call(message, "fps")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.fps); return writer; }; @@ -30536,6 +30852,10 @@ message.endOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } + case 3: { + message.fps = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -30581,6 +30901,9 @@ if (error) return "endOffset." + error; } + if (message.fps != null && message.hasOwnProperty("fps")) + if (typeof message.fps !== "number") + return "fps: number expected"; return null; }; @@ -30606,6 +30929,8 @@ throw TypeError(".google.cloud.aiplatform.v1.VideoMetadata.endOffset: object expected"); message.endOffset = $root.google.protobuf.Duration.fromObject(object.endOffset); } + if (object.fps != null) + message.fps = Number(object.fps); return message; }; @@ -30625,11 +30950,14 @@ if (options.defaults) { object.startOffset = null; object.endOffset = null; + object.fps = 0; } if (message.startOffset != null && message.hasOwnProperty("startOffset")) object.startOffset = $root.google.protobuf.Duration.toObject(message.startOffset, options); if (message.endOffset != null && message.hasOwnProperty("endOffset")) object.endOffset = $root.google.protobuf.Duration.toObject(message.endOffset, options); + if (message.fps != null && message.hasOwnProperty("fps")) + object.fps = options.json && !isFinite(message.fps) ? String(message.fps) : message.fps; return object; }; @@ -32110,7 +32438,10 @@ * Properties of an ImageConfig. * @memberof google.cloud.aiplatform.v1 * @interface IImageConfig + * @property {google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions|null} [imageOutputOptions] ImageConfig imageOutputOptions * @property {string|null} [aspectRatio] ImageConfig aspectRatio + * @property {google.cloud.aiplatform.v1.ImageConfig.PersonGeneration|null} [personGeneration] ImageConfig personGeneration + * @property {string|null} [imageSize] ImageConfig imageSize */ /** @@ -32128,6 +32459,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * ImageConfig imageOutputOptions. + * @member {google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions|null|undefined} imageOutputOptions + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @instance + */ + ImageConfig.prototype.imageOutputOptions = null; + /** * ImageConfig aspectRatio. * @member {string|null|undefined} aspectRatio @@ -32136,15 +32475,49 @@ */ ImageConfig.prototype.aspectRatio = null; + /** + * ImageConfig personGeneration. + * @member {google.cloud.aiplatform.v1.ImageConfig.PersonGeneration|null|undefined} personGeneration + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @instance + */ + ImageConfig.prototype.personGeneration = null; + + /** + * ImageConfig imageSize. + * @member {string|null|undefined} imageSize + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @instance + */ + ImageConfig.prototype.imageSize = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageConfig.prototype, "_imageOutputOptions", { + get: $util.oneOfGetter($oneOfFields = ["imageOutputOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + // Virtual OneOf for proto3 optional field Object.defineProperty(ImageConfig.prototype, "_aspectRatio", { get: $util.oneOfGetter($oneOfFields = ["aspectRatio"]), set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageConfig.prototype, "_personGeneration", { + get: $util.oneOfGetter($oneOfFields = ["personGeneration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageConfig.prototype, "_imageSize", { + get: $util.oneOfGetter($oneOfFields = ["imageSize"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ImageConfig instance using the specified properties. * @function create @@ -32169,8 +32542,14 @@ ImageConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.imageOutputOptions != null && Object.hasOwnProperty.call(message, "imageOutputOptions")) + $root.google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions.encode(message.imageOutputOptions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.aspectRatio != null && Object.hasOwnProperty.call(message, "aspectRatio")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.aspectRatio); + if (message.personGeneration != null && Object.hasOwnProperty.call(message, "personGeneration")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.personGeneration); + if (message.imageSize != null && Object.hasOwnProperty.call(message, "imageSize")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.imageSize); return writer; }; @@ -32207,10 +32586,22 @@ if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.imageOutputOptions = $root.google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions.decode(reader, reader.uint32()); + break; + } case 2: { message.aspectRatio = reader.string(); break; } + case 3: { + message.personGeneration = reader.int32(); + break; + } + case 4: { + message.imageSize = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32247,11 +32638,36 @@ if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; + if (message.imageOutputOptions != null && message.hasOwnProperty("imageOutputOptions")) { + properties._imageOutputOptions = 1; + { + var error = $root.google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions.verify(message.imageOutputOptions); + if (error) + return "imageOutputOptions." + error; + } + } if (message.aspectRatio != null && message.hasOwnProperty("aspectRatio")) { properties._aspectRatio = 1; if (!$util.isString(message.aspectRatio)) return "aspectRatio: string expected"; } + if (message.personGeneration != null && message.hasOwnProperty("personGeneration")) { + properties._personGeneration = 1; + switch (message.personGeneration) { + default: + return "personGeneration: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.imageSize != null && message.hasOwnProperty("imageSize")) { + properties._imageSize = 1; + if (!$util.isString(message.imageSize)) + return "imageSize: string expected"; + } return null; }; @@ -32267,15 +32683,46 @@ if (object instanceof $root.google.cloud.aiplatform.v1.ImageConfig) return object; var message = new $root.google.cloud.aiplatform.v1.ImageConfig(); + if (object.imageOutputOptions != null) { + if (typeof object.imageOutputOptions !== "object") + throw TypeError(".google.cloud.aiplatform.v1.ImageConfig.imageOutputOptions: object expected"); + message.imageOutputOptions = $root.google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions.fromObject(object.imageOutputOptions); + } if (object.aspectRatio != null) message.aspectRatio = String(object.aspectRatio); - return message; - }; - - /** - * Creates a plain object from an ImageConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.aiplatform.v1.ImageConfig + switch (object.personGeneration) { + default: + if (typeof object.personGeneration === "number") { + message.personGeneration = object.personGeneration; + break; + } + break; + case "PERSON_GENERATION_UNSPECIFIED": + case 0: + message.personGeneration = 0; + break; + case "ALLOW_ALL": + case 1: + message.personGeneration = 1; + break; + case "ALLOW_ADULT": + case 2: + message.personGeneration = 2; + break; + case "ALLOW_NONE": + case 3: + message.personGeneration = 3; + break; + } + if (object.imageSize != null) + message.imageSize = String(object.imageSize); + return message; + }; + + /** + * Creates a plain object from an ImageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ImageConfig * @static * @param {google.cloud.aiplatform.v1.ImageConfig} message ImageConfig * @param {$protobuf.IConversionOptions} [options] Conversion options @@ -32285,11 +32732,26 @@ if (!options) options = {}; var object = {}; + if (message.imageOutputOptions != null && message.hasOwnProperty("imageOutputOptions")) { + object.imageOutputOptions = $root.google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions.toObject(message.imageOutputOptions, options); + if (options.oneofs) + object._imageOutputOptions = "imageOutputOptions"; + } if (message.aspectRatio != null && message.hasOwnProperty("aspectRatio")) { object.aspectRatio = message.aspectRatio; if (options.oneofs) object._aspectRatio = "aspectRatio"; } + if (message.personGeneration != null && message.hasOwnProperty("personGeneration")) { + object.personGeneration = options.enums === String ? $root.google.cloud.aiplatform.v1.ImageConfig.PersonGeneration[message.personGeneration] === undefined ? message.personGeneration : $root.google.cloud.aiplatform.v1.ImageConfig.PersonGeneration[message.personGeneration] : message.personGeneration; + if (options.oneofs) + object._personGeneration = "personGeneration"; + } + if (message.imageSize != null && message.hasOwnProperty("imageSize")) { + object.imageSize = message.imageSize; + if (options.oneofs) + object._imageSize = "imageSize"; + } return object; }; @@ -32319,6 +32781,275 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1.ImageConfig"; }; + ImageConfig.ImageOutputOptions = (function() { + + /** + * Properties of an ImageOutputOptions. + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @interface IImageOutputOptions + * @property {string|null} [mimeType] ImageOutputOptions mimeType + * @property {number|null} [compressionQuality] ImageOutputOptions compressionQuality + */ + + /** + * Constructs a new ImageOutputOptions. + * @memberof google.cloud.aiplatform.v1.ImageConfig + * @classdesc Represents an ImageOutputOptions. + * @implements IImageOutputOptions + * @constructor + * @param {google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions=} [properties] Properties to set + */ + function ImageOutputOptions(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]]; + } + + /** + * ImageOutputOptions mimeType. + * @member {string|null|undefined} mimeType + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @instance + */ + ImageOutputOptions.prototype.mimeType = null; + + /** + * ImageOutputOptions compressionQuality. + * @member {number|null|undefined} compressionQuality + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @instance + */ + ImageOutputOptions.prototype.compressionQuality = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageOutputOptions.prototype, "_mimeType", { + get: $util.oneOfGetter($oneOfFields = ["mimeType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageOutputOptions.prototype, "_compressionQuality", { + get: $util.oneOfGetter($oneOfFields = ["compressionQuality"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImageOutputOptions instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @static + * @param {google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions} ImageOutputOptions instance + */ + ImageOutputOptions.create = function create(properties) { + return new ImageOutputOptions(properties); + }; + + /** + * Encodes the specified ImageOutputOptions message. Does not implicitly {@link google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @static + * @param {google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions} message ImageOutputOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageOutputOptions.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.compressionQuality != null && Object.hasOwnProperty.call(message, "compressionQuality")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compressionQuality); + return writer; + }; + + /** + * Encodes the specified ImageOutputOptions message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @static + * @param {google.cloud.aiplatform.v1.ImageConfig.IImageOutputOptions} message ImageOutputOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageOutputOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageOutputOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions} ImageOutputOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageOutputOptions.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.aiplatform.v1.ImageConfig.ImageOutputOptions(); + 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.compressionQuality = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageOutputOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions} ImageOutputOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageOutputOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageOutputOptions message. + * @function verify + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageOutputOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) { + properties._mimeType = 1; + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + } + if (message.compressionQuality != null && message.hasOwnProperty("compressionQuality")) { + properties._compressionQuality = 1; + if (!$util.isInteger(message.compressionQuality)) + return "compressionQuality: integer expected"; + } + return null; + }; + + /** + * Creates an ImageOutputOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions} ImageOutputOptions + */ + ImageOutputOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions) + return object; + var message = new $root.google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.compressionQuality != null) + message.compressionQuality = object.compressionQuality | 0; + return message; + }; + + /** + * Creates a plain object from an ImageOutputOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @static + * @param {google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions} message ImageOutputOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageOutputOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) { + object.mimeType = message.mimeType; + if (options.oneofs) + object._mimeType = "mimeType"; + } + if (message.compressionQuality != null && message.hasOwnProperty("compressionQuality")) { + object.compressionQuality = message.compressionQuality; + if (options.oneofs) + object._compressionQuality = "compressionQuality"; + } + return object; + }; + + /** + * Converts this ImageOutputOptions to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @instance + * @returns {Object.} JSON object + */ + ImageOutputOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageOutputOptions + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageOutputOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.ImageConfig.ImageOutputOptions"; + }; + + return ImageOutputOptions; + })(); + + /** + * PersonGeneration enum. + * @name google.cloud.aiplatform.v1.ImageConfig.PersonGeneration + * @enum {number} + * @property {number} PERSON_GENERATION_UNSPECIFIED=0 PERSON_GENERATION_UNSPECIFIED value + * @property {number} ALLOW_ALL=1 ALLOW_ALL value + * @property {number} ALLOW_ADULT=2 ALLOW_ADULT value + * @property {number} ALLOW_NONE=3 ALLOW_NONE value + */ + ImageConfig.PersonGeneration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PERSON_GENERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALLOW_ALL"] = 1; + values[valuesById[2] = "ALLOW_ADULT"] = 2; + values[valuesById[3] = "ALLOW_NONE"] = 3; + return values; + })(); + return ImageConfig; })(); @@ -32343,6 +33074,9 @@ * @property {google.cloud.aiplatform.v1.ISchema|null} [responseSchema] GenerationConfig responseSchema * @property {google.protobuf.IValue|null} [responseJsonSchema] GenerationConfig responseJsonSchema * @property {google.cloud.aiplatform.v1.GenerationConfig.IRoutingConfig|null} [routingConfig] GenerationConfig routingConfig + * @property {boolean|null} [audioTimestamp] GenerationConfig audioTimestamp + * @property {Array.|null} [responseModalities] GenerationConfig responseModalities + * @property {google.cloud.aiplatform.v1.GenerationConfig.MediaResolution|null} [mediaResolution] GenerationConfig mediaResolution * @property {google.cloud.aiplatform.v1.ISpeechConfig|null} [speechConfig] GenerationConfig speechConfig * @property {google.cloud.aiplatform.v1.GenerationConfig.IThinkingConfig|null} [thinkingConfig] GenerationConfig thinkingConfig * @property {google.cloud.aiplatform.v1.IImageConfig|null} [imageConfig] GenerationConfig imageConfig @@ -32358,6 +33092,7 @@ */ function GenerationConfig(properties) { this.stopSequences = []; + this.responseModalities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -32484,6 +33219,30 @@ */ GenerationConfig.prototype.routingConfig = null; + /** + * GenerationConfig audioTimestamp. + * @member {boolean|null|undefined} audioTimestamp + * @memberof google.cloud.aiplatform.v1.GenerationConfig + * @instance + */ + GenerationConfig.prototype.audioTimestamp = null; + + /** + * GenerationConfig responseModalities. + * @member {Array.} responseModalities + * @memberof google.cloud.aiplatform.v1.GenerationConfig + * @instance + */ + GenerationConfig.prototype.responseModalities = $util.emptyArray; + + /** + * GenerationConfig mediaResolution. + * @member {google.cloud.aiplatform.v1.GenerationConfig.MediaResolution|null|undefined} mediaResolution + * @memberof google.cloud.aiplatform.v1.GenerationConfig + * @instance + */ + GenerationConfig.prototype.mediaResolution = null; + /** * GenerationConfig speechConfig. * @member {google.cloud.aiplatform.v1.ISpeechConfig|null|undefined} speechConfig @@ -32589,6 +33348,18 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(GenerationConfig.prototype, "_audioTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["audioTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GenerationConfig.prototype, "_mediaResolution", { + get: $util.oneOfGetter($oneOfFields = ["mediaResolution"]), + set: $util.oneOfSetter($oneOfFields) + }); + // Virtual OneOf for proto3 optional field Object.defineProperty(GenerationConfig.prototype, "_speechConfig", { get: $util.oneOfGetter($oneOfFields = ["speechConfig"]), @@ -32654,6 +33425,16 @@ $root.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.encode(message.routingConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.responseLogprobs != null && Object.hasOwnProperty.call(message, "responseLogprobs")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.responseLogprobs); + if (message.audioTimestamp != null && Object.hasOwnProperty.call(message, "audioTimestamp")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.audioTimestamp); + if (message.responseModalities != null && message.responseModalities.length) { + writer.uint32(/* id 21, wireType 2 =*/170).fork(); + for (var i = 0; i < message.responseModalities.length; ++i) + writer.int32(message.responseModalities[i]); + writer.ldelim(); + } + if (message.mediaResolution != null && Object.hasOwnProperty.call(message, "mediaResolution")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.mediaResolution); if (message.speechConfig != null && Object.hasOwnProperty.call(message, "speechConfig")) $root.google.cloud.aiplatform.v1.SpeechConfig.encode(message.speechConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); if (message.thinkingConfig != null && Object.hasOwnProperty.call(message, "thinkingConfig")) @@ -32760,6 +33541,25 @@ message.routingConfig = $root.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.decode(reader, reader.uint32()); break; } + case 20: { + message.audioTimestamp = reader.bool(); + break; + } + case 21: { + if (!(message.responseModalities && message.responseModalities.length)) + message.responseModalities = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.responseModalities.push(reader.int32()); + } else + message.responseModalities.push(reader.int32()); + break; + } + case 22: { + message.mediaResolution = reader.int32(); + break; + } case 23: { message.speechConfig = $root.google.cloud.aiplatform.v1.SpeechConfig.decode(reader, reader.uint32()); break; @@ -32892,6 +33692,37 @@ return "routingConfig." + error; } } + if (message.audioTimestamp != null && message.hasOwnProperty("audioTimestamp")) { + properties._audioTimestamp = 1; + if (typeof message.audioTimestamp !== "boolean") + return "audioTimestamp: boolean expected"; + } + if (message.responseModalities != null && message.hasOwnProperty("responseModalities")) { + if (!Array.isArray(message.responseModalities)) + return "responseModalities: array expected"; + for (var i = 0; i < message.responseModalities.length; ++i) + switch (message.responseModalities[i]) { + default: + return "responseModalities: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.mediaResolution != null && message.hasOwnProperty("mediaResolution")) { + properties._mediaResolution = 1; + switch (message.mediaResolution) { + default: + return "mediaResolution: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } if (message.speechConfig != null && message.hasOwnProperty("speechConfig")) { properties._speechConfig = 1; { @@ -32972,6 +33803,61 @@ throw TypeError(".google.cloud.aiplatform.v1.GenerationConfig.routingConfig: object expected"); message.routingConfig = $root.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.fromObject(object.routingConfig); } + if (object.audioTimestamp != null) + message.audioTimestamp = Boolean(object.audioTimestamp); + if (object.responseModalities) { + if (!Array.isArray(object.responseModalities)) + throw TypeError(".google.cloud.aiplatform.v1.GenerationConfig.responseModalities: array expected"); + message.responseModalities = []; + for (var i = 0; i < object.responseModalities.length; ++i) + switch (object.responseModalities[i]) { + default: + if (typeof object.responseModalities[i] === "number") { + message.responseModalities[i] = object.responseModalities[i]; + break; + } + case "MODALITY_UNSPECIFIED": + case 0: + message.responseModalities[i] = 0; + break; + case "TEXT": + case 1: + message.responseModalities[i] = 1; + break; + case "IMAGE": + case 2: + message.responseModalities[i] = 2; + break; + case "AUDIO": + case 3: + message.responseModalities[i] = 3; + break; + } + } + switch (object.mediaResolution) { + default: + if (typeof object.mediaResolution === "number") { + message.mediaResolution = object.mediaResolution; + break; + } + break; + case "MEDIA_RESOLUTION_UNSPECIFIED": + case 0: + message.mediaResolution = 0; + break; + case "MEDIA_RESOLUTION_LOW": + case 1: + message.mediaResolution = 1; + break; + case "MEDIA_RESOLUTION_MEDIUM": + case 2: + message.mediaResolution = 2; + break; + case "MEDIA_RESOLUTION_HIGH": + case 3: + message.mediaResolution = 3; + break; + } if (object.speechConfig != null) { if (typeof object.speechConfig !== "object") throw TypeError(".google.cloud.aiplatform.v1.GenerationConfig.speechConfig: object expected"); @@ -33003,8 +33889,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.stopSequences = []; + object.responseModalities = []; + } if (options.defaults) { object.responseMimeType = ""; object.thinkingConfig = null; @@ -33076,6 +33964,21 @@ if (options.oneofs) object._responseLogprobs = "responseLogprobs"; } + if (message.audioTimestamp != null && message.hasOwnProperty("audioTimestamp")) { + object.audioTimestamp = message.audioTimestamp; + if (options.oneofs) + object._audioTimestamp = "audioTimestamp"; + } + if (message.responseModalities && message.responseModalities.length) { + object.responseModalities = []; + for (var j = 0; j < message.responseModalities.length; ++j) + object.responseModalities[j] = options.enums === String ? $root.google.cloud.aiplatform.v1.GenerationConfig.Modality[message.responseModalities[j]] === undefined ? message.responseModalities[j] : $root.google.cloud.aiplatform.v1.GenerationConfig.Modality[message.responseModalities[j]] : message.responseModalities[j]; + } + if (message.mediaResolution != null && message.hasOwnProperty("mediaResolution")) { + object.mediaResolution = options.enums === String ? $root.google.cloud.aiplatform.v1.GenerationConfig.MediaResolution[message.mediaResolution] === undefined ? message.mediaResolution : $root.google.cloud.aiplatform.v1.GenerationConfig.MediaResolution[message.mediaResolution] : message.mediaResolution; + if (options.oneofs) + object._mediaResolution = "mediaResolution"; + } if (message.speechConfig != null && message.hasOwnProperty("speechConfig")) { object.speechConfig = $root.google.cloud.aiplatform.v1.SpeechConfig.toObject(message.speechConfig, options); if (options.oneofs) @@ -33877,6 +34780,7 @@ * @interface IThinkingConfig * @property {boolean|null} [includeThoughts] ThinkingConfig includeThoughts * @property {number|null} [thinkingBudget] ThinkingConfig thinkingBudget + * @property {google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.ThinkingLevel|null} [thinkingLevel] ThinkingConfig thinkingLevel */ /** @@ -33910,6 +34814,14 @@ */ ThinkingConfig.prototype.thinkingBudget = null; + /** + * ThinkingConfig thinkingLevel. + * @member {google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.ThinkingLevel|null|undefined} thinkingLevel + * @memberof google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig + * @instance + */ + ThinkingConfig.prototype.thinkingLevel = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -33925,6 +34837,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(ThinkingConfig.prototype, "_thinkingLevel", { + get: $util.oneOfGetter($oneOfFields = ["thinkingLevel"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ThinkingConfig instance using the specified properties. * @function create @@ -33953,6 +34871,8 @@ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.includeThoughts); if (message.thinkingBudget != null && Object.hasOwnProperty.call(message, "thinkingBudget")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.thinkingBudget); + if (message.thinkingLevel != null && Object.hasOwnProperty.call(message, "thinkingLevel")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.thinkingLevel); return writer; }; @@ -33997,6 +34917,10 @@ message.thinkingBudget = reader.int32(); break; } + case 4: { + message.thinkingLevel = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -34043,6 +34967,19 @@ if (!$util.isInteger(message.thinkingBudget)) return "thinkingBudget: integer expected"; } + if (message.thinkingLevel != null && message.hasOwnProperty("thinkingLevel")) { + properties._thinkingLevel = 1; + switch (message.thinkingLevel) { + default: + return "thinkingLevel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } return null; }; @@ -34062,6 +34999,34 @@ message.includeThoughts = Boolean(object.includeThoughts); if (object.thinkingBudget != null) message.thinkingBudget = object.thinkingBudget | 0; + switch (object.thinkingLevel) { + default: + if (typeof object.thinkingLevel === "number") { + message.thinkingLevel = object.thinkingLevel; + break; + } + break; + case "THINKING_LEVEL_UNSPECIFIED": + case 0: + message.thinkingLevel = 0; + break; + case "LOW": + case 1: + message.thinkingLevel = 1; + break; + case "MEDIUM": + case 2: + message.thinkingLevel = 2; + break; + case "HIGH": + case 3: + message.thinkingLevel = 3; + break; + case "MINIMAL": + case 4: + message.thinkingLevel = 4; + break; + } return message; }; @@ -34088,6 +35053,11 @@ if (options.oneofs) object._thinkingBudget = "thinkingBudget"; } + if (message.thinkingLevel != null && message.hasOwnProperty("thinkingLevel")) { + object.thinkingLevel = options.enums === String ? $root.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.ThinkingLevel[message.thinkingLevel] === undefined ? message.thinkingLevel : $root.google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.ThinkingLevel[message.thinkingLevel] : message.thinkingLevel; + if (options.oneofs) + object._thinkingLevel = "thinkingLevel"; + } return object; }; @@ -34117,9 +35087,65 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig"; }; + /** + * ThinkingLevel enum. + * @name google.cloud.aiplatform.v1.GenerationConfig.ThinkingConfig.ThinkingLevel + * @enum {number} + * @property {number} THINKING_LEVEL_UNSPECIFIED=0 THINKING_LEVEL_UNSPECIFIED value + * @property {number} LOW=1 LOW value + * @property {number} MEDIUM=2 MEDIUM value + * @property {number} HIGH=3 HIGH value + * @property {number} MINIMAL=4 MINIMAL value + */ + ThinkingConfig.ThinkingLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "THINKING_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MEDIUM"] = 2; + values[valuesById[3] = "HIGH"] = 3; + values[valuesById[4] = "MINIMAL"] = 4; + return values; + })(); + return ThinkingConfig; })(); + /** + * Modality enum. + * @name google.cloud.aiplatform.v1.GenerationConfig.Modality + * @enum {number} + * @property {number} MODALITY_UNSPECIFIED=0 MODALITY_UNSPECIFIED value + * @property {number} TEXT=1 TEXT value + * @property {number} IMAGE=2 IMAGE value + * @property {number} AUDIO=3 AUDIO value + */ + GenerationConfig.Modality = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODALITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "TEXT"] = 1; + values[valuesById[2] = "IMAGE"] = 2; + values[valuesById[3] = "AUDIO"] = 3; + return values; + })(); + + /** + * MediaResolution enum. + * @name google.cloud.aiplatform.v1.GenerationConfig.MediaResolution + * @enum {number} + * @property {number} MEDIA_RESOLUTION_UNSPECIFIED=0 MEDIA_RESOLUTION_UNSPECIFIED value + * @property {number} MEDIA_RESOLUTION_LOW=1 MEDIA_RESOLUTION_LOW value + * @property {number} MEDIA_RESOLUTION_MEDIUM=2 MEDIA_RESOLUTION_MEDIUM value + * @property {number} MEDIA_RESOLUTION_HIGH=3 MEDIA_RESOLUTION_HIGH value + */ + GenerationConfig.MediaResolution = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MEDIA_RESOLUTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "MEDIA_RESOLUTION_LOW"] = 1; + values[valuesById[2] = "MEDIA_RESOLUTION_MEDIUM"] = 2; + values[valuesById[3] = "MEDIA_RESOLUTION_HIGH"] = 3; + return values; + })(); + return GenerationConfig; })(); diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 6075ef74a1c..6a923eac907 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -2944,6 +2944,38 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "mediaResolution": { + "type": "MediaResolution", + "id": 12 + } + }, + "nested": { + "MediaResolution": { + "oneofs": { + "value": { + "oneof": [ + "level" + ] + } + }, + "fields": { + "level": { + "type": "Level", + "id": 1 + } + }, + "nested": { + "Level": { + "values": { + "MEDIA_RESOLUTION_UNSPECIFIED": 0, + "MEDIA_RESOLUTION_LOW": 1, + "MEDIA_RESOLUTION_MEDIUM": 2, + "MEDIA_RESOLUTION_HIGH": 3, + "MEDIA_RESOLUTION_ULTRA_HIGH": 4 + } + } + } } } }, @@ -2998,6 +3030,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "fps": { + "type": "double", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -3111,13 +3150,36 @@ }, "ImageConfig": { "oneofs": { + "_imageOutputOptions": { + "oneof": [ + "imageOutputOptions" + ] + }, "_aspectRatio": { "oneof": [ "aspectRatio" ] + }, + "_personGeneration": { + "oneof": [ + "personGeneration" + ] + }, + "_imageSize": { + "oneof": [ + "imageSize" + ] } }, "fields": { + "imageOutputOptions": { + "type": "ImageOutputOptions", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, "aspectRatio": { "type": "string", "id": 2, @@ -3125,6 +3187,64 @@ "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } + }, + "personGeneration": { + "type": "PersonGeneration", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "imageSize": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "ImageOutputOptions": { + "oneofs": { + "_mimeType": { + "oneof": [ + "mimeType" + ] + }, + "_compressionQuality": { + "oneof": [ + "compressionQuality" + ] + } + }, + "fields": { + "mimeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "compressionQuality": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "PersonGeneration": { + "values": { + "PERSON_GENERATION_UNSPECIFIED": 0, + "ALLOW_ALL": 1, + "ALLOW_ADULT": 2, + "ALLOW_NONE": 3 + } } } }, @@ -3195,6 +3315,16 @@ "routingConfig" ] }, + "_audioTimestamp": { + "oneof": [ + "audioTimestamp" + ] + }, + "_mediaResolution": { + "oneof": [ + "mediaResolution" + ] + }, "_speechConfig": { "oneof": [ "speechConfig" @@ -3326,6 +3456,30 @@ "proto3_optional": true } }, + "audioTimestamp": { + "type": "bool", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "responseModalities": { + "rule": "repeated", + "type": "Modality", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "mediaResolution": { + "type": "MediaResolution", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, "speechConfig": { "type": "SpeechConfig", "id": 23, @@ -3430,6 +3584,11 @@ "oneof": [ "thinkingBudget" ] + }, + "_thinkingLevel": { + "oneof": [ + "thinkingLevel" + ] } }, "fields": { @@ -3448,8 +3607,43 @@ "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } + }, + "thinkingLevel": { + "type": "ThinkingLevel", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "ThinkingLevel": { + "values": { + "THINKING_LEVEL_UNSPECIFIED": 0, + "LOW": 1, + "MEDIUM": 2, + "HIGH": 3, + "MINIMAL": 4 + } } } + }, + "Modality": { + "values": { + "MODALITY_UNSPECIFIED": 0, + "TEXT": 1, + "IMAGE": 2, + "AUDIO": 3 + } + }, + "MediaResolution": { + "values": { + "MEDIA_RESOLUTION_UNSPECIFIED": 0, + "MEDIA_RESOLUTION_LOW": 1, + "MEDIA_RESOLUTION_MEDIUM": 2, + "MEDIA_RESOLUTION_HIGH": 3 + } } } },