@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    for (int i = 0; i < functionDeclarations_.size(); i++) {
      output.writeMessage(1, functionDeclarations_.get(i));
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(2, getRetrieval());
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeMessage(3, getGoogleSearchRetrieval());
    }
    if (((bitField0_ & 0x00000010) != 0)) {
      output.writeMessage(4, getCodeExecution());
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      output.writeMessage(6, getEnterpriseWebSearch());
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(7, getGoogleSearch());
    }
    getUnknownFields().writeTo(output);
  }
<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