io.alauda.devops.api.model.GenericWebHookCauseFluentImpl Maven / Gradle / Ivy
package io.alauda.devops.api.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class GenericWebHookCauseFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements GenericWebHookCauseFluent{
private SourceRevisionBuilder revision;
private String secret;
public GenericWebHookCauseFluentImpl(){
}
public GenericWebHookCauseFluentImpl(GenericWebHookCause instance){
this.withRevision(instance.getRevision());
this.withSecret(instance.getSecret());
}
/**
* This method has been deprecated, please use method buildRevision instead.
*/
@Deprecated public SourceRevision getRevision(){
return this.revision!=null?this.revision.build():null;
}
public SourceRevision buildRevision(){
return this.revision!=null?this.revision.build():null;
}
public A withRevision(SourceRevision revision){
_visitables.remove(this.revision);
if (revision!=null){ this.revision= new SourceRevisionBuilder(revision); _visitables.add(this.revision);} return (A) this;
}
public Boolean hasRevision(){
return this.revision!=null;
}
public GenericWebHookCauseFluent.RevisionNested withNewRevision(){
return new RevisionNestedImpl();
}
public GenericWebHookCauseFluent.RevisionNested withNewRevisionLike(SourceRevision item){
return new RevisionNestedImpl(item);
}
public GenericWebHookCauseFluent.RevisionNested editRevision(){
return withNewRevisionLike(getRevision());
}
public GenericWebHookCauseFluent.RevisionNested editOrNewRevision(){
return withNewRevisionLike(getRevision() != null ? getRevision(): new SourceRevisionBuilder().build());
}
public GenericWebHookCauseFluent.RevisionNested editOrNewRevisionLike(SourceRevision item){
return withNewRevisionLike(getRevision() != null ? getRevision(): item);
}
public String getSecret(){
return this.secret;
}
public A withSecret(String secret){
this.secret=secret; return (A) this;
}
public Boolean hasSecret(){
return this.secret!=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;
GenericWebHookCauseFluentImpl that = (GenericWebHookCauseFluentImpl) o;
if (revision != null ? !revision.equals(that.revision) :that.revision != null) return false;
if (secret != null ? !secret.equals(that.secret) :that.secret != null) return false;
return true;
}
public class RevisionNestedImpl extends SourceRevisionFluentImpl> implements GenericWebHookCauseFluent.RevisionNested,io.alauda.kubernetes.api.builder.Nested{
private final SourceRevisionBuilder builder;
RevisionNestedImpl(SourceRevision item){
this.builder = new SourceRevisionBuilder(this, item);
}
RevisionNestedImpl(){
this.builder = new SourceRevisionBuilder(this);
}
public N and(){
return (N) GenericWebHookCauseFluentImpl.this.withRevision(builder.build());
}
public N endRevision(){
return and();
}
}
}