All Downloads are FREE. Search and download functionalities are using the official Maven repository.

annotations.io.fabric8.kubernetes.api.model.StatusFluentImpl Maven / Gradle / Ivy

There is a newer version: 6.13.4
Show newest version
package io.fabric8.kubernetes.api.model;

import java.util.Map;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.builder.Nested;

public class StatusFluentImpl> extends BaseFluent implements StatusFluent{

     String apiVersion;     Integer code;     VisitableBuilder details;     String kind;     String message;     VisitableBuilder metadata;     String reason;     String status;     Map additionalProperties = new HashMap();
public StatusFluentImpl(){
    
}
public StatusFluentImpl( Status instance ){
    this.withApiVersion(instance.getApiVersion()); this.withCode(instance.getCode()); this.withDetails(instance.getDetails()); this.withKind(instance.getKind()); this.withMessage(instance.getMessage()); this.withMetadata(instance.getMetadata()); this.withReason(instance.getReason()); this.withStatus(instance.getStatus()); 
}

    public String getApiVersion(){
    return this.apiVersion;
    }
    public T withApiVersion( String apiVersion){
    this.apiVersion=apiVersion; return (T) this;
    }
    public Integer getCode(){
    return this.code;
    }
    public T withCode( Integer code){
    this.code=code; return (T) this;
    }
    public StatusDetails getDetails(){
    return this.details!=null?this.details.build():null;
    }
    public T withDetails( StatusDetails details){
    if (details!=null){ this.details= new StatusDetailsBuilder(details); _visitables.add(this.details);} return (T) this;
    }
    public DetailsNested withNewDetails(){
    return new DetailsNestedImpl();
    }
    public DetailsNested withNewDetailsLike( StatusDetails item){
    return new DetailsNestedImpl(item);
    }
    public DetailsNested editDetails(){
    return withNewDetailsLike(getDetails());
    }
    public String getKind(){
    return this.kind;
    }
    public T withKind( String kind){
    this.kind=kind; return (T) this;
    }
    public String getMessage(){
    return this.message;
    }
    public T withMessage( String message){
    this.message=message; return (T) this;
    }
    public ListMeta getMetadata(){
    return this.metadata!=null?this.metadata.build():null;
    }
    public T withMetadata( ListMeta metadata){
    if (metadata!=null){ this.metadata= new ListMetaBuilder(metadata); _visitables.add(this.metadata);} return (T) this;
    }
    public MetadataNested withNewMetadata(){
    return new MetadataNestedImpl();
    }
    public MetadataNested withNewMetadataLike( ListMeta item){
    return new MetadataNestedImpl(item);
    }
    public MetadataNested editMetadata(){
    return withNewMetadataLike(getMetadata());
    }
    public T withNewMetadata( String resourceVersion,  String selfLink){
    return withMetadata(new ListMeta(resourceVersion, selfLink));
    }
    public String getReason(){
    return this.reason;
    }
    public T withReason( String reason){
    this.reason=reason; return (T) this;
    }
    public String getStatus(){
    return this.status;
    }
    public T withStatus( String status){
    this.status=status; return (T) this;
    }
    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;
StatusFluentImpl that = (StatusFluentImpl) o;
if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
if (code != null ? !code.equals(that.code) :that.code != null) return false;
if (details != null ? !details.equals(that.details) :that.details != null) return false;
if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
if (message != null ? !message.equals(that.message) :that.message != null) return false;
if (metadata != null ? !metadata.equals(that.metadata) :that.metadata != null) return false;
if (reason != null ? !reason.equals(that.reason) :that.reason != null) return false;
if (status != null ? !status.equals(that.status) :that.status != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;

    }

    public class DetailsNestedImpl extends StatusDetailsFluentImpl> implements DetailsNested{

        private final StatusDetailsBuilder builder;
    
             DetailsNestedImpl ( StatusDetails item){
        this.builder = new StatusDetailsBuilder(this, item);
        }
             DetailsNestedImpl (){
        this.builder = new StatusDetailsBuilder(this);
        }
    
            public N and(){
            return (N) StatusFluentImpl.this.withDetails(builder.build());
        }
            public N endDetails(){
            return and();
        }
    
}
    public class MetadataNestedImpl extends ListMetaFluentImpl> implements MetadataNested{

        private final ListMetaBuilder builder;
    
             MetadataNestedImpl (){
        this.builder = new ListMetaBuilder(this);
        }
             MetadataNestedImpl ( ListMeta item){
        this.builder = new ListMetaBuilder(this, item);
        }
    
            public N and(){
            return (N) StatusFluentImpl.this.withMetadata(builder.build());
        }
            public N endMetadata(){
            return and();
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy