io.fabric8.kubernetes.api.model.EndpointSubsetFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.ArrayList;
import java.util.List;
import java.util.RandomAccess;
import java.util.Map;
import java.util.Map;
import java.util.List;
import java.util.AbstractCollection;
import java.util.AbstractList;
import java.util.HashMap;
import java.io.Serializable;
import java.util.Collection;
import java.util.AbstractMap;
import java.util.List;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.util.List;
import java.util.List;
public class EndpointSubsetFluentImpl> extends BaseFluent implements EndpointSubsetFluent{
List> addresses = new ArrayList(); List> notReadyAddresses = new ArrayList(); List> ports = new ArrayList(); Map additionalProperties = new HashMap();
public EndpointSubsetFluentImpl(){
}
public EndpointSubsetFluentImpl( EndpointSubset instance ){
this.withAddresses(instance.getAddresses()); this.withNotReadyAddresses(instance.getNotReadyAddresses()); this.withPorts(instance.getPorts());
}
public T addToAddresses( EndpointAddress ...items){
for (EndpointAddress item : items) {EndpointAddressBuilder builder = new EndpointAddressBuilder(item);_visitables.add(builder);this.addresses.add(builder);} return (T)this;
}
public T removeFromAddresses( EndpointAddress ...items){
for (EndpointAddress item : items) {EndpointAddressBuilder builder = new EndpointAddressBuilder(item);_visitables.remove(builder);this.addresses.remove(builder);} return (T)this;
}
public List getAddresses(){
return build(addresses);
}
public T withAddresses( List addresses){
this.addresses.clear();if (addresses != null) {for (EndpointAddress item : addresses){this.addToAddresses(item);}} return (T) this;
}
public T withAddresses( EndpointAddress ...addresses){
this.addresses.clear(); if (addresses != null) {for (EndpointAddress item :addresses){ this.addToAddresses(item);}} return (T) this;
}
public AddressesNested addNewAddresse(){
return new AddressesNestedImpl();
}
public AddressesNested addNewAddresseLike( EndpointAddress item){
return new AddressesNestedImpl(item);
}
public T addToNotReadyAddresses( EndpointAddress ...items){
for (EndpointAddress item : items) {EndpointAddressBuilder builder = new EndpointAddressBuilder(item);_visitables.add(builder);this.notReadyAddresses.add(builder);} return (T)this;
}
public T removeFromNotReadyAddresses( EndpointAddress ...items){
for (EndpointAddress item : items) {EndpointAddressBuilder builder = new EndpointAddressBuilder(item);_visitables.remove(builder);this.notReadyAddresses.remove(builder);} return (T)this;
}
public List getNotReadyAddresses(){
return build(notReadyAddresses);
}
public T withNotReadyAddresses( List notReadyAddresses){
this.notReadyAddresses.clear();if (notReadyAddresses != null) {for (EndpointAddress item : notReadyAddresses){this.addToNotReadyAddresses(item);}} return (T) this;
}
public T withNotReadyAddresses( EndpointAddress ...notReadyAddresses){
this.notReadyAddresses.clear(); if (notReadyAddresses != null) {for (EndpointAddress item :notReadyAddresses){ this.addToNotReadyAddresses(item);}} return (T) this;
}
public NotReadyAddressesNested addNewNotReadyAddresse(){
return new NotReadyAddressesNestedImpl();
}
public NotReadyAddressesNested addNewNotReadyAddresseLike( EndpointAddress item){
return new NotReadyAddressesNestedImpl(item);
}
public T addToPorts( EndpointPort ...items){
for (EndpointPort item : items) {EndpointPortBuilder builder = new EndpointPortBuilder(item);_visitables.add(builder);this.ports.add(builder);} return (T)this;
}
public T removeFromPorts( EndpointPort ...items){
for (EndpointPort item : items) {EndpointPortBuilder builder = new EndpointPortBuilder(item);_visitables.remove(builder);this.ports.remove(builder);} return (T)this;
}
public List getPorts(){
return build(ports);
}
public T withPorts( List ports){
this.ports.clear();if (ports != null) {for (EndpointPort item : ports){this.addToPorts(item);}} return (T) this;
}
public T withPorts( EndpointPort ...ports){
this.ports.clear(); if (ports != null) {for (EndpointPort item :ports){ this.addToPorts(item);}} return (T) this;
}
public PortsNested addNewPort(){
return new PortsNestedImpl();
}
public PortsNested addNewPortLike( EndpointPort item){
return new PortsNestedImpl(item);
}
public T addNewPort( String name, Integer port, String protocol){
return addToPorts(new EndpointPort(name, port, protocol));
}
public T addToAdditionalProperties( String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public T addToAdditionalProperties( Map map){
if(map != null) { this.additionalProperties.putAll(map);} return (T)this;
}
public T removeFromAdditionalProperties( String key){
if(key != null) {this.additionalProperties.remove(key);} return (T)this;
}
public T removeFromAdditionalProperties( Map map){
if(map != null) { for(Object key : map.keySet()) {this.additionalProperties.remove(key);}} 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 boolean equals( Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
EndpointSubsetFluentImpl that = (EndpointSubsetFluentImpl) o;
if (addresses != null ? !addresses.equals(that.addresses) :that.addresses != null) return false;
if (notReadyAddresses != null ? !notReadyAddresses.equals(that.notReadyAddresses) :that.notReadyAddresses != null) return false;
if (ports != null ? !ports.equals(that.ports) :that.ports != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;
}
public class AddressesNestedImpl extends EndpointAddressFluentImpl> implements AddressesNested{
private final EndpointAddressBuilder builder;
AddressesNestedImpl (){
this.builder = new EndpointAddressBuilder(this);
}
AddressesNestedImpl ( EndpointAddress item){
this.builder = new EndpointAddressBuilder(this, item);
}
public N and(){
return (N) EndpointSubsetFluentImpl.this.addToAddresses(builder.build());
}
public N endAddresse(){
return and();
}
}
public class NotReadyAddressesNestedImpl extends EndpointAddressFluentImpl> implements NotReadyAddressesNested{
private final EndpointAddressBuilder builder;
NotReadyAddressesNestedImpl (){
this.builder = new EndpointAddressBuilder(this);
}
NotReadyAddressesNestedImpl ( EndpointAddress item){
this.builder = new EndpointAddressBuilder(this, item);
}
public N endNotReadyAddresse(){
return and();
}
public N and(){
return (N) EndpointSubsetFluentImpl.this.addToNotReadyAddresses(builder.build());
}
}
public class PortsNestedImpl extends EndpointPortFluentImpl> implements PortsNested{
private final EndpointPortBuilder builder;
PortsNestedImpl (){
this.builder = new EndpointPortBuilder(this);
}
PortsNestedImpl ( EndpointPort item){
this.builder = new EndpointPortBuilder(this, item);
}
public N endPort(){
return and();
}
public N and(){
return (N) EndpointSubsetFluentImpl.this.addToPorts(builder.build());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy