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

com.cognite.client.servicesV1.AutoValue_ConnectorServiceV1_FileWriter 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.servicesV1.executor.FileBinaryRequestExecutor;
import com.cognite.client.servicesV1.executor.RequestExecutor;
import com.cognite.client.servicesV1.request.RequestProvider;
import javax.annotation.processing.Generated;

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

  private final RequestProvider requestProvider;

  private final CogniteClient client;

  private final RequestExecutor requestExecutor;

  private final FileBinaryRequestExecutor fileBinaryRequestExecutor;

  private final boolean deleteTempFile;

  private AutoValue_ConnectorServiceV1_FileWriter(
      RequestProvider requestProvider,
      CogniteClient client,
      RequestExecutor requestExecutor,
      FileBinaryRequestExecutor fileBinaryRequestExecutor,
      boolean deleteTempFile) {
    this.requestProvider = requestProvider;
    this.client = client;
    this.requestExecutor = requestExecutor;
    this.fileBinaryRequestExecutor = fileBinaryRequestExecutor;
    this.deleteTempFile = deleteTempFile;
  }

  @Override
  RequestProvider getRequestProvider() {
    return requestProvider;
  }

  @Override
  CogniteClient getClient() {
    return client;
  }

  @Override
  RequestExecutor getRequestExecutor() {
    return requestExecutor;
  }

  @Override
  FileBinaryRequestExecutor getFileBinaryRequestExecutor() {
    return fileBinaryRequestExecutor;
  }

  @Override
  boolean isDeleteTempFile() {
    return deleteTempFile;
  }

  @Override
  public String toString() {
    return "FileWriter{"
        + "requestProvider=" + requestProvider + ", "
        + "client=" + client + ", "
        + "requestExecutor=" + requestExecutor + ", "
        + "fileBinaryRequestExecutor=" + fileBinaryRequestExecutor + ", "
        + "deleteTempFile=" + deleteTempFile
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ConnectorServiceV1.FileWriter) {
      ConnectorServiceV1.FileWriter that = (ConnectorServiceV1.FileWriter) o;
      return this.requestProvider.equals(that.getRequestProvider())
          && this.client.equals(that.getClient())
          && this.requestExecutor.equals(that.getRequestExecutor())
          && this.fileBinaryRequestExecutor.equals(that.getFileBinaryRequestExecutor())
          && this.deleteTempFile == that.isDeleteTempFile();
    }
    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$ ^= fileBinaryRequestExecutor.hashCode();
    h$ *= 1000003;
    h$ ^= deleteTempFile ? 1231 : 1237;
    return h$;
  }

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

  static final class Builder extends ConnectorServiceV1.FileWriter.Builder {
    private RequestProvider requestProvider;
    private CogniteClient client;
    private RequestExecutor requestExecutor;
    private FileBinaryRequestExecutor fileBinaryRequestExecutor;
    private Boolean deleteTempFile;
    Builder() {
    }
    private Builder(ConnectorServiceV1.FileWriter source) {
      this.requestProvider = source.getRequestProvider();
      this.client = source.getClient();
      this.requestExecutor = source.getRequestExecutor();
      this.fileBinaryRequestExecutor = source.getFileBinaryRequestExecutor();
      this.deleteTempFile = source.isDeleteTempFile();
    }
    @Override
    ConnectorServiceV1.FileWriter.Builder setRequestProvider(RequestProvider requestProvider) {
      if (requestProvider == null) {
        throw new NullPointerException("Null requestProvider");
      }
      this.requestProvider = requestProvider;
      return this;
    }
    @Override
    ConnectorServiceV1.FileWriter.Builder setClient(CogniteClient client) {
      if (client == null) {
        throw new NullPointerException("Null client");
      }
      this.client = client;
      return this;
    }
    @Override
    ConnectorServiceV1.FileWriter.Builder setRequestExecutor(RequestExecutor requestExecutor) {
      if (requestExecutor == null) {
        throw new NullPointerException("Null requestExecutor");
      }
      this.requestExecutor = requestExecutor;
      return this;
    }
    @Override
    ConnectorServiceV1.FileWriter.Builder setFileBinaryRequestExecutor(FileBinaryRequestExecutor fileBinaryRequestExecutor) {
      if (fileBinaryRequestExecutor == null) {
        throw new NullPointerException("Null fileBinaryRequestExecutor");
      }
      this.fileBinaryRequestExecutor = fileBinaryRequestExecutor;
      return this;
    }
    @Override
    ConnectorServiceV1.FileWriter.Builder setDeleteTempFile(boolean deleteTempFile) {
      this.deleteTempFile = deleteTempFile;
      return this;
    }
    @Override
    ConnectorServiceV1.FileWriter build() {
      if (this.requestProvider == null
          || this.client == null
          || this.requestExecutor == null
          || this.fileBinaryRequestExecutor == null
          || this.deleteTempFile == 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.fileBinaryRequestExecutor == null) {
          missing.append(" fileBinaryRequestExecutor");
        }
        if (this.deleteTempFile == null) {
          missing.append(" deleteTempFile");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ConnectorServiceV1_FileWriter(
          this.requestProvider,
          this.client,
          this.requestExecutor,
          this.fileBinaryRequestExecutor,
          this.deleteTempFile);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy