@@ -80894,6 +80894,146 @@ public CountTokens set(String parameterName, Object value) {
8089480894 return (CountTokens) super.set(parameterName, value);
8089580895 }
8089680896 }
80897+ /**
80898+ * Embed content with multimodal inputs.
80899+ *
80900+ * Create a request for the method "models.embedContent".
80901+ *
80902+ * This request holds the parameters needed by the aiplatform server. After setting any optional
80903+ * parameters, call the {@link EmbedContent#execute()} method to invoke the remote operation.
80904+ *
80905+ * @param model Required. The name of the publisher model requested to serve the prediction. Format:
80906+ * `projects/{project}/locations/{location}/publishers/models`
80907+ * @param content the {@link com.google.api.services.aiplatform.v1.model.GoogleCloudAiplatformV1EmbedContentRequest}
80908+ * @return the request
80909+ */
80910+ public EmbedContent embedContent(java.lang.String model, com.google.api.services.aiplatform.v1.model.GoogleCloudAiplatformV1EmbedContentRequest content) throws java.io.IOException {
80911+ EmbedContent result = new EmbedContent(model, content);
80912+ initialize(result);
80913+ return result;
80914+ }
80915+
80916+ public class EmbedContent extends AiplatformRequest<com.google.api.services.aiplatform.v1.model.GoogleCloudAiplatformV1EmbedContentResponse> {
80917+
80918+ private static final String REST_PATH = "v1/{+model}:embedContent";
80919+
80920+ private final java.util.regex.Pattern MODEL_PATTERN =
80921+ java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$");
80922+
80923+ /**
80924+ * Embed content with multimodal inputs.
80925+ *
80926+ * Create a request for the method "models.embedContent".
80927+ *
80928+ * This request holds the parameters needed by the the aiplatform server. After setting any
80929+ * optional parameters, call the {@link EmbedContent#execute()} method to invoke the remote
80930+ * operation. <p> {@link
80931+ * EmbedContent#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
80932+ * must be called to initialize this instance immediately after invoking the constructor. </p>
80933+ *
80934+ * @param model Required. The name of the publisher model requested to serve the prediction. Format:
80935+ * `projects/{project}/locations/{location}/publishers/models`
80936+ * @param content the {@link com.google.api.services.aiplatform.v1.model.GoogleCloudAiplatformV1EmbedContentRequest}
80937+ * @since 1.13
80938+ */
80939+ protected EmbedContent(java.lang.String model, com.google.api.services.aiplatform.v1.model.GoogleCloudAiplatformV1EmbedContentRequest content) {
80940+ super(Aiplatform.this, "POST", REST_PATH, content, com.google.api.services.aiplatform.v1.model.GoogleCloudAiplatformV1EmbedContentResponse.class);
80941+ this.model = com.google.api.client.util.Preconditions.checkNotNull(model, "Required parameter model must be specified.");
80942+ if (!getSuppressPatternChecks()) {
80943+ com.google.api.client.util.Preconditions.checkArgument(MODEL_PATTERN.matcher(model).matches(),
80944+ "Parameter model must conform to the pattern " +
80945+ "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$");
80946+ }
80947+ }
80948+
80949+ @Override
80950+ public EmbedContent set$Xgafv(java.lang.String $Xgafv) {
80951+ return (EmbedContent) super.set$Xgafv($Xgafv);
80952+ }
80953+
80954+ @Override
80955+ public EmbedContent setAccessToken(java.lang.String accessToken) {
80956+ return (EmbedContent) super.setAccessToken(accessToken);
80957+ }
80958+
80959+ @Override
80960+ public EmbedContent setAlt(java.lang.String alt) {
80961+ return (EmbedContent) super.setAlt(alt);
80962+ }
80963+
80964+ @Override
80965+ public EmbedContent setCallback(java.lang.String callback) {
80966+ return (EmbedContent) super.setCallback(callback);
80967+ }
80968+
80969+ @Override
80970+ public EmbedContent setFields(java.lang.String fields) {
80971+ return (EmbedContent) super.setFields(fields);
80972+ }
80973+
80974+ @Override
80975+ public EmbedContent setKey(java.lang.String key) {
80976+ return (EmbedContent) super.setKey(key);
80977+ }
80978+
80979+ @Override
80980+ public EmbedContent setOauthToken(java.lang.String oauthToken) {
80981+ return (EmbedContent) super.setOauthToken(oauthToken);
80982+ }
80983+
80984+ @Override
80985+ public EmbedContent setPrettyPrint(java.lang.Boolean prettyPrint) {
80986+ return (EmbedContent) super.setPrettyPrint(prettyPrint);
80987+ }
80988+
80989+ @Override
80990+ public EmbedContent setQuotaUser(java.lang.String quotaUser) {
80991+ return (EmbedContent) super.setQuotaUser(quotaUser);
80992+ }
80993+
80994+ @Override
80995+ public EmbedContent setUploadType(java.lang.String uploadType) {
80996+ return (EmbedContent) super.setUploadType(uploadType);
80997+ }
80998+
80999+ @Override
81000+ public EmbedContent setUploadProtocol(java.lang.String uploadProtocol) {
81001+ return (EmbedContent) super.setUploadProtocol(uploadProtocol);
81002+ }
81003+
81004+ /**
81005+ * Required. The name of the publisher model requested to serve the prediction. Format:
81006+ * `projects/{project}/locations/{location}/publishers/models`
81007+ */
81008+ @com.google.api.client.util.Key
81009+ private java.lang.String model;
81010+
81011+ /** Required. The name of the publisher model requested to serve the prediction. Format:
81012+ `projects/{project}/locations/{location}/publishers/models`
81013+ */
81014+ public java.lang.String getModel() {
81015+ return model;
81016+ }
81017+
81018+ /**
81019+ * Required. The name of the publisher model requested to serve the prediction. Format:
81020+ * `projects/{project}/locations/{location}/publishers/models`
81021+ */
81022+ public EmbedContent setModel(java.lang.String model) {
81023+ if (!getSuppressPatternChecks()) {
81024+ com.google.api.client.util.Preconditions.checkArgument(MODEL_PATTERN.matcher(model).matches(),
81025+ "Parameter model must conform to the pattern " +
81026+ "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$");
81027+ }
81028+ this.model = model;
81029+ return this;
81030+ }
81031+
81032+ @Override
81033+ public EmbedContent set(String parameterName, Object value) {
81034+ return (EmbedContent) super.set(parameterName, value);
81035+ }
81036+ }
8089781037 /**
8089881038 * Fetch an asynchronous online prediction operation.
8089981039 *
0 commit comments