org.graylog.security.shares.AutoValue_EntityShareResponse Maven / Gradle / Ivy
package org.graylog.security.shares;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import javax.annotation.processing.Generated;
import org.graylog.grn.GRN;
import org.graylog.security.Capability;
import org.graylog.security.entities.EntityDescriptor;
import org.graylog2.plugin.rest.ValidationResult;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EntityShareResponse extends EntityShareResponse {
private final String entity;
private final GRN sharingUser;
private final ImmutableSet availableGrantees;
private final ImmutableSet availableCapabilities;
private final ImmutableSet activeShares;
private final ImmutableMap selectedGranteeCapabilities;
private final ImmutableMap> missingPermissionsOnDependencies;
private final ValidationResult validationResult;
private AutoValue_EntityShareResponse(
String entity,
GRN sharingUser,
ImmutableSet availableGrantees,
ImmutableSet availableCapabilities,
ImmutableSet activeShares,
ImmutableMap selectedGranteeCapabilities,
ImmutableMap> missingPermissionsOnDependencies,
ValidationResult validationResult) {
this.entity = entity;
this.sharingUser = sharingUser;
this.availableGrantees = availableGrantees;
this.availableCapabilities = availableCapabilities;
this.activeShares = activeShares;
this.selectedGranteeCapabilities = selectedGranteeCapabilities;
this.missingPermissionsOnDependencies = missingPermissionsOnDependencies;
this.validationResult = validationResult;
}
@JsonProperty("entity")
@Override
public String entity() {
return entity;
}
@JsonProperty("sharing_user")
@Override
public GRN sharingUser() {
return sharingUser;
}
@JsonProperty("available_grantees")
@Override
public ImmutableSet availableGrantees() {
return availableGrantees;
}
@JsonProperty("available_capabilities")
@Override
public ImmutableSet availableCapabilities() {
return availableCapabilities;
}
@JsonProperty("active_shares")
@Override
public ImmutableSet activeShares() {
return activeShares;
}
@JsonProperty("selected_grantee_capabilities")
@Override
public ImmutableMap selectedGranteeCapabilities() {
return selectedGranteeCapabilities;
}
@JsonProperty("missing_permissions_on_dependencies")
@Override
public ImmutableMap> missingPermissionsOnDependencies() {
return missingPermissionsOnDependencies;
}
@JsonProperty("validation_result")
@Override
public ValidationResult validationResult() {
return validationResult;
}
@Override
public String toString() {
return "EntityShareResponse{"
+ "entity=" + entity + ", "
+ "sharingUser=" + sharingUser + ", "
+ "availableGrantees=" + availableGrantees + ", "
+ "availableCapabilities=" + availableCapabilities + ", "
+ "activeShares=" + activeShares + ", "
+ "selectedGranteeCapabilities=" + selectedGranteeCapabilities + ", "
+ "missingPermissionsOnDependencies=" + missingPermissionsOnDependencies + ", "
+ "validationResult=" + validationResult
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof EntityShareResponse) {
EntityShareResponse that = (EntityShareResponse) o;
return this.entity.equals(that.entity())
&& this.sharingUser.equals(that.sharingUser())
&& this.availableGrantees.equals(that.availableGrantees())
&& this.availableCapabilities.equals(that.availableCapabilities())
&& this.activeShares.equals(that.activeShares())
&& this.selectedGranteeCapabilities.equals(that.selectedGranteeCapabilities())
&& this.missingPermissionsOnDependencies.equals(that.missingPermissionsOnDependencies())
&& this.validationResult.equals(that.validationResult());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= entity.hashCode();
h$ *= 1000003;
h$ ^= sharingUser.hashCode();
h$ *= 1000003;
h$ ^= availableGrantees.hashCode();
h$ *= 1000003;
h$ ^= availableCapabilities.hashCode();
h$ *= 1000003;
h$ ^= activeShares.hashCode();
h$ *= 1000003;
h$ ^= selectedGranteeCapabilities.hashCode();
h$ *= 1000003;
h$ ^= missingPermissionsOnDependencies.hashCode();
h$ *= 1000003;
h$ ^= validationResult.hashCode();
return h$;
}
static final class Builder extends EntityShareResponse.Builder {
private String entity;
private GRN sharingUser;
private ImmutableSet availableGrantees;
private ImmutableSet availableCapabilities;
private ImmutableSet activeShares;
private ImmutableMap selectedGranteeCapabilities;
private ImmutableMap> missingPermissionsOnDependencies;
private ValidationResult validationResult;
Builder() {
}
@Override
public EntityShareResponse.Builder entity(String entity) {
if (entity == null) {
throw new NullPointerException("Null entity");
}
this.entity = entity;
return this;
}
@Override
public EntityShareResponse.Builder sharingUser(GRN sharingUser) {
if (sharingUser == null) {
throw new NullPointerException("Null sharingUser");
}
this.sharingUser = sharingUser;
return this;
}
@Override
public EntityShareResponse.Builder availableGrantees(Set availableGrantees) {
this.availableGrantees = ImmutableSet.copyOf(availableGrantees);
return this;
}
@Override
public EntityShareResponse.Builder availableCapabilities(Set availableCapabilities) {
this.availableCapabilities = ImmutableSet.copyOf(availableCapabilities);
return this;
}
@Override
public EntityShareResponse.Builder activeShares(Set activeShares) {
this.activeShares = ImmutableSet.copyOf(activeShares);
return this;
}
@Override
public EntityShareResponse.Builder selectedGranteeCapabilities(Map selectedGranteeCapabilities) {
this.selectedGranteeCapabilities = ImmutableMap.copyOf(selectedGranteeCapabilities);
return this;
}
@Override
public EntityShareResponse.Builder missingPermissionsOnDependencies(Map> missingPermissionsOnDependencies) {
this.missingPermissionsOnDependencies = ImmutableMap.copyOf(missingPermissionsOnDependencies);
return this;
}
@Override
public EntityShareResponse.Builder validationResult(ValidationResult validationResult) {
if (validationResult == null) {
throw new NullPointerException("Null validationResult");
}
this.validationResult = validationResult;
return this;
}
@Override
public EntityShareResponse build() {
if (this.entity == null
|| this.sharingUser == null
|| this.availableGrantees == null
|| this.availableCapabilities == null
|| this.activeShares == null
|| this.selectedGranteeCapabilities == null
|| this.missingPermissionsOnDependencies == null
|| this.validationResult == null) {
StringBuilder missing = new StringBuilder();
if (this.entity == null) {
missing.append(" entity");
}
if (this.sharingUser == null) {
missing.append(" sharingUser");
}
if (this.availableGrantees == null) {
missing.append(" availableGrantees");
}
if (this.availableCapabilities == null) {
missing.append(" availableCapabilities");
}
if (this.activeShares == null) {
missing.append(" activeShares");
}
if (this.selectedGranteeCapabilities == null) {
missing.append(" selectedGranteeCapabilities");
}
if (this.missingPermissionsOnDependencies == null) {
missing.append(" missingPermissionsOnDependencies");
}
if (this.validationResult == null) {
missing.append(" validationResult");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_EntityShareResponse(
this.entity,
this.sharingUser,
this.availableGrantees,
this.availableCapabilities,
this.activeShares,
this.selectedGranteeCapabilities,
this.missingPermissionsOnDependencies,
this.validationResult);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy