com.google.apphosting.runtime.AutoBuilder_ApiProxyImpl_Builder Maven / Gradle / Ivy
package com.google.apphosting.runtime;
import com.google.apphosting.runtime.anyrpc.APIHostClientInterface;
import java.time.Duration;
import javax.annotation.Generated;
import javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoBuilderProcessor")
class AutoBuilder_ApiProxyImpl_Builder extends ApiProxyImpl.Builder {
private APIHostClientInterface apiHost;
private ApiDeadlineOracle deadlineOracle;
private String externalDatacenterName;
private long byteCountBeforeFlushing;
private int maxLogLineSize;
private Duration maxLogFlushTime;
private BackgroundRequestCoordinator coordinator;
private boolean cloudSqlJdbcConnectivityEnabled;
private boolean disableApiCallLogging;
private boolean logToLogservice;
private byte set$0;
AutoBuilder_ApiProxyImpl_Builder() {
}
@Override
public ApiProxyImpl.Builder setApiHost(APIHostClientInterface apiHost) {
this.apiHost = apiHost;
return this;
}
@Override
public ApiProxyImpl.Builder setDeadlineOracle(ApiDeadlineOracle deadlineOracle) {
this.deadlineOracle = deadlineOracle;
return this;
}
@Override
@Nullable public ApiDeadlineOracle deadlineOracle() {
return deadlineOracle;
}
@Override
public ApiProxyImpl.Builder setExternalDatacenterName(String externalDatacenterName) {
this.externalDatacenterName = externalDatacenterName;
return this;
}
@Override
@Nullable public String externalDatacenterName() {
return externalDatacenterName;
}
@Override
public ApiProxyImpl.Builder setByteCountBeforeFlushing(long byteCountBeforeFlushing) {
this.byteCountBeforeFlushing = byteCountBeforeFlushing;
set$0 |= (byte) 1;
return this;
}
@Override
public long byteCountBeforeFlushing() {
if ((set$0 & 1) == 0) {
throw new IllegalStateException("Property \"byteCountBeforeFlushing\" has not been set");
}
return byteCountBeforeFlushing;
}
@Override
public ApiProxyImpl.Builder setMaxLogLineSize(int maxLogLineSize) {
this.maxLogLineSize = maxLogLineSize;
set$0 |= (byte) 2;
return this;
}
@Override
public ApiProxyImpl.Builder setMaxLogFlushTime(Duration maxLogFlushTime) {
if (maxLogFlushTime == null) {
throw new NullPointerException("Null maxLogFlushTime");
}
this.maxLogFlushTime = maxLogFlushTime;
return this;
}
@Override
public Duration maxLogFlushTime() {
if (this.maxLogFlushTime == null) {
throw new IllegalStateException("Property \"maxLogFlushTime\" has not been set");
}
return maxLogFlushTime;
}
@Override
public ApiProxyImpl.Builder setCoordinator(BackgroundRequestCoordinator coordinator) {
this.coordinator = coordinator;
return this;
}
@Override
@Nullable public BackgroundRequestCoordinator coordinator() {
return coordinator;
}
@Override
public ApiProxyImpl.Builder setCloudSqlJdbcConnectivityEnabled(boolean cloudSqlJdbcConnectivityEnabled) {
this.cloudSqlJdbcConnectivityEnabled = cloudSqlJdbcConnectivityEnabled;
set$0 |= (byte) 4;
return this;
}
@Override
public boolean cloudSqlJdbcConnectivityEnabled() {
if ((set$0 & 4) == 0) {
throw new IllegalStateException("Property \"cloudSqlJdbcConnectivityEnabled\" has not been set");
}
return cloudSqlJdbcConnectivityEnabled;
}
@Override
public ApiProxyImpl.Builder setDisableApiCallLogging(boolean disableApiCallLogging) {
this.disableApiCallLogging = disableApiCallLogging;
set$0 |= (byte) 8;
return this;
}
@Override
public boolean disableApiCallLogging() {
if ((set$0 & 8) == 0) {
throw new IllegalStateException("Property \"disableApiCallLogging\" has not been set");
}
return disableApiCallLogging;
}
@Override
public ApiProxyImpl.Builder setLogToLogservice(boolean logToLogservice) {
this.logToLogservice = logToLogservice;
set$0 |= (byte) 0x10;
return this;
}
@Override
public ApiProxyImpl build() {
if (set$0 != 0x1f
|| this.maxLogFlushTime == null) {
StringBuilder missing = new StringBuilder();
if ((set$0 & 1) == 0) {
missing.append(" byteCountBeforeFlushing");
}
if ((set$0 & 2) == 0) {
missing.append(" maxLogLineSize");
}
if (this.maxLogFlushTime == null) {
missing.append(" maxLogFlushTime");
}
if ((set$0 & 4) == 0) {
missing.append(" cloudSqlJdbcConnectivityEnabled");
}
if ((set$0 & 8) == 0) {
missing.append(" disableApiCallLogging");
}
if ((set$0 & 0x10) == 0) {
missing.append(" logToLogservice");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new ApiProxyImpl(
this.apiHost,
this.deadlineOracle,
this.externalDatacenterName,
this.byteCountBeforeFlushing,
this.maxLogLineSize,
this.maxLogFlushTime,
this.coordinator,
this.cloudSqlJdbcConnectivityEnabled,
this.disableApiCallLogging,
this.logToLogservice);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy