io.fabric8.kubernetes.api.model.NodeStatusFluent Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import io.fabric8.kubernetes.api.model.resource.Quantity;
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.Visitable;
import io.fabric8.common.BaseFluent;
public class NodeStatusFluent> extends BaseFluent implements Fluent{
List addresses = new ArrayList(); Map capacity = new HashMap(); List conditions = new ArrayList(); NodeSystemInfoBuilder nodeInfo; String phase; Map additionalProperties = new HashMap();
public T addToAddresses( NodeAddress item){
if (item != null) {NodeAddressBuilder builder = new NodeAddressBuilder(item);_visitables.add(builder);this.addresses.add(builder);} return (T)this;
}
public List getAddresses(){
return build(addresses);
}
public T withAddresses( List addresses){
this.addresses.clear();if (addresses != null) {for (NodeAddress item : addresses){this.addToAddresses(item);}} return (T) this;
}
public AddressesNested addNewAddresse(){
return new AddressesNested();
}
public T addNewAddresse( String address, String type){
return addToAddresses(new NodeAddress(address, type));
}
public T addToCapacity( String key, Quantity value){
if(key != null && value != null) {this.capacity.put(key, value);} return (T)this;
}
public Map getCapacity(){
return this.capacity;
}
public T withCapacity( Map capacity){
this.capacity.clear();if (capacity != null) {this.capacity.putAll(capacity);} return (T) this;
}
public T addToConditions( NodeCondition item){
if (item != null) {NodeConditionBuilder builder = new NodeConditionBuilder(item);_visitables.add(builder);this.conditions.add(builder);} return (T)this;
}
public List getConditions(){
return build(conditions);
}
public T withConditions( List conditions){
this.conditions.clear();if (conditions != null) {for (NodeCondition item : conditions){this.addToConditions(item);}} return (T) this;
}
public ConditionsNested addNewCondition(){
return new ConditionsNested();
}
public NodeSystemInfo getNodeInfo(){
return this.nodeInfo!=null?this.nodeInfo.build():null;
}
public T withNodeInfo( NodeSystemInfo nodeInfo){
if (nodeInfo!=null){ this.nodeInfo= new NodeSystemInfoBuilder(nodeInfo); _visitables.add(this.nodeInfo);} return (T) this;
}
public NodeInfoNested withNewNodeInfo(){
return new NodeInfoNested();
}
public String getPhase(){
return this.phase;
}
public T withPhase( String phase){
this.phase=phase; 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 AddressesNested extends NodeAddressFluent> implements Nested{
private final NodeAddressBuilder builder = new NodeAddressBuilder(this);
public N and(){
return (N) NodeStatusFluent.this.addToAddresses(builder.build());
}
public N endAddresse(){
return and();
}
}
public class ConditionsNested extends NodeConditionFluent> implements Nested{
private final NodeConditionBuilder builder = new NodeConditionBuilder(this);
public N endCondition(){
return and();
}
public N and(){
return (N) NodeStatusFluent.this.addToConditions(builder.build());
}
}
public class NodeInfoNested extends NodeSystemInfoFluent> implements Nested{
private final NodeSystemInfoBuilder builder = new NodeSystemInfoBuilder(this);
public N and(){
return (N) NodeStatusFluent.this.withNodeInfo(builder.build());
}
public N endNodeInfo(){
return and();
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy