All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.apphosting.runtime.AutoBuilder_RequestRunner_Builder Maven / Gradle / Ivy

There is a newer version: 2.0.31
Show newest version
package com.google.apphosting.runtime;

import com.google.apphosting.base.protos.RuntimePb;
import com.google.apphosting.runtime.anyrpc.AnyRpcServerContext;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoBuilderProcessor")
class AutoBuilder_RequestRunner_Builder extends RequestRunner.Builder {

  private UPRequestHandler upRequestHandler;

  private RequestManager requestManager;

  private BackgroundRequestCoordinator coordinator;

  private boolean compressResponse;

  private AppVersion appVersion;

  private AnyRpcServerContext rpc;

  private RuntimePb.UPRequest upRequest;

  private MutableUpResponse upResponse;

  private byte set$0;

  AutoBuilder_RequestRunner_Builder() {
  }

  @Override
  public RequestRunner.Builder setUpRequestHandler(UPRequestHandler upRequestHandler) {
    if (upRequestHandler == null) {
      throw new NullPointerException("Null upRequestHandler");
    }
    this.upRequestHandler = upRequestHandler;
    return this;
  }

  @Override
  public RequestRunner.Builder setRequestManager(RequestManager requestManager) {
    if (requestManager == null) {
      throw new NullPointerException("Null requestManager");
    }
    this.requestManager = requestManager;
    return this;
  }

  @Override
  public RequestRunner.Builder setCoordinator(BackgroundRequestCoordinator coordinator) {
    if (coordinator == null) {
      throw new NullPointerException("Null coordinator");
    }
    this.coordinator = coordinator;
    return this;
  }

  @Override
  public RequestRunner.Builder setCompressResponse(boolean compressResponse) {
    this.compressResponse = compressResponse;
    set$0 |= (byte) 1;
    return this;
  }

  @Override
  public RequestRunner.Builder setAppVersion(AppVersion appVersion) {
    if (appVersion == null) {
      throw new NullPointerException("Null appVersion");
    }
    this.appVersion = appVersion;
    return this;
  }

  @Override
  public RequestRunner.Builder setRpc(AnyRpcServerContext rpc) {
    if (rpc == null) {
      throw new NullPointerException("Null rpc");
    }
    this.rpc = rpc;
    return this;
  }

  @Override
  public RequestRunner.Builder setUpRequest(RuntimePb.UPRequest upRequest) {
    if (upRequest == null) {
      throw new NullPointerException("Null upRequest");
    }
    this.upRequest = upRequest;
    return this;
  }

  @Override
  public RequestRunner.Builder setUpResponse(MutableUpResponse upResponse) {
    if (upResponse == null) {
      throw new NullPointerException("Null upResponse");
    }
    this.upResponse = upResponse;
    return this;
  }

  @Override
  public RequestRunner build() {
    if (set$0 != 1
        || this.upRequestHandler == null
        || this.requestManager == null
        || this.coordinator == null
        || this.appVersion == null
        || this.rpc == null
        || this.upRequest == null
        || this.upResponse == null) {
      StringBuilder missing = new StringBuilder();
      if (this.upRequestHandler == null) {
        missing.append(" upRequestHandler");
      }
      if (this.requestManager == null) {
        missing.append(" requestManager");
      }
      if (this.coordinator == null) {
        missing.append(" coordinator");
      }
      if ((set$0 & 1) == 0) {
        missing.append(" compressResponse");
      }
      if (this.appVersion == null) {
        missing.append(" appVersion");
      }
      if (this.rpc == null) {
        missing.append(" rpc");
      }
      if (this.upRequest == null) {
        missing.append(" upRequest");
      }
      if (this.upResponse == null) {
        missing.append(" upResponse");
      }
      throw new IllegalStateException("Missing required properties:" + missing);
    }
    return new RequestRunner(
        this.upRequestHandler,
        this.requestManager,
        this.coordinator,
        this.compressResponse,
        this.appVersion,
        this.rpc,
        this.upRequest,
        this.upResponse);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy