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

com.cognite.client.servicesV1.AutoValue_ConnectorServiceV1_AsyncJobReader Maven / Gradle / Ivy

There is a newer version: 2.3.3
Show newest version
package com.cognite.client.servicesV1;

import com.cognite.client.CogniteClient;
import com.cognite.client.Request;
import com.cognite.client.servicesV1.executor.RequestExecutor;
import com.cognite.client.servicesV1.request.RequestProvider;
import com.cognite.client.servicesV1.response.ResponseParser;
import java.time.Duration;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ConnectorServiceV1_AsyncJobReader extends ConnectorServiceV1.AsyncJobReader {

  private final RequestProvider requestProvider;

  private final CogniteClient client;

  private final RequestExecutor requestExecutor;

  private final ResponseParser responseParser;

  private final ResponseParser jobStartResponseParser;

  private final RequestProvider jobResultRequestProvider;

  private final Duration jobTimeoutDuration;

  private final Duration pollingInterval;

  private AutoValue_ConnectorServiceV1_AsyncJobReader(
      RequestProvider requestProvider,
      CogniteClient client,
      RequestExecutor requestExecutor,
      ResponseParser responseParser,
      ResponseParser jobStartResponseParser,
      RequestProvider jobResultRequestProvider,
      Duration jobTimeoutDuration,
      Duration pollingInterval) {
    this.requestProvider = requestProvider;
    this.client = client;
    this.requestExecutor = requestExecutor;
    this.responseParser = responseParser;
    this.jobStartResponseParser = jobStartResponseParser;
    this.jobResultRequestProvider = jobResultRequestProvider;
    this.jobTimeoutDuration = jobTimeoutDuration;
    this.pollingInterval = pollingInterval;
  }

  @Override
  RequestProvider getRequestProvider() {
    return requestProvider;
  }

  @Override
  CogniteClient getClient() {
    return client;
  }

  @Override
  RequestExecutor getRequestExecutor() {
    return requestExecutor;
  }

  @Override
  ResponseParser getResponseParser() {
    return responseParser;
  }

  @Override
  ResponseParser getJobStartResponseParser() {
    return jobStartResponseParser;
  }

  @Override
  RequestProvider getJobResultRequestProvider() {
    return jobResultRequestProvider;
  }

  @Override
  Duration getJobTimeoutDuration() {
    return jobTimeoutDuration;
  }

  @Override
  Duration getPollingInterval() {
    return pollingInterval;
  }

  @Override
  public String toString() {
    return "AsyncJobReader{"
        + "requestProvider=" + requestProvider + ", "
        + "client=" + client + ", "
        + "requestExecutor=" + requestExecutor + ", "
        + "responseParser=" + responseParser + ", "
        + "jobStartResponseParser=" + jobStartResponseParser + ", "
        + "jobResultRequestProvider=" + jobResultRequestProvider + ", "
        + "jobTimeoutDuration=" + jobTimeoutDuration + ", "
        + "pollingInterval=" + pollingInterval
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ConnectorServiceV1.AsyncJobReader) {
      ConnectorServiceV1.AsyncJobReader that = (ConnectorServiceV1.AsyncJobReader) o;
      return this.requestProvider.equals(that.getRequestProvider())
          && this.client.equals(that.getClient())
          && this.requestExecutor.equals(that.getRequestExecutor())
          && this.responseParser.equals(that.getResponseParser())
          && this.jobStartResponseParser.equals(that.getJobStartResponseParser())
          && this.jobResultRequestProvider.equals(that.getJobResultRequestProvider())
          && this.jobTimeoutDuration.equals(that.getJobTimeoutDuration())
          && this.pollingInterval.equals(that.getPollingInterval());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= requestProvider.hashCode();
    h$ *= 1000003;
    h$ ^= client.hashCode();
    h$ *= 1000003;
    h$ ^= requestExecutor.hashCode();
    h$ *= 1000003;
    h$ ^= responseParser.hashCode();
    h$ *= 1000003;
    h$ ^= jobStartResponseParser.hashCode();
    h$ *= 1000003;
    h$ ^= jobResultRequestProvider.hashCode();
    h$ *= 1000003;
    h$ ^= jobTimeoutDuration.hashCode();
    h$ *= 1000003;
    h$ ^= pollingInterval.hashCode();
    return h$;
  }

  @Override
  ConnectorServiceV1.AsyncJobReader.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends ConnectorServiceV1.AsyncJobReader.Builder {
    private RequestProvider requestProvider;
    private CogniteClient client;
    private RequestExecutor requestExecutor;
    private ResponseParser responseParser;
    private ResponseParser jobStartResponseParser;
    private RequestProvider jobResultRequestProvider;
    private Duration jobTimeoutDuration;
    private Duration pollingInterval;
    Builder() {
    }
    private Builder(ConnectorServiceV1.AsyncJobReader source) {
      this.requestProvider = source.getRequestProvider();
      this.client = source.getClient();
      this.requestExecutor = source.getRequestExecutor();
      this.responseParser = source.getResponseParser();
      this.jobStartResponseParser = source.getJobStartResponseParser();
      this.jobResultRequestProvider = source.getJobResultRequestProvider();
      this.jobTimeoutDuration = source.getJobTimeoutDuration();
      this.pollingInterval = source.getPollingInterval();
    }
    @Override
    ConnectorServiceV1.AsyncJobReader.Builder setRequestProvider(RequestProvider requestProvider) {
      if (requestProvider == null) {
        throw new NullPointerException("Null requestProvider");
      }
      this.requestProvider = requestProvider;
      return this;
    }
    @Override
    ConnectorServiceV1.AsyncJobReader.Builder setClient(CogniteClient client) {
      if (client == null) {
        throw new NullPointerException("Null client");
      }
      this.client = client;
      return this;
    }
    @Override
    ConnectorServiceV1.AsyncJobReader.Builder setRequestExecutor(RequestExecutor requestExecutor) {
      if (requestExecutor == null) {
        throw new NullPointerException("Null requestExecutor");
      }
      this.requestExecutor = requestExecutor;
      return this;
    }
    @Override
    ConnectorServiceV1.AsyncJobReader.Builder setResponseParser(ResponseParser responseParser) {
      if (responseParser == null) {
        throw new NullPointerException("Null responseParser");
      }
      this.responseParser = responseParser;
      return this;
    }
    @Override
    ConnectorServiceV1.AsyncJobReader.Builder setJobStartResponseParser(ResponseParser jobStartResponseParser) {
      if (jobStartResponseParser == null) {
        throw new NullPointerException("Null jobStartResponseParser");
      }
      this.jobStartResponseParser = jobStartResponseParser;
      return this;
    }
    @Override
    ConnectorServiceV1.AsyncJobReader.Builder setJobResultRequestProvider(RequestProvider jobResultRequestProvider) {
      if (jobResultRequestProvider == null) {
        throw new NullPointerException("Null jobResultRequestProvider");
      }
      this.jobResultRequestProvider = jobResultRequestProvider;
      return this;
    }
    @Override
    ConnectorServiceV1.AsyncJobReader.Builder setJobTimeoutDuration(Duration jobTimeoutDuration) {
      if (jobTimeoutDuration == null) {
        throw new NullPointerException("Null jobTimeoutDuration");
      }
      this.jobTimeoutDuration = jobTimeoutDuration;
      return this;
    }
    @Override
    ConnectorServiceV1.AsyncJobReader.Builder setPollingInterval(Duration pollingInterval) {
      if (pollingInterval == null) {
        throw new NullPointerException("Null pollingInterval");
      }
      this.pollingInterval = pollingInterval;
      return this;
    }
    @Override
    ConnectorServiceV1.AsyncJobReader build() {
      if (this.requestProvider == null
          || this.client == null
          || this.requestExecutor == null
          || this.responseParser == null
          || this.jobStartResponseParser == null
          || this.jobResultRequestProvider == null
          || this.jobTimeoutDuration == null
          || this.pollingInterval == null) {
        StringBuilder missing = new StringBuilder();
        if (this.requestProvider == null) {
          missing.append(" requestProvider");
        }
        if (this.client == null) {
          missing.append(" client");
        }
        if (this.requestExecutor == null) {
          missing.append(" requestExecutor");
        }
        if (this.responseParser == null) {
          missing.append(" responseParser");
        }
        if (this.jobStartResponseParser == null) {
          missing.append(" jobStartResponseParser");
        }
        if (this.jobResultRequestProvider == null) {
          missing.append(" jobResultRequestProvider");
        }
        if (this.jobTimeoutDuration == null) {
          missing.append(" jobTimeoutDuration");
        }
        if (this.pollingInterval == null) {
          missing.append(" pollingInterval");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ConnectorServiceV1_AsyncJobReader(
          this.requestProvider,
          this.client,
          this.requestExecutor,
          this.responseParser,
          this.jobStartResponseParser,
          this.jobResultRequestProvider,
          this.jobTimeoutDuration,
          this.pollingInterval);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy