com.google.api.services.firebaseml.v2beta.model.GoogleCloudAiplatformV1beta1GenerateContentRequest Maven / Gradle / Ivy
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.firebaseml.v2beta.model;
/**
* Request message for [PredictionService.GenerateContent].
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Firebase ML API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class GoogleCloudAiplatformV1beta1GenerateContentRequest extends com.google.api.client.json.GenericJson {
/**
* Optional. The name of the cached content used as context to serve the prediction. Note: only
* used in explicit caching, where users can have control over caching (e.g. what content to
* cache) and enjoy guaranteed cost savings. Format:
* `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String cachedContent;
/**
* Required. The content of the current conversation with the model. For single-turn queries, this
* is a single instance. For multi-turn queries, this is a repeated field that contains
* conversation history + latest request.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List contents;
static {
// hack to force ProGuard to consider GoogleCloudAiplatformV1beta1Content used, since otherwise it would be stripped out
// see https://github.com/google/google-api-java-client/issues/543
com.google.api.client.util.Data.nullOf(GoogleCloudAiplatformV1beta1Content.class);
}
/**
* Optional. Generation config.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private GoogleCloudAiplatformV1beta1GenerationConfig generationConfig;
/**
* Optional. The labels with user-defined metadata for the request. It is used for billing and
* reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints)
* and can only contain lowercase letters, numeric characters, underscores, and dashes.
* International characters are allowed. Label values are optional. Label keys must start with a
* letter.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map labels;
/**
* Optional. Per request settings for blocking unsafe content. Enforced on
* GenerateContentResponse.candidates.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List safetySettings;
/**
* Optional. The user provided system instructions for the model. Note: only text should be used
* in parts and content in each part will be in a separate paragraph.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private GoogleCloudAiplatformV1beta1Content systemInstruction;
/**
* Optional. Tool config. This config is shared for all tools provided in the request.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private GoogleCloudAiplatformV1beta1ToolConfig toolConfig;
/**
* Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a
* piece of code that enables the system to interact with external systems to perform an action,
* or set of actions, outside of knowledge and scope of the model.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List tools;
/**
* Optional. The name of the cached content used as context to serve the prediction. Note: only
* used in explicit caching, where users can have control over caching (e.g. what content to
* cache) and enjoy guaranteed cost savings. Format:
* `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
* @return value or {@code null} for none
*/
public java.lang.String getCachedContent() {
return cachedContent;
}
/**
* Optional. The name of the cached content used as context to serve the prediction. Note: only
* used in explicit caching, where users can have control over caching (e.g. what content to
* cache) and enjoy guaranteed cost savings. Format:
* `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
* @param cachedContent cachedContent or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1GenerateContentRequest setCachedContent(java.lang.String cachedContent) {
this.cachedContent = cachedContent;
return this;
}
/**
* Required. The content of the current conversation with the model. For single-turn queries, this
* is a single instance. For multi-turn queries, this is a repeated field that contains
* conversation history + latest request.
* @return value or {@code null} for none
*/
public java.util.List getContents() {
return contents;
}
/**
* Required. The content of the current conversation with the model. For single-turn queries, this
* is a single instance. For multi-turn queries, this is a repeated field that contains
* conversation history + latest request.
* @param contents contents or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1GenerateContentRequest setContents(java.util.List contents) {
this.contents = contents;
return this;
}
/**
* Optional. Generation config.
* @return value or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1GenerationConfig getGenerationConfig() {
return generationConfig;
}
/**
* Optional. Generation config.
* @param generationConfig generationConfig or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1GenerateContentRequest setGenerationConfig(GoogleCloudAiplatformV1beta1GenerationConfig generationConfig) {
this.generationConfig = generationConfig;
return this;
}
/**
* Optional. The labels with user-defined metadata for the request. It is used for billing and
* reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints)
* and can only contain lowercase letters, numeric characters, underscores, and dashes.
* International characters are allowed. Label values are optional. Label keys must start with a
* letter.
* @return value or {@code null} for none
*/
public java.util.Map getLabels() {
return labels;
}
/**
* Optional. The labels with user-defined metadata for the request. It is used for billing and
* reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints)
* and can only contain lowercase letters, numeric characters, underscores, and dashes.
* International characters are allowed. Label values are optional. Label keys must start with a
* letter.
* @param labels labels or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1GenerateContentRequest setLabels(java.util.Map labels) {
this.labels = labels;
return this;
}
/**
* Optional. Per request settings for blocking unsafe content. Enforced on
* GenerateContentResponse.candidates.
* @return value or {@code null} for none
*/
public java.util.List getSafetySettings() {
return safetySettings;
}
/**
* Optional. Per request settings for blocking unsafe content. Enforced on
* GenerateContentResponse.candidates.
* @param safetySettings safetySettings or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1GenerateContentRequest setSafetySettings(java.util.List safetySettings) {
this.safetySettings = safetySettings;
return this;
}
/**
* Optional. The user provided system instructions for the model. Note: only text should be used
* in parts and content in each part will be in a separate paragraph.
* @return value or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1Content getSystemInstruction() {
return systemInstruction;
}
/**
* Optional. The user provided system instructions for the model. Note: only text should be used
* in parts and content in each part will be in a separate paragraph.
* @param systemInstruction systemInstruction or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1GenerateContentRequest setSystemInstruction(GoogleCloudAiplatformV1beta1Content systemInstruction) {
this.systemInstruction = systemInstruction;
return this;
}
/**
* Optional. Tool config. This config is shared for all tools provided in the request.
* @return value or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1ToolConfig getToolConfig() {
return toolConfig;
}
/**
* Optional. Tool config. This config is shared for all tools provided in the request.
* @param toolConfig toolConfig or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1GenerateContentRequest setToolConfig(GoogleCloudAiplatformV1beta1ToolConfig toolConfig) {
this.toolConfig = toolConfig;
return this;
}
/**
* Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a
* piece of code that enables the system to interact with external systems to perform an action,
* or set of actions, outside of knowledge and scope of the model.
* @return value or {@code null} for none
*/
public java.util.List getTools() {
return tools;
}
/**
* Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a
* piece of code that enables the system to interact with external systems to perform an action,
* or set of actions, outside of knowledge and scope of the model.
* @param tools tools or {@code null} for none
*/
public GoogleCloudAiplatformV1beta1GenerateContentRequest setTools(java.util.List tools) {
this.tools = tools;
return this;
}
@Override
public GoogleCloudAiplatformV1beta1GenerateContentRequest set(String fieldName, Object value) {
return (GoogleCloudAiplatformV1beta1GenerateContentRequest) super.set(fieldName, value);
}
@Override
public GoogleCloudAiplatformV1beta1GenerateContentRequest clone() {
return (GoogleCloudAiplatformV1beta1GenerateContentRequest) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy