diff --git a/generation_config.yaml b/generation_config.yaml index 2a237bba5603..6bf1a0f4e627 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ -gapic_generator_version: 2.52.0 -googleapis_commitish: 04132de0b952ee921d91a2583915dbd82d10cd3c +gapic_generator_version: 2.53.0 +googleapis_commitish: 9605bff3d36fbdb1227b26bce68258c5f00815e4 libraries_bom_version: 26.54.0 # the libraries are ordered with respect to library name, which is diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java index ab4b6e162fe5..6e1615e743ae 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java @@ -48,6 +48,7 @@ import com.google.protobuf.Any; import com.google.protobuf.ByteString; import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; import com.google.protobuf.Value; import io.grpc.StatusRuntimeException; import java.io.IOException; @@ -878,6 +879,8 @@ public void generateContentTest() throws Exception { GenerateContentResponse.newBuilder() .addAllCandidates(new ArrayList()) .setModelVersion("modelVersion212437359") + .setCreateTime(Timestamp.newBuilder().build()) + .setResponseId("responseId-633138884") .setPromptFeedback(GenerateContentResponse.PromptFeedback.newBuilder().build()) .setUsageMetadata(GenerateContentResponse.UsageMetadata.newBuilder().build()) .build(); @@ -922,6 +925,8 @@ public void streamGenerateContentTest() throws Exception { GenerateContentResponse.newBuilder() .addAllCandidates(new ArrayList()) .setModelVersion("modelVersion212437359") + .setCreateTime(Timestamp.newBuilder().build()) + .setResponseId("responseId-633138884") .setPromptFeedback(GenerateContentResponse.PromptFeedback.newBuilder().build()) .setUsageMetadata(GenerateContentResponse.UsageMetadata.newBuilder().build()) .build(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponse.java index c3815fe745d5..ad7093199cec 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponse.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponse.java @@ -41,6 +41,7 @@ private GenerateContentResponse(com.google.protobuf.GeneratedMessageV3.Builder + * Output only. Timestamp when the request is made to the server. + * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Timestamp when the request is made to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when the request is made to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int RESPONSE_ID_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object responseId_ = ""; + /** + * + * + *
+   * Output only. response_id is used to identify each response. It is the
+   * encoding of the event_id.
+   * 
+ * + * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The responseId. + */ + @java.lang.Override + public java.lang.String getResponseId() { + java.lang.Object ref = responseId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. response_id is used to identify each response. It is the
+   * encoding of the event_id.
+   * 
+ * + * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for responseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResponseIdBytes() { + java.lang.Object ref = responseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int PROMPT_FEEDBACK_FIELD_NUMBER = 3; private com.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback promptFeedback_; /** @@ -4683,7 +4786,7 @@ public com.google.protobuf.ByteString getModelVersionBytes() { */ @java.lang.Override public boolean hasPromptFeedback() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -4743,7 +4846,7 @@ public com.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback get */ @java.lang.Override public boolean hasUsageMetadata() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -4798,15 +4901,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < candidates_.size(); i++) { output.writeMessage(2, candidates_.get(i)); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getPromptFeedback()); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(4, getUsageMetadata()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersion_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, modelVersion_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(12, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, responseId_); + } getUnknownFields().writeTo(output); } @@ -4819,15 +4928,21 @@ public int getSerializedSize() { for (int i = 0; i < candidates_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, candidates_.get(i)); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPromptFeedback()); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUsageMetadata()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, modelVersion_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, responseId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4846,6 +4961,11 @@ public boolean equals(final java.lang.Object obj) { if (!getCandidatesList().equals(other.getCandidatesList())) return false; if (!getModelVersion().equals(other.getModelVersion())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getResponseId().equals(other.getResponseId())) return false; if (hasPromptFeedback() != other.hasPromptFeedback()) return false; if (hasPromptFeedback()) { if (!getPromptFeedback().equals(other.getPromptFeedback())) return false; @@ -4871,6 +4991,12 @@ public int hashCode() { } hash = (37 * hash) + MODEL_VERSION_FIELD_NUMBER; hash = (53 * hash) + getModelVersion().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + RESPONSE_ID_FIELD_NUMBER; + hash = (53 * hash) + getResponseId().hashCode(); if (hasPromptFeedback()) { hash = (37 * hash) + PROMPT_FEEDBACK_FIELD_NUMBER; hash = (53 * hash) + getPromptFeedback().hashCode(); @@ -5021,6 +5147,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getCandidatesFieldBuilder(); + getCreateTimeFieldBuilder(); getPromptFeedbackFieldBuilder(); getUsageMetadataFieldBuilder(); } @@ -5038,6 +5165,12 @@ public Builder clear() { } bitField0_ = (bitField0_ & ~0x00000001); modelVersion_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + responseId_ = ""; promptFeedback_ = null; if (promptFeedbackBuilder_ != null) { promptFeedbackBuilder_.dispose(); @@ -5103,14 +5236,21 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.GenerateContentRespons } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { - result.promptFeedback_ = - promptFeedbackBuilder_ == null ? promptFeedback_ : promptFeedbackBuilder_.build(); + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { + result.responseId_ = responseId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.promptFeedback_ = + promptFeedbackBuilder_ == null ? promptFeedback_ : promptFeedbackBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { result.usageMetadata_ = usageMetadataBuilder_ == null ? usageMetadata_ : usageMetadataBuilder_.build(); - to_bitField0_ |= 0x00000002; + to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; } @@ -5193,6 +5333,14 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.GenerateContentResponse bitField0_ |= 0x00000002; onChanged(); } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.getResponseId().isEmpty()) { + responseId_ = other.responseId_; + bitField0_ |= 0x00000008; + onChanged(); + } if (other.hasPromptFeedback()) { mergePromptFeedback(other.getPromptFeedback()); } @@ -5241,13 +5389,13 @@ public Builder mergeFrom( case 26: { input.readMessage(getPromptFeedbackFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; break; } // case 26 case 34: { input.readMessage(getUsageMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; break; } // case 34 case 90: @@ -5256,6 +5404,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 90 + case 98: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 98 + case 106: + { + responseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5767,6 +5927,320 @@ public Builder setModelVersionBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when the request is made to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Timestamp when the request is made to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when the request is made to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the request is made to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the request is made to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the request is made to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Timestamp when the request is made to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when the request is made to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when the request is made to the server.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private java.lang.Object responseId_ = ""; + /** + * + * + *
+     * Output only. response_id is used to identify each response. It is the
+     * encoding of the event_id.
+     * 
+ * + * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The responseId. + */ + public java.lang.String getResponseId() { + java.lang.Object ref = responseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. response_id is used to identify each response. It is the
+     * encoding of the event_id.
+     * 
+ * + * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for responseId. + */ + public com.google.protobuf.ByteString getResponseIdBytes() { + java.lang.Object ref = responseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. response_id is used to identify each response. It is the
+     * encoding of the event_id.
+     * 
+ * + * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The responseId to set. + * @return This builder for chaining. + */ + public Builder setResponseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + responseId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. response_id is used to identify each response. It is the
+     * encoding of the event_id.
+     * 
+ * + * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearResponseId() { + responseId_ = getDefaultInstance().getResponseId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. response_id is used to identify each response. It is the
+     * encoding of the event_id.
+     * 
+ * + * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for responseId to set. + * @return This builder for chaining. + */ + public Builder setResponseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + responseId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + private com.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback promptFeedback_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback, @@ -5789,7 +6263,7 @@ public Builder setModelVersionBytes(com.google.protobuf.ByteString value) { * @return Whether the promptFeedback field is set. */ public boolean hasPromptFeedback() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -5840,7 +6314,7 @@ public Builder setPromptFeedback( } else { promptFeedbackBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -5865,7 +6339,7 @@ public Builder setPromptFeedback( } else { promptFeedbackBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -5885,7 +6359,7 @@ public Builder setPromptFeedback( public Builder mergePromptFeedback( com.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback value) { if (promptFeedbackBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000010) != 0) && promptFeedback_ != null && promptFeedback_ != com.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback @@ -5898,7 +6372,7 @@ public Builder mergePromptFeedback( promptFeedbackBuilder_.mergeFrom(value); } if (promptFeedback_ != null) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); } return this; @@ -5917,7 +6391,7 @@ public Builder mergePromptFeedback( * */ public Builder clearPromptFeedback() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); promptFeedback_ = null; if (promptFeedbackBuilder_ != null) { promptFeedbackBuilder_.dispose(); @@ -5941,7 +6415,7 @@ public Builder clearPromptFeedback() { */ public com.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.Builder getPromptFeedbackBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); return getPromptFeedbackFieldBuilder().getBuilder(); } @@ -6018,7 +6492,7 @@ public Builder clearPromptFeedback() { * @return Whether the usageMetadata field is set. */ public boolean hasUsageMetadata() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -6062,7 +6536,7 @@ public Builder setUsageMetadata( } else { usageMetadataBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -6084,7 +6558,7 @@ public Builder setUsageMetadata( } else { usageMetadataBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -6101,7 +6575,7 @@ public Builder setUsageMetadata( public Builder mergeUsageMetadata( com.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata value) { if (usageMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000020) != 0) && usageMetadata_ != null && usageMetadata_ != com.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata @@ -6114,7 +6588,7 @@ public Builder mergeUsageMetadata( usageMetadataBuilder_.mergeFrom(value); } if (usageMetadata_ != null) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); } return this; @@ -6130,7 +6604,7 @@ public Builder mergeUsageMetadata( * */ public Builder clearUsageMetadata() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); usageMetadata_ = null; if (usageMetadataBuilder_ != null) { usageMetadataBuilder_.dispose(); @@ -6151,7 +6625,7 @@ public Builder clearUsageMetadata() { */ public com.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata.Builder getUsageMetadataBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return getUsageMetadataFieldBuilder().getBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponseOrBuilder.java index 5e414711a935..e0df821f0ca8 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponseOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GenerateContentResponseOrBuilder.java @@ -111,6 +111,71 @@ public interface GenerateContentResponseOrBuilder */ com.google.protobuf.ByteString getModelVersionBytes(); + /** + * + * + *
+   * Output only. Timestamp when the request is made to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when the request is made to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when the request is made to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. response_id is used to identify each response. It is the
+   * encoding of the event_id.
+   * 
+ * + * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The responseId. + */ + java.lang.String getResponseId(); + /** + * + * + *
+   * Output only. response_id is used to identify each response. It is the
+   * encoding of the event_id.
+   * 
+ * + * string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for responseId. + */ + com.google.protobuf.ByteString getResponseIdBytes(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java index c28adb6359f7..65096678b143 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java @@ -147,222 +147,225 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "aiplatform/v1/explanation.proto\032%google/" + "cloud/aiplatform/v1/tool.proto\032&google/c" + "loud/aiplatform/v1/types.proto\032\034google/p" - + "rotobuf/struct.proto\"\252\001\n\016PredictRequest\022" - + "<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.go" - + "ogleapis.com/Endpoint\022.\n\tinstances\030\002 \003(\013" - + "2\026.google.protobuf.ValueB\003\340A\002\022*\n\nparamet" - + "ers\030\003 \001(\0132\026.google.protobuf.Value\"\200\002\n\017Pr" - + "edictResponse\022+\n\013predictions\030\001 \003(\0132\026.goo" - + "gle.protobuf.Value\022\031\n\021deployed_model_id\030" - + "\002 \001(\t\0226\n\005model\030\003 \001(\tB\'\340A\003\372A!\n\037aiplatform" - + ".googleapis.com/Model\022\035\n\020model_version_i" - + "d\030\005 \001(\tB\003\340A\003\022\037\n\022model_display_name\030\004 \001(\t" - + "B\003\340A\003\022-\n\010metadata\030\006 \001(\0132\026.google.protobu" - + "f.ValueB\003\340A\003\"z\n\021RawPredictRequest\022<\n\010end" - + "point\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleap" - + "is.com/Endpoint\022\'\n\thttp_body\030\002 \001(\0132\024.goo" - + "gle.api.HttpBody\"\200\001\n\027StreamRawPredictReq" - + "uest\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatfo" - + "rm.googleapis.com/Endpoint\022\'\n\thttp_body\030" - + "\002 \001(\0132\024.google.api.HttpBody\"\300\001\n\024DirectPr" - + "edictRequest\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"" - + "aiplatform.googleapis.com/Endpoint\0222\n\006in" - + "puts\030\002 \003(\0132\".google.cloud.aiplatform.v1." - + "Tensor\0226\n\nparameters\030\003 \001(\0132\".google.clou" - + "d.aiplatform.v1.Tensor\"\204\001\n\025DirectPredict" - + "Response\0223\n\007outputs\030\001 \003(\0132\".google.cloud" - + ".aiplatform.v1.Tensor\0226\n\nparameters\030\002 \001(" - + "\0132\".google.cloud.aiplatform.v1.Tensor\"{\n" - + "\027DirectRawPredictRequest\022<\n\010endpoint\030\001 \001" - + "(\tB*\340A\002\372A$\n\"aiplatform.googleapis.com/En" - + "dpoint\022\023\n\013method_name\030\002 \001(\t\022\r\n\005input\030\003 \001" - + "(\014\"*\n\030DirectRawPredictResponse\022\016\n\006output" - + "\030\001 \001(\014\"\320\001\n\032StreamDirectPredictRequest\022<\n" - + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.goog" - + "leapis.com/Endpoint\0227\n\006inputs\030\002 \003(\0132\".go" - + "ogle.cloud.aiplatform.v1.TensorB\003\340A\001\022;\n\n" - + "parameters\030\003 \001(\0132\".google.cloud.aiplatfo" - + "rm.v1.TensorB\003\340A\001\"\212\001\n\033StreamDirectPredic" - + "tResponse\0223\n\007outputs\030\001 \003(\0132\".google.clou" - + "d.aiplatform.v1.Tensor\0226\n\nparameters\030\002 \001" - + "(\0132\".google.cloud.aiplatform.v1.Tensor\"\213" - + "\001\n\035StreamDirectRawPredictRequest\022<\n\010endp" + + "rotobuf/struct.proto\032\037google/protobuf/ti" + + "mestamp.proto\"\252\001\n\016PredictRequest\022<\n\010endp" + "oint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleapi" - + "s.com/Endpoint\022\030\n\013method_name\030\002 \001(\tB\003\340A\001" - + "\022\022\n\005input\030\003 \001(\014B\003\340A\001\"0\n\036StreamDirectRawP" - + "redictResponse\022\016\n\006output\030\001 \001(\014\"\303\001\n\027Strea" - + "mingPredictRequest\022<\n\010endpoint\030\001 \001(\tB*\340A" - + "\002\372A$\n\"aiplatform.googleapis.com/Endpoint" - + "\0222\n\006inputs\030\002 \003(\0132\".google.cloud.aiplatfo" - + "rm.v1.Tensor\0226\n\nparameters\030\003 \001(\0132\".googl" - + "e.cloud.aiplatform.v1.Tensor\"\207\001\n\030Streami" - + "ngPredictResponse\0223\n\007outputs\030\001 \003(\0132\".goo" - + "gle.cloud.aiplatform.v1.Tensor\0226\n\nparame" - + "ters\030\002 \001(\0132\".google.cloud.aiplatform.v1." - + "Tensor\"~\n\032StreamingRawPredictRequest\022<\n\010" - + "endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googl" - + "eapis.com/Endpoint\022\023\n\013method_name\030\002 \001(\t\022" - + "\r\n\005input\030\003 \001(\014\"-\n\033StreamingRawPredictRes" - + "ponse\022\016\n\006output\030\001 \001(\014\"\235\002\n\016ExplainRequest" + + "s.com/Endpoint\022.\n\tinstances\030\002 \003(\0132\026.goog" + + "le.protobuf.ValueB\003\340A\002\022*\n\nparameters\030\003 \001" + + "(\0132\026.google.protobuf.Value\"\200\002\n\017PredictRe" + + "sponse\022+\n\013predictions\030\001 \003(\0132\026.google.pro" + + "tobuf.Value\022\031\n\021deployed_model_id\030\002 \001(\t\0226" + + "\n\005model\030\003 \001(\tB\'\340A\003\372A!\n\037aiplatform.google" + + "apis.com/Model\022\035\n\020model_version_id\030\005 \001(\t" + + "B\003\340A\003\022\037\n\022model_display_name\030\004 \001(\tB\003\340A\003\022-" + + "\n\010metadata\030\006 \001(\0132\026.google.protobuf.Value" + + "B\003\340A\003\"z\n\021RawPredictRequest\022<\n\010endpoint\030\001" + + " \001(\tB*\340A\002\372A$\n\"aiplatform.googleapis.com/" + + "Endpoint\022\'\n\thttp_body\030\002 \001(\0132\024.google.api" + + ".HttpBody\"\200\001\n\027StreamRawPredictRequest\022<\n" + + "\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.goog" + + "leapis.com/Endpoint\022\'\n\thttp_body\030\002 \001(\0132\024" + + ".google.api.HttpBody\"\300\001\n\024DirectPredictRe" + + "quest\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatf" + + "orm.googleapis.com/Endpoint\0222\n\006inputs\030\002 " + + "\003(\0132\".google.cloud.aiplatform.v1.Tensor\022" + + "6\n\nparameters\030\003 \001(\0132\".google.cloud.aipla" + + "tform.v1.Tensor\"\204\001\n\025DirectPredictRespons" + + "e\0223\n\007outputs\030\001 \003(\0132\".google.cloud.aiplat" + + "form.v1.Tensor\0226\n\nparameters\030\002 \001(\0132\".goo" + + "gle.cloud.aiplatform.v1.Tensor\"{\n\027Direct" + + "RawPredictRequest\022<\n\010endpoint\030\001 \001(\tB*\340A\002" + + "\372A$\n\"aiplatform.googleapis.com/Endpoint\022" + + "\023\n\013method_name\030\002 \001(\t\022\r\n\005input\030\003 \001(\014\"*\n\030D" + + "irectRawPredictResponse\022\016\n\006output\030\001 \001(\014\"" + + "\320\001\n\032StreamDirectPredictRequest\022<\n\010endpoi" + + "nt\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleapis." + + "com/Endpoint\0227\n\006inputs\030\002 \003(\0132\".google.cl" + + "oud.aiplatform.v1.TensorB\003\340A\001\022;\n\nparamet" + + "ers\030\003 \001(\0132\".google.cloud.aiplatform.v1.T" + + "ensorB\003\340A\001\"\212\001\n\033StreamDirectPredictRespon" + + "se\0223\n\007outputs\030\001 \003(\0132\".google.cloud.aipla" + + "tform.v1.Tensor\0226\n\nparameters\030\002 \001(\0132\".go" + + "ogle.cloud.aiplatform.v1.Tensor\"\213\001\n\035Stre" + + "amDirectRawPredictRequest\022<\n\010endpoint\030\001 " + + "\001(\tB*\340A\002\372A$\n\"aiplatform.googleapis.com/E" + + "ndpoint\022\030\n\013method_name\030\002 \001(\tB\003\340A\001\022\022\n\005inp" + + "ut\030\003 \001(\014B\003\340A\001\"0\n\036StreamDirectRawPredictR" + + "esponse\022\016\n\006output\030\001 \001(\014\"\303\001\n\027StreamingPre" + + "dictRequest\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"a" + + "iplatform.googleapis.com/Endpoint\0222\n\006inp" + + "uts\030\002 \003(\0132\".google.cloud.aiplatform.v1.T" + + "ensor\0226\n\nparameters\030\003 \001(\0132\".google.cloud" + + ".aiplatform.v1.Tensor\"\207\001\n\030StreamingPredi" + + "ctResponse\0223\n\007outputs\030\001 \003(\0132\".google.clo" + + "ud.aiplatform.v1.Tensor\0226\n\nparameters\030\002 " + + "\001(\0132\".google.cloud.aiplatform.v1.Tensor\"" + + "~\n\032StreamingRawPredictRequest\022<\n\010endpoin" + + "t\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleapis.c" + + "om/Endpoint\022\023\n\013method_name\030\002 \001(\t\022\r\n\005inpu" + + "t\030\003 \001(\014\"-\n\033StreamingRawPredictResponse\022\016" + + "\n\006output\030\001 \001(\014\"\235\002\n\016ExplainRequest\022<\n\010end" + + "point\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleap" + + "is.com/Endpoint\022.\n\tinstances\030\002 \003(\0132\026.goo" + + "gle.protobuf.ValueB\003\340A\002\022*\n\nparameters\030\004 " + + "\001(\0132\026.google.protobuf.Value\022V\n\031explanati" + + "on_spec_override\030\005 \001(\01323.google.cloud.ai" + + "platform.v1.ExplanationSpecOverride\022\031\n\021d" + + "eployed_model_id\030\003 \001(\t\"\230\001\n\017ExplainRespon" + + "se\022=\n\014explanations\030\001 \003(\0132\'.google.cloud." + + "aiplatform.v1.Explanation\022\031\n\021deployed_mo" + + "del_id\030\002 \001(\t\022+\n\013predictions\030\003 \003(\0132\026.goog" + + "le.protobuf.Value\"\323\003\n\022CountTokensRequest" + "\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.g" - + "oogleapis.com/Endpoint\022.\n\tinstances\030\002 \003(" - + "\0132\026.google.protobuf.ValueB\003\340A\002\022*\n\nparame" - + "ters\030\004 \001(\0132\026.google.protobuf.Value\022V\n\031ex" - + "planation_spec_override\030\005 \001(\01323.google.c" - + "loud.aiplatform.v1.ExplanationSpecOverri" - + "de\022\031\n\021deployed_model_id\030\003 \001(\t\"\230\001\n\017Explai" - + "nResponse\022=\n\014explanations\030\001 \003(\0132\'.google" - + ".cloud.aiplatform.v1.Explanation\022\031\n\021depl" - + "oyed_model_id\030\002 \001(\t\022+\n\013predictions\030\003 \003(\013" - + "2\026.google.protobuf.Value\"\323\003\n\022CountTokens" - + "Request\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aipla" - + "tform.googleapis.com/Endpoint\022\022\n\005model\030\003" - + " \001(\tB\003\340A\001\022.\n\tinstances\030\002 \003(\0132\026.google.pr" - + "otobuf.ValueB\003\340A\001\022:\n\010contents\030\004 \003(\0132#.go" - + "ogle.cloud.aiplatform.v1.ContentB\003\340A\001\022I\n" - + "\022system_instruction\030\005 \001(\0132#.google.cloud" - + ".aiplatform.v1.ContentB\003\340A\001H\000\210\001\001\0224\n\005tool" - + "s\030\006 \003(\0132 .google.cloud.aiplatform.v1.Too" - + "lB\003\340A\001\022Q\n\021generation_config\030\007 \001(\0132,.goog" - + "le.cloud.aiplatform.v1.GenerationConfigB" - + "\003\340A\001H\001\210\001\001B\025\n\023_system_instructionB\024\n\022_gen" - + "eration_config\"\242\001\n\023CountTokensResponse\022\024" - + "\n\014total_tokens\030\001 \001(\005\022!\n\031total_billable_c" - + "haracters\030\002 \001(\005\022R\n\025prompt_tokens_details" - + "\030\003 \003(\0132..google.cloud.aiplatform.v1.Moda" - + "lityTokenCountB\003\340A\003\"\246\005\n\026GenerateContentR" - + "equest\022\022\n\005model\030\005 \001(\tB\003\340A\002\022:\n\010contents\030\002" - + " \003(\0132#.google.cloud.aiplatform.v1.Conten" - + "tB\003\340A\002\022I\n\022system_instruction\030\010 \001(\0132#.goo" - + "gle.cloud.aiplatform.v1.ContentB\003\340A\001H\000\210\001" - + "\001\022G\n\016cached_content\030\t \001(\tB/\340A\001\372A)\n\'aipla" - + "tform.googleapis.com/CachedContent\0224\n\005to" - + "ols\030\006 \003(\0132 .google.cloud.aiplatform.v1.T" - + "oolB\003\340A\001\022@\n\013tool_config\030\007 \001(\0132&.google.c" - + "loud.aiplatform.v1.ToolConfigB\003\340A\001\022S\n\006la" - + "bels\030\n \003(\0132>.google.cloud.aiplatform.v1." - + "GenerateContentRequest.LabelsEntryB\003\340A\001\022" - + "G\n\017safety_settings\030\003 \003(\0132).google.cloud." - + "aiplatform.v1.SafetySettingB\003\340A\001\022L\n\021gene" - + "ration_config\030\004 \001(\0132,.google.cloud.aipla" - + "tform.v1.GenerationConfigB\003\340A\001\032-\n\013Labels" - + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\025\n" - + "\023_system_instruction\"\234\010\n\027GenerateContent" - + "Response\022>\n\ncandidates\030\002 \003(\0132%.google.cl" - + "oud.aiplatform.v1.CandidateB\003\340A\003\022\032\n\rmode" - + "l_version\030\013 \001(\tB\003\340A\003\022`\n\017prompt_feedback\030" - + "\003 \001(\0132B.google.cloud.aiplatform.v1.Gener" - + "ateContentResponse.PromptFeedbackB\003\340A\003\022Y" - + "\n\016usage_metadata\030\004 \001(\0132A.google.cloud.ai" - + "platform.v1.GenerateContentResponse.Usag" - + "eMetadata\032\326\002\n\016PromptFeedback\022k\n\014block_re" - + "ason\030\001 \001(\0162P.google.cloud.aiplatform.v1." - + "GenerateContentResponse.PromptFeedback.B" - + "lockedReasonB\003\340A\003\022E\n\016safety_ratings\030\002 \003(" - + "\0132(.google.cloud.aiplatform.v1.SafetyRat" - + "ingB\003\340A\003\022!\n\024block_reason_message\030\003 \001(\tB\003" - + "\340A\003\"m\n\rBlockedReason\022\036\n\032BLOCKED_REASON_U" - + "NSPECIFIED\020\000\022\n\n\006SAFETY\020\001\022\t\n\005OTHER\020\002\022\r\n\tB" - + "LOCKLIST\020\003\022\026\n\022PROHIBITED_CONTENT\020\004\032\216\003\n\rU" - + "sageMetadata\022\032\n\022prompt_token_count\030\001 \001(\005" - + "\022\036\n\026candidates_token_count\030\002 \001(\005\022\031\n\021tota" - + "l_token_count\030\003 \001(\005\022\'\n\032cached_content_to" - + "ken_count\030\005 \001(\005B\003\340A\003\022R\n\025prompt_tokens_de" - + "tails\030\t \003(\0132..google.cloud.aiplatform.v1" - + ".ModalityTokenCountB\003\340A\003\022Q\n\024cache_tokens" - + "_details\030\n \003(\0132..google.cloud.aiplatform" - + ".v1.ModalityTokenCountB\003\340A\003\022V\n\031candidate" - + "s_tokens_details\030\013 \003(\0132..google.cloud.ai" - + "platform.v1.ModalityTokenCountB\003\340A\0032\362\031\n\021" - + "PredictionService\022\224\002\n\007Predict\022*.google.c" - + "loud.aiplatform.v1.PredictRequest\032+.goog" - + "le.cloud.aiplatform.v1.PredictResponse\"\257" - + "\001\332A\035endpoint,instances,parameters\202\323\344\223\002\210\001" - + "\"9/v1/{endpoint=projects/*/locations/*/e" - + "ndpoints/*}:predict:\001*ZH\"C/v1/{endpoint=" - + "projects/*/locations/*/publishers/*/mode" - + "ls/*}:predict:\001*\022\376\001\n\nRawPredict\022-.google" - + ".cloud.aiplatform.v1.RawPredictRequest\032\024" - + ".google.api.HttpBody\"\252\001\332A\022endpoint,http_" - + "body\202\323\344\223\002\216\001\".google.cloud.aiplatform.v1.Generat" + + "eContentRequest.LabelsEntryB\003\340A\001\022G\n\017safe" + + "ty_settings\030\003 \003(\0132).google.cloud.aiplatf" + + "orm.v1.SafetySettingB\003\340A\001\022L\n\021generation_" + + "config\030\004 \001(\0132,.google.cloud.aiplatform.v" + + "1.GenerationConfigB\003\340A\001\032-\n\013LabelsEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\025\n\023_syste" + + "m_instruction\"\354\010\n\027GenerateContentRespons" + + "e\022>\n\ncandidates\030\002 \003(\0132%.google.cloud.aip" + + "latform.v1.CandidateB\003\340A\003\022\032\n\rmodel_versi" + + "on\030\013 \001(\tB\003\340A\003\0224\n\013create_time\030\014 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\022\030\n\013response_" + + "id\030\r \001(\tB\003\340A\003\022`\n\017prompt_feedback\030\003 \001(\0132B" + + ".google.cloud.aiplatform.v1.GenerateCont" + + "entResponse.PromptFeedbackB\003\340A\003\022Y\n\016usage" + + "_metadata\030\004 \001(\0132A.google.cloud.aiplatfor" + + "m.v1.GenerateContentResponse.UsageMetada" + + "ta\032\326\002\n\016PromptFeedback\022k\n\014block_reason\030\001 " + + "\001(\0162P.google.cloud.aiplatform.v1.Generat" + + "eContentResponse.PromptFeedback.BlockedR" + + "easonB\003\340A\003\022E\n\016safety_ratings\030\002 \003(\0132(.goo" + + "gle.cloud.aiplatform.v1.SafetyRatingB\003\340A" + + "\003\022!\n\024block_reason_message\030\003 \001(\tB\003\340A\003\"m\n\r" + + "BlockedReason\022\036\n\032BLOCKED_REASON_UNSPECIF" + + "IED\020\000\022\n\n\006SAFETY\020\001\022\t\n\005OTHER\020\002\022\r\n\tBLOCKLIS" + + "T\020\003\022\026\n\022PROHIBITED_CONTENT\020\004\032\216\003\n\rUsageMet" + + "adata\022\032\n\022prompt_token_count\030\001 \001(\005\022\036\n\026can" + + "didates_token_count\030\002 \001(\005\022\031\n\021total_token" + + "_count\030\003 \001(\005\022\'\n\032cached_content_token_cou" + + "nt\030\005 \001(\005B\003\340A\003\022R\n\025prompt_tokens_details\030\t" + + " \003(\0132..google.cloud.aiplatform.v1.Modali" + + "tyTokenCountB\003\340A\003\022Q\n\024cache_tokens_detail" + + "s\030\n \003(\0132..google.cloud.aiplatform.v1.Mod" + + "alityTokenCountB\003\340A\003\022V\n\031candidates_token" + + "s_details\030\013 \003(\0132..google.cloud.aiplatfor" + + "m.v1.ModalityTokenCountB\003\340A\0032\362\031\n\021Predict" + + "ionService\022\224\002\n\007Predict\022*.google.cloud.ai" + + "platform.v1.PredictRequest\032+.google.clou" + + "d.aiplatform.v1.PredictResponse\"\257\001\332A\035end" + + "point,instances,parameters\202\323\344\223\002\210\001\"9/v1/{" + + "endpoint=projects/*/locations/*/endpoint" + + "s/*}:predict:\001*ZH\"C/v1/{endpoint=project" + + "s/*/locations/*/publishers/*/models/*}:p" + + "redict:\001*\022\376\001\n\nRawPredict\022-.google.cloud." + + "aiplatform.v1.RawPredictRequest\032\024.google" + + ".api.HttpBody\"\252\001\332A\022endpoint,http_body\202\323\344" + + "\223\002\216\001\"\"9/v1/{endpoint=projects/*/locations/*/" - + "endpoints/*}:explain:\001*\022\215\003\n\017GenerateCont" - + "ent\0222.google.cloud.aiplatform.v1.Generat" - + "eContentRequest\0323.google.cloud.aiplatfor" - + "m.v1.GenerateContentResponse\"\220\002\332A\016model," - + "contents\202\323\344\223\002\370\001\">/v1/{model=projects/*/l" - + "ocations/*/endpoints/*}:generateContent:" - + "\001*ZM\"H/v1/{model=projects/*/locations/*/" - + "publishers/*/models/*}:generateContent:\001" - + "*Z,\"\'/v1/{model=endpoints/*}:generateCon" - + "tent:\001*Z6\"1/v1/{model=publishers/*/model" - + "s/*}:generateContent:\001*\022\255\003\n\025StreamGenera" - + "teContent\0222.google.cloud.aiplatform.v1.G" - + "enerateContentRequest\0323.google.cloud.aip" - + "latform.v1.GenerateContentResponse\"\250\002\332A\016" - + "model,contents\202\323\344\223\002\220\002\"D/v1/{model=projec" - + "ts/*/locations/*/endpoints/*}:streamGene" - + "rateContent:\001*ZS\"N/v1/{model=projects/*/" - + "locations/*/publishers/*/models/*}:strea" - + "mGenerateContent:\001*Z2\"-/v1/{model=endpoi" - + "nts/*}:streamGenerateContent:\001*Z<\"7/v1/{" - + "model=publishers/*/models/*}:streamGener" - + "ateContent:\001*0\001\032\206\001\312A\031aiplatform.googleap" - + "is.com\322Aghttps://www.googleapis.com/auth" - + "/cloud-platform,https://www.googleapis.c" - + "om/auth/cloud-platform.read-onlyB\324\001\n\036com" - + ".google.cloud.aiplatform.v1B\026PredictionS" - + "erviceProtoP\001Z>cloud.google.com/go/aipla" - + "tform/apiv1/aiplatformpb;aiplatformpb\252\002\032" - + "Google.Cloud.AIPlatform.V1\312\002\032Google\\Clou" - + "d\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatf" - + "orm::V1b\006proto3" + + "ndpoints/*}:directRawPredict:\001*\022\214\001\n\023Stre" + + "amDirectPredict\0226.google.cloud.aiplatfor" + + "m.v1.StreamDirectPredictRequest\0327.google" + + ".cloud.aiplatform.v1.StreamDirectPredict" + + "Response\"\000(\0010\001\022\225\001\n\026StreamDirectRawPredic" + + "t\0229.google.cloud.aiplatform.v1.StreamDir" + + "ectRawPredictRequest\032:.google.cloud.aipl" + + "atform.v1.StreamDirectRawPredictResponse" + + "\"\000(\0010\001\022\203\001\n\020StreamingPredict\0223.google.clo" + + "ud.aiplatform.v1.StreamingPredictRequest" + + "\0324.google.cloud.aiplatform.v1.StreamingP" + + "redictResponse\"\000(\0010\001\022\265\002\n\026ServerStreaming" + + "Predict\0223.google.cloud.aiplatform.v1.Str" + + "eamingPredictRequest\0324.google.cloud.aipl" + + "atform.v1.StreamingPredictResponse\"\255\001\202\323\344" + + "\223\002\246\001\"H/v1/{endpoint=projects/*/locations" + + "/*/endpoints/*}:serverStreamingPredict:\001" + + "*ZW\"R/v1/{endpoint=projects/*/locations/" + + "*/publishers/*/models/*}:serverStreaming" + + "Predict:\001*0\001\022\214\001\n\023StreamingRawPredict\0226.g" + + "oogle.cloud.aiplatform.v1.StreamingRawPr" + + "edictRequest\0327.google.cloud.aiplatform.v" + + "1.StreamingRawPredictResponse\"\000(\0010\001\022\332\001\n\007" + + "Explain\022*.google.cloud.aiplatform.v1.Exp" + + "lainRequest\032+.google.cloud.aiplatform.v1" + + ".ExplainResponse\"v\332A/endpoint,instances," + + "parameters,deployed_model_id\202\323\344\223\002>\"9/v1/" + + "{endpoint=projects/*/locations/*/endpoin" + + "ts/*}:explain:\001*\022\215\003\n\017GenerateContent\0222.g" + + "oogle.cloud.aiplatform.v1.GenerateConten" + + "tRequest\0323.google.cloud.aiplatform.v1.Ge" + + "nerateContentResponse\"\220\002\332A\016model,content" + + "s\202\323\344\223\002\370\001\">/v1/{model=projects/*/location" + + "s/*/endpoints/*}:generateContent:\001*ZM\"H/" + + "v1/{model=projects/*/locations/*/publish" + + "ers/*/models/*}:generateContent:\001*Z,\"\'/v" + + "1/{model=endpoints/*}:generateContent:\001*" + + "Z6\"1/v1/{model=publishers/*/models/*}:ge" + + "nerateContent:\001*\022\255\003\n\025StreamGenerateConte" + + "nt\0222.google.cloud.aiplatform.v1.Generate" + + "ContentRequest\0323.google.cloud.aiplatform" + + ".v1.GenerateContentResponse\"\250\002\332A\016model,c" + + "ontents\202\323\344\223\002\220\002\"D/v1/{model=projects/*/lo" + + "cations/*/endpoints/*}:streamGenerateCon" + + "tent:\001*ZS\"N/v1/{model=projects/*/locatio" + + "ns/*/publishers/*/models/*}:streamGenera" + + "teContent:\001*Z2\"-/v1/{model=endpoints/*}:" + + "streamGenerateContent:\001*Z<\"7/v1/{model=p" + + "ublishers/*/models/*}:streamGenerateCont" + + "ent:\001*0\001\032\206\001\312A\031aiplatform.googleapis.com\322" + + "Aghttps://www.googleapis.com/auth/cloud-" + + "platform,https://www.googleapis.com/auth" + + "/cloud-platform.read-onlyB\324\001\n\036com.google" + + ".cloud.aiplatform.v1B\026PredictionServiceP" + + "rotoP\001Z>cloud.google.com/go/aiplatform/a" + + "piv1/aiplatformpb;aiplatformpb\252\002\032Google." + + "Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPla" + + "tform\\V1\352\002\035Google::Cloud::AIPlatform::V1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -378,6 +381,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.aiplatform.v1.ToolProto.getDescriptor(), com.google.cloud.aiplatform.v1.TypesProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_aiplatform_v1_PredictRequest_descriptor = getDescriptor().getMessageTypes().get(0); @@ -582,7 +586,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GenerateContentResponse_descriptor, new java.lang.String[] { - "Candidates", "ModelVersion", "PromptFeedback", "UsageMetadata", + "Candidates", + "ModelVersion", + "CreateTime", + "ResponseId", + "PromptFeedback", + "UsageMetadata", }); internal_static_google_cloud_aiplatform_v1_GenerateContentResponse_PromptFeedback_descriptor = internal_static_google_cloud_aiplatform_v1_GenerateContentResponse_descriptor @@ -630,6 +639,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.aiplatform.v1.ToolProto.getDescriptor(); com.google.cloud.aiplatform.v1.TypesProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto index 4282a30834bb..bf46a02cea64 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto @@ -26,6 +26,7 @@ import "google/cloud/aiplatform/v1/explanation.proto"; import "google/cloud/aiplatform/v1/tool.proto"; import "google/cloud/aiplatform/v1/types.proto"; import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; @@ -814,6 +815,14 @@ message GenerateContentResponse { // Output only. The model version used to generate the response. string model_version = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Timestamp when the request is made to the server. + google.protobuf.Timestamp create_time = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. response_id is used to identify each response. It is the + // encoding of the event_id. + string response_id = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Content filter results for a prompt sent in the request. // Note: Sent only in the first stream chunk. // Only happens when no candidates were generated due to content violations. diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SlashCommand.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SlashCommand.java index d41cb2b3c91c..0eb509939e95 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SlashCommand.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SlashCommand.java @@ -24,7 +24,7 @@ * *
  * A [slash
- * command](https://developers.google.com/workspace/chat/slash-commands) in
+ * command](https://developers.google.com/workspace/chat/commands) in
  * Google Chat.
  * 
* @@ -242,7 +242,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * A [slash
-   * command](https://developers.google.com/workspace/chat/slash-commands) in
+   * command](https://developers.google.com/workspace/chat/commands) in
    * Google Chat.
    * 
* diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/slash_command.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/slash_command.proto index 75f213549555..095a582951d5 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/slash_command.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/slash_command.proto @@ -26,7 +26,7 @@ option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; // A [slash -// command](https://developers.google.com/workspace/chat/slash-commands) in +// command](https://developers.google.com/workspace/chat/commands) in // Google Chat. message SlashCommand { // The ID of the slash command invoked.