io.kubernetes.client.openapi.models.V1beta1SelfSubjectAccessReviewSpecFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.openapi.models;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class V1beta1SelfSubjectAccessReviewSpecFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1SelfSubjectAccessReviewSpecFluent {
private V1beta1NonResourceAttributesBuilder nonResourceAttributes;
private V1beta1ResourceAttributesBuilder resourceAttributes;
public V1beta1SelfSubjectAccessReviewSpecFluentImpl() {
}
public V1beta1SelfSubjectAccessReviewSpecFluentImpl(V1beta1SelfSubjectAccessReviewSpec instance) {
this.withNonResourceAttributes(instance.getNonResourceAttributes());
this.withResourceAttributes(instance.getResourceAttributes());
}
/**
* This method has been deprecated, please use method buildNonResourceAttributes instead.
* @return The buildable object.
*/
@Deprecated public V1beta1NonResourceAttributes getNonResourceAttributes() {
return this.nonResourceAttributes!=null?this.nonResourceAttributes.build():null;
}
public V1beta1NonResourceAttributes buildNonResourceAttributes() {
return this.nonResourceAttributes!=null?this.nonResourceAttributes.build():null;
}
public A withNonResourceAttributes(V1beta1NonResourceAttributes nonResourceAttributes) {
_visitables.get("nonResourceAttributes").remove(this.nonResourceAttributes);
if (nonResourceAttributes!=null){ this.nonResourceAttributes= new V1beta1NonResourceAttributesBuilder(nonResourceAttributes); _visitables.get("nonResourceAttributes").add(this.nonResourceAttributes);} return (A) this;
}
public Boolean hasNonResourceAttributes() {
return this.nonResourceAttributes != null;
}
public V1beta1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested withNewNonResourceAttributes() {
return new NonResourceAttributesNestedImpl();
}
public V1beta1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested withNewNonResourceAttributesLike(V1beta1NonResourceAttributes item) {
return new NonResourceAttributesNestedImpl(item);
}
public V1beta1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested editNonResourceAttributes() {
return withNewNonResourceAttributesLike(getNonResourceAttributes());
}
public V1beta1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested editOrNewNonResourceAttributes() {
return withNewNonResourceAttributesLike(getNonResourceAttributes() != null ? getNonResourceAttributes(): new V1beta1NonResourceAttributesBuilder().build());
}
public V1beta1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested editOrNewNonResourceAttributesLike(V1beta1NonResourceAttributes item) {
return withNewNonResourceAttributesLike(getNonResourceAttributes() != null ? getNonResourceAttributes(): item);
}
/**
* This method has been deprecated, please use method buildResourceAttributes instead.
* @return The buildable object.
*/
@Deprecated public V1beta1ResourceAttributes getResourceAttributes() {
return this.resourceAttributes!=null?this.resourceAttributes.build():null;
}
public V1beta1ResourceAttributes buildResourceAttributes() {
return this.resourceAttributes!=null?this.resourceAttributes.build():null;
}
public A withResourceAttributes(V1beta1ResourceAttributes resourceAttributes) {
_visitables.get("resourceAttributes").remove(this.resourceAttributes);
if (resourceAttributes!=null){ this.resourceAttributes= new V1beta1ResourceAttributesBuilder(resourceAttributes); _visitables.get("resourceAttributes").add(this.resourceAttributes);} return (A) this;
}
public Boolean hasResourceAttributes() {
return this.resourceAttributes != null;
}
public V1beta1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested withNewResourceAttributes() {
return new ResourceAttributesNestedImpl();
}
public V1beta1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested withNewResourceAttributesLike(V1beta1ResourceAttributes item) {
return new ResourceAttributesNestedImpl(item);
}
public V1beta1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested editResourceAttributes() {
return withNewResourceAttributesLike(getResourceAttributes());
}
public V1beta1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested editOrNewResourceAttributes() {
return withNewResourceAttributesLike(getResourceAttributes() != null ? getResourceAttributes(): new V1beta1ResourceAttributesBuilder().build());
}
public V1beta1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested editOrNewResourceAttributesLike(V1beta1ResourceAttributes item) {
return withNewResourceAttributesLike(getResourceAttributes() != null ? getResourceAttributes(): item);
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
V1beta1SelfSubjectAccessReviewSpecFluentImpl that = (V1beta1SelfSubjectAccessReviewSpecFluentImpl) o;
if (nonResourceAttributes != null ? !nonResourceAttributes.equals(that.nonResourceAttributes) :that.nonResourceAttributes != null) return false;
if (resourceAttributes != null ? !resourceAttributes.equals(that.resourceAttributes) :that.resourceAttributes != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(nonResourceAttributes, resourceAttributes, super.hashCode());
}
public class NonResourceAttributesNestedImpl extends V1beta1NonResourceAttributesFluentImpl> implements V1beta1SelfSubjectAccessReviewSpecFluent.NonResourceAttributesNested,io.kubernetes.client.fluent.Nested {
private final V1beta1NonResourceAttributesBuilder builder;
NonResourceAttributesNestedImpl(V1beta1NonResourceAttributes item) {
this.builder = new V1beta1NonResourceAttributesBuilder(this, item);
}
NonResourceAttributesNestedImpl() {
this.builder = new V1beta1NonResourceAttributesBuilder(this);
}
public N and() {
return (N) V1beta1SelfSubjectAccessReviewSpecFluentImpl.this.withNonResourceAttributes(builder.build());
}
public N endNonResourceAttributes() {
return and();
}
}
public class ResourceAttributesNestedImpl extends V1beta1ResourceAttributesFluentImpl> implements V1beta1SelfSubjectAccessReviewSpecFluent.ResourceAttributesNested,io.kubernetes.client.fluent.Nested {
private final V1beta1ResourceAttributesBuilder builder;
ResourceAttributesNestedImpl(V1beta1ResourceAttributes item) {
this.builder = new V1beta1ResourceAttributesBuilder(this, item);
}
ResourceAttributesNestedImpl() {
this.builder = new V1beta1ResourceAttributesBuilder(this);
}
public N and() {
return (N) V1beta1SelfSubjectAccessReviewSpecFluentImpl.this.withResourceAttributes(builder.build());
}
public N endResourceAttributes() {
return and();
}
}
}