@java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputUri_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, inputUri_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUri_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, outputUri_);
    }
    if (jobConfigCase_ == 4) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jobConfig_);
    }
    if (jobConfigCase_ == 5) {
      output.writeMessage(5, (com.google.cloud.video.transcoder.v1.JobConfig) jobConfig_);
    }
    if (state_
        != com.google.cloud.video.transcoder.v1.Job.ProcessingState.PROCESSING_STATE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(8, state_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(12, getCreateTime());
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(13, getStartTime());
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeMessage(14, getEndTime());
    }
    if (ttlAfterCompletionDays_ != 0) {
      output.writeInt32(15, ttlAfterCompletionDays_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 16);
    if (((bitField0_ & 0x00000008) != 0)) {
      output.writeMessage(17, getError());
    }
    if (mode_
        != com.google.cloud.video.transcoder.v1.Job.ProcessingMode.PROCESSING_MODE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(20, mode_);
    }
    if (batchModePriority_ != 0) {
      output.writeInt32(21, batchModePriority_);
    }
    if (optimization_
        != com.google.cloud.video.transcoder.v1.Job.OptimizationStrategy
            .OPTIMIZATION_STRATEGY_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(22, optimization_);
    }
    getUnknownFields().writeTo(output);
  }
<pre>
Optional. The optimization strategy of the job. The default is
`AUTODETECT`.
</pre>

<code>
.google.cloud.video.transcoder.v1.Job.OptimizationStrategy optimization = 22 [(.google.api.field_behavior) = OPTIONAL];
</code>

@return The optimization.
java-video-transcoder/proto-google-cloud-video-transcoder-v1/src/main/java/com/google/cloud/video/transcoder/v1/Job.java