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

annotations.com.cognite.client.config.AutoValue_AuthConfig Maven / Gradle / Ivy

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

import javax.annotation.Nullable;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_AuthConfig extends AuthConfig {

  private final String project;

  private final String host;

  private AutoValue_AuthConfig(
      @Nullable String project,
      String host) {
    this.project = project;
    this.host = host;
  }

  @Nullable
  @Override
  public String getProject() {
    return project;
  }

  @Override
  public String getHost() {
    return host;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof AuthConfig) {
      AuthConfig that = (AuthConfig) o;
      return (this.project == null ? that.getProject() == null : this.project.equals(that.getProject()))
          && this.host.equals(that.getHost());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (project == null) ? 0 : project.hashCode();
    h$ *= 1000003;
    h$ ^= host.hashCode();
    return h$;
  }

  @Override
  public AuthConfig.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends AuthConfig.Builder {
    private String project;
    private String host;
    Builder() {
    }
    private Builder(AuthConfig source) {
      this.project = source.getProject();
      this.host = source.getHost();
    }
    @Override
    AuthConfig.Builder setProject(String project) {
      this.project = project;
      return this;
    }
    @Override
    AuthConfig.Builder setHost(String host) {
      if (host == null) {
        throw new NullPointerException("Null host");
      }
      this.host = host;
      return this;
    }
    @Override
    public AuthConfig build() {
      if (this.host == null) {
        String missing = " host";
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_AuthConfig(
          this.project,
          this.host);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy