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

annotations.io.fabric8.openshift.api.model.LifecycleHookFluentImpl Maven / Gradle / Ivy

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

import java.util.ArrayList;
import java.util.RandomAccess;
import java.util.Map;
import java.util.Map;
import java.util.List;
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 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.Fluent;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import java.util.List;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;

public class LifecycleHookFluentImpl> extends BaseFluent implements LifecycleHookFluent{

     VisitableBuilder execNewPod;     String failurePolicy;     List> tagImages = new ArrayList();     Map additionalProperties = new HashMap();
public LifecycleHookFluentImpl(){
    
}
public LifecycleHookFluentImpl( LifecycleHook instance ){
    this.withExecNewPod(instance.getExecNewPod()); this.withFailurePolicy(instance.getFailurePolicy()); this.withTagImages(instance.getTagImages()); 
}

    public ExecNewPodHook getExecNewPod(){
    return this.execNewPod!=null?this.execNewPod.build():null;
    }
    public T withExecNewPod( ExecNewPodHook execNewPod){
    if (execNewPod!=null){ this.execNewPod= new ExecNewPodHookBuilder(execNewPod); _visitables.add(this.execNewPod);} return (T) this;
    }
    public ExecNewPodNested withNewExecNewPod(){
    return new ExecNewPodNestedImpl();
    }
    public ExecNewPodNested withNewExecNewPodLike( ExecNewPodHook item){
    return new ExecNewPodNestedImpl(item);
    }
    public ExecNewPodNested editExecNewPod(){
    return withNewExecNewPodLike(getExecNewPod());
    }
    public String getFailurePolicy(){
    return this.failurePolicy;
    }
    public T withFailurePolicy( String failurePolicy){
    this.failurePolicy=failurePolicy; return (T) this;
    }
    public T addToTagImages( TagImageHook ...items){
    for (TagImageHook item : items) {TagImageHookBuilder builder = new TagImageHookBuilder(item);_visitables.add(builder);this.tagImages.add(builder);} return (T)this;
    }
    public T removeFromTagImages( TagImageHook ...items){
    for (TagImageHook item : items) {TagImageHookBuilder builder = new TagImageHookBuilder(item);_visitables.remove(builder);this.tagImages.remove(builder);} return (T)this;
    }
    public List getTagImages(){
    return build(tagImages);
    }
    public T withTagImages( List tagImages){
    this.tagImages.clear();if (tagImages != null) {for (TagImageHook item : tagImages){this.addToTagImages(item);}} return (T) this;
    }
    public T withTagImages( TagImageHook ...tagImages){
    this.tagImages.clear(); if (tagImages != null) {for (TagImageHook item :tagImages){ this.addToTagImages(item);}} return (T) this;
    }
    public TagImagesNested addNewTagImage(){
    return new TagImagesNestedImpl();
    }
    public TagImagesNested addNewTagImageLike( TagImageHook item){
    return new TagImagesNestedImpl(item);
    }
    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;
LifecycleHookFluentImpl that = (LifecycleHookFluentImpl) o;
if (execNewPod != null ? !execNewPod.equals(that.execNewPod) :that.execNewPod != null) return false;
if (failurePolicy != null ? !failurePolicy.equals(that.failurePolicy) :that.failurePolicy != null) return false;
if (tagImages != null ? !tagImages.equals(that.tagImages) :that.tagImages != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;

    }

    public class ExecNewPodNestedImpl extends ExecNewPodHookFluentImpl> implements ExecNewPodNested{

        private final ExecNewPodHookBuilder builder;
    
             ExecNewPodNestedImpl (){
        this.builder = new ExecNewPodHookBuilder(this);
        }
             ExecNewPodNestedImpl ( ExecNewPodHook item){
        this.builder = new ExecNewPodHookBuilder(this, item);
        }
    
            public N and(){
            return (N) LifecycleHookFluentImpl.this.withExecNewPod(builder.build());
        }
            public N endExecNewPod(){
            return and();
        }
    
}
    public class TagImagesNestedImpl extends TagImageHookFluentImpl> implements TagImagesNested{

        private final TagImageHookBuilder builder;
    
             TagImagesNestedImpl (){
        this.builder = new TagImageHookBuilder(this);
        }
             TagImagesNestedImpl ( TagImageHook item){
        this.builder = new TagImageHookBuilder(this, item);
        }
    
            public N and(){
            return (N) LifecycleHookFluentImpl.this.addToTagImages(builder.build());
        }
            public N endTagImage(){
            return and();
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy