@java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.vertexai.api.Tool)) {
      return super.equals(obj);
    }
    com.google.cloud.vertexai.api.Tool other = (com.google.cloud.vertexai.api.Tool) obj;

    if (!getFunctionDeclarationsList().equals(other.getFunctionDeclarationsList())) return false;
    if (hasRetrieval() != other.hasRetrieval()) return false;
    if (hasRetrieval()) {
      if (!getRetrieval().equals(other.getRetrieval())) return false;
    }
    if (hasGoogleSearch() != other.hasGoogleSearch()) return false;
    if (hasGoogleSearch()) {
      if (!getGoogleSearch().equals(other.getGoogleSearch())) return false;
    }
    if (hasGoogleSearchRetrieval() != other.hasGoogleSearchRetrieval()) return false;
    if (hasGoogleSearchRetrieval()) {
      if (!getGoogleSearchRetrieval().equals(other.getGoogleSearchRetrieval())) return false;
    }
    if (hasEnterpriseWebSearch() != other.hasEnterpriseWebSearch()) return false;
    if (hasEnterpriseWebSearch()) {
      if (!getEnterpriseWebSearch().equals(other.getEnterpriseWebSearch())) return false;
    }
    if (hasCodeExecution() != other.hasCodeExecution()) return false;
    if (hasCodeExecution()) {
      if (!getCodeExecution().equals(other.getCodeExecution())) return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }
<pre>
Optional. CodeExecution tool type.
Enables the model to execute code as part of generation.
</pre>

<code>
.google.cloud.vertexai.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
</code>
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java