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

annotations.io.alauda.kubernetes.api.model.PipelineHookHTTPRequestFluentImpl Maven / Gradle / Ivy

There is a newer version: 0.2.12
Show newest version
package io.alauda.kubernetes.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.String;
import java.lang.Boolean;
import java.util.Map;
import java.util.LinkedHashMap;

public class PipelineHookHTTPRequestFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements PipelineHookHTTPRequestFluent{

    private Map headers = new LinkedHashMap();
    private String method;
    private String uri;

    public PipelineHookHTTPRequestFluentImpl(){
    }
    public PipelineHookHTTPRequestFluentImpl(PipelineHookHTTPRequest instance){
            this.withHeaders(instance.getHeaders()); 
            this.withMethod(instance.getMethod()); 
            this.withUri(instance.getUri()); 
    }

    public A addToHeaders(String key,String value){
            if(key != null && value != null) {this.headers.put(key, value);} return (A)this;
    }

    public A addToHeaders(Map map){
            if(map != null) { this.headers.putAll(map);} return (A)this;
    }

    public A removeFromHeaders(String key){
            if(key != null) {this.headers.remove(key);} return (A)this;
    }

    public A removeFromHeaders(Map map){
            if(map != null) { for(Object key : map.keySet()) {this.headers.remove(key);}} return (A)this;
    }

    public Map getHeaders(){
            return this.headers;
    }

    public A withHeaders(Map headers){
            this.headers.clear();
            if (headers != null) {this.headers.putAll(headers);} return (A) this;
    }

    public Boolean hasHeaders(){
            return this.headers!=null;
    }

    public String getMethod(){
            return this.method;
    }

    public A withMethod(String method){
            this.method=method; return (A) this;
    }

    public Boolean hasMethod(){
            return this.method!=null;
    }

    public String getUri(){
            return this.uri;
    }

    public A withUri(String uri){
            this.uri=uri; return (A) this;
    }

    public Boolean hasUri(){
            return this.uri!=null;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            PipelineHookHTTPRequestFluentImpl that = (PipelineHookHTTPRequestFluentImpl) o;
            if (headers != null ? !headers.equals(that.headers) :that.headers != null) return false;
            if (method != null ? !method.equals(that.method) :that.method != null) return false;
            if (uri != null ? !uri.equals(that.uri) :that.uri != null) return false;
            return true;
    }




}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy