annotations.io.fabric8.kubernetes.api.model.base.StatusDetailsFluent Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model.base;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.ArrayList;
import io.fabric8.common.Nested;
import io.fabric8.common.Builder;
import io.fabric8.common.Fluent;
import io.fabric8.common.BaseFluent;
import io.fabric8.common.Visitable;
public class StatusDetailsFluent> extends BaseFluent implements Fluent{
List causes = new ArrayList(); String id; String kind; Integer retryAfterSeconds; Map additionalProperties = new HashMap();
public T addToCauses( StatusCause item){
if (item != null) {StatusCauseBuilder builder = new StatusCauseBuilder(item);_visitables.add(builder);this.causes.add(builder);} return (T)this;
}
public List getCauses(){
return build(causes);
}
public T withCauses( List causes){
this.causes.clear();if (causes != null) {for (StatusCause item : causes){this.addToCauses(item);}} return (T) this;
}
public CausesNested addNewCause(){
return new CausesNested();
}
public T addNewCause( String field, String message, String reason){
return addToCauses(new StatusCause(field, message, reason));
}
public String getId(){
return this.id;
}
public T withId( String id){
this.id=id; return (T) this;
}
public String getKind(){
return this.kind;
}
public T withKind( String kind){
this.kind=kind; return (T) this;
}
public Integer getRetryAfterSeconds(){
return this.retryAfterSeconds;
}
public T withRetryAfterSeconds( Integer retryAfterSeconds){
this.retryAfterSeconds=retryAfterSeconds; return (T) this;
}
public T addToAdditionalProperties( String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public Map getAdditionalProperties(){
return this.additionalProperties;
}
public T withAdditionalProperties( Map additionalProperties){
this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
}
public class CausesNested extends StatusCauseFluent> implements Nested{
private final StatusCauseBuilder builder = new StatusCauseBuilder(this);
public N endCause(){
return and();
}
public N and(){
return (N) StatusDetailsFluent.this.addToCauses(builder.build());
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy