public Builder mergeFrom(com.google.cloud.vertexai.api.Tool other) {
      if (other == com.google.cloud.vertexai.api.Tool.getDefaultInstance()) return this;
      if (functionDeclarationsBuilder_ == null) {
        if (!other.functionDeclarations_.isEmpty()) {
          if (functionDeclarations_.isEmpty()) {
            functionDeclarations_ = other.functionDeclarations_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureFunctionDeclarationsIsMutable();
            functionDeclarations_.addAll(other.functionDeclarations_);
          }
          onChanged();
        }
      } else {
        if (!other.functionDeclarations_.isEmpty()) {
          if (functionDeclarationsBuilder_.isEmpty()) {
            functionDeclarationsBuilder_.dispose();
            functionDeclarationsBuilder_ = null;
            functionDeclarations_ = other.functionDeclarations_;
            bitField0_ = (bitField0_ & ~0x00000001);
            functionDeclarationsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getFunctionDeclarationsFieldBuilder()
                    : null;
          } else {
            functionDeclarationsBuilder_.addAllMessages(other.functionDeclarations_);
          }
        }
      }
      if (other.hasRetrieval()) {
        mergeRetrieval(other.getRetrieval());
      }
      if (other.hasGoogleSearch()) {
        mergeGoogleSearch(other.getGoogleSearch());
      }
      if (other.hasGoogleSearchRetrieval()) {
        mergeGoogleSearchRetrieval(other.getGoogleSearchRetrieval());
      }
      if (other.hasEnterpriseWebSearch()) {
        mergeEnterpriseWebSearch(other.getEnterpriseWebSearch());
      }
      if (other.hasCodeExecution()) {
        mergeCodeExecution(other.getCodeExecution());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }
<pre>
Tool details that the model may use to generate 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. A Tool object should contain exactly
one type of Tool (e.g FunctionDeclaration, Retrieval or
GoogleSearchRetrieval).
</pre>

Protobuf type {@code google.cloud.vertexai.v1.Tool}
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java