@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (attemptDispatchCount_ != 0) {
      output.writeInt32(1, attemptDispatchCount_);
    }
    if (attemptResponseCount_ != 0) {
      output.writeInt32(2, attemptResponseCount_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(3, getFirstAttemptStatus());
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(4, getLastAttemptStatus());
    }
    getUnknownFields().writeTo(output);
  }
<pre>
Output only. The status of the task's last attempt.

This field is not calculated for [pull
tasks][google.cloud.tasks.v2beta2.PullMessage].
</pre>

<code>.google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4;</code>
java-tasks/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatus.java