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

org.jclouds.azurecompute.arm.domain.AutoValue_ServicePrincipal Maven / Gradle / Ivy

The newest version!

package org.jclouds.azurecompute.arm.domain;

import java.util.Date;
import java.util.List;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final String appId;
  private final Date deletionTimestamp;
  private final String displayName;
  private final String objectId;
  private final String objectType;
  private final List servicePrincipalNames;

  private AutoValue_ServicePrincipal(
      @Nullable String appId,
      @Nullable Date deletionTimestamp,
      @Nullable String displayName,
      String objectId,
      String objectType,
      List servicePrincipalNames) {
    this.appId = appId;
    this.deletionTimestamp = deletionTimestamp;
    this.displayName = displayName;
    this.objectId = objectId;
    this.objectType = objectType;
    this.servicePrincipalNames = servicePrincipalNames;
  }

  @Nullable
  @Override
  public String appId() {
    return appId;
  }

  @Nullable
  @Override
  public Date deletionTimestamp() {
    return deletionTimestamp;
  }

  @Nullable
  @Override
  public String displayName() {
    return displayName;
  }

  @Override
  public String objectId() {
    return objectId;
  }

  @Override
  public String objectType() {
    return objectType;
  }

  @Override
  public List servicePrincipalNames() {
    return servicePrincipalNames;
  }

  @Override
  public String toString() {
    return "ServicePrincipal{"
        + "appId=" + appId + ", "
        + "deletionTimestamp=" + deletionTimestamp + ", "
        + "displayName=" + displayName + ", "
        + "objectId=" + objectId + ", "
        + "objectType=" + objectType + ", "
        + "servicePrincipalNames=" + servicePrincipalNames
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ServicePrincipal) {
      ServicePrincipal that = (ServicePrincipal) o;
      return ((this.appId == null) ? (that.appId() == null) : this.appId.equals(that.appId()))
           && ((this.deletionTimestamp == null) ? (that.deletionTimestamp() == null) : this.deletionTimestamp.equals(that.deletionTimestamp()))
           && ((this.displayName == null) ? (that.displayName() == null) : this.displayName.equals(that.displayName()))
           && (this.objectId.equals(that.objectId()))
           && (this.objectType.equals(that.objectType()))
           && (this.servicePrincipalNames.equals(that.servicePrincipalNames()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= (appId == null) ? 0 : this.appId.hashCode();
    h *= 1000003;
    h ^= (deletionTimestamp == null) ? 0 : this.deletionTimestamp.hashCode();
    h *= 1000003;
    h ^= (displayName == null) ? 0 : this.displayName.hashCode();
    h *= 1000003;
    h ^= this.objectId.hashCode();
    h *= 1000003;
    h ^= this.objectType.hashCode();
    h *= 1000003;
    h ^= this.servicePrincipalNames.hashCode();
    return h;
  }

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

  static final class Builder extends ServicePrincipal.Builder {
    private String appId;
    private Date deletionTimestamp;
    private String displayName;
    private String objectId;
    private String objectType;
    private List servicePrincipalNames;
    Builder() {
    }
    private Builder(ServicePrincipal source) {
      this.appId = source.appId();
      this.deletionTimestamp = source.deletionTimestamp();
      this.displayName = source.displayName();
      this.objectId = source.objectId();
      this.objectType = source.objectType();
      this.servicePrincipalNames = source.servicePrincipalNames();
    }
    @Override
    public ServicePrincipal.Builder appId(@Nullable String appId) {
      this.appId = appId;
      return this;
    }
    @Override
    public ServicePrincipal.Builder deletionTimestamp(@Nullable Date deletionTimestamp) {
      this.deletionTimestamp = deletionTimestamp;
      return this;
    }
    @Override
    public ServicePrincipal.Builder displayName(@Nullable String displayName) {
      this.displayName = displayName;
      return this;
    }
    @Override
    public ServicePrincipal.Builder objectId(String objectId) {
      if (objectId == null) {
        throw new NullPointerException("Null objectId");
      }
      this.objectId = objectId;
      return this;
    }
    @Override
    public ServicePrincipal.Builder objectType(String objectType) {
      if (objectType == null) {
        throw new NullPointerException("Null objectType");
      }
      this.objectType = objectType;
      return this;
    }
    @Override
    public ServicePrincipal.Builder servicePrincipalNames(List servicePrincipalNames) {
      if (servicePrincipalNames == null) {
        throw new NullPointerException("Null servicePrincipalNames");
      }
      this.servicePrincipalNames = servicePrincipalNames;
      return this;
    }
    @Override
    public ServicePrincipal build() {
      String missing = "";
      if (this.objectId == null) {
        missing += " objectId";
      }
      if (this.objectType == null) {
        missing += " objectType";
      }
      if (this.servicePrincipalNames == null) {
        missing += " servicePrincipalNames";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ServicePrincipal(
          this.appId,
          this.deletionTimestamp,
          this.displayName,
          this.objectId,
          this.objectType,
          this.servicePrincipalNames);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy