io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluentImpl Maven / Gradle / Ivy
package io.fabric8.knative.eventing.contrib.github.v1alpha1;
import io.fabric8.knative.internal.pkg.apis.duck.v1.Destination;
import io.fabric8.kubernetes.api.builder.Nested;
import java.util.ArrayList;
import java.lang.String;
import java.util.function.Predicate;
import io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.List;
import io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder;
import java.lang.Boolean;
import java.lang.Integer;
import io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesFluentImpl;
import io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder;
import java.util.Collection;
import java.lang.Object;
import io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluentImpl;
/**
* Generated
*/
public class GitHubSourceSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent{
public GitHubSourceSpecFluentImpl() {
}
public GitHubSourceSpecFluentImpl(io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpec instance) {
this.withAccessToken(instance.getAccessToken());
this.withCeOverrides(instance.getCeOverrides());
this.withEventTypes(instance.getEventTypes());
this.withGithubAPIURL(instance.getGithubAPIURL());
this.withOwnerAndRepository(instance.getOwnerAndRepository());
this.withSecretToken(instance.getSecretToken());
this.withSecure(instance.getSecure());
this.withServiceAccountName(instance.getServiceAccountName());
this.withSink(instance.getSink());
}
private io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder accessToken;
private io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder ceOverrides;
private java.util.List eventTypes;
private java.lang.String githubAPIURL;
private java.lang.String ownerAndRepository;
private io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder secretToken;
private java.lang.Boolean secure;
private java.lang.String serviceAccountName;
private io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder sink;
/**
* This method has been deprecated, please use method buildAccessToken instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource getAccessToken() {
return this.accessToken!=null?this.accessToken.build():null;
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource buildAccessToken() {
return this.accessToken!=null?this.accessToken.build():null;
}
public A withAccessToken(io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource accessToken) {
_visitables.get("accessToken").remove(this.accessToken);
if (accessToken!=null){ this.accessToken= new io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder(accessToken); _visitables.get("accessToken").add(this.accessToken);} return (A) this;
}
public java.lang.Boolean hasAccessToken() {
return this.accessToken != null;
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.AccessTokenNested withNewAccessToken() {
return new io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluentImpl.AccessTokenNestedImpl();
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.AccessTokenNested withNewAccessTokenLike(io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource item) {
return new io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluentImpl.AccessTokenNestedImpl(item);
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.AccessTokenNested editAccessToken() {
return withNewAccessTokenLike(getAccessToken());
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.AccessTokenNested editOrNewAccessToken() {
return withNewAccessTokenLike(getAccessToken() != null ? getAccessToken(): new io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder().build());
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.AccessTokenNested editOrNewAccessTokenLike(io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource item) {
return withNewAccessTokenLike(getAccessToken() != null ? getAccessToken(): item);
}
/**
* This method has been deprecated, please use method buildCeOverrides instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides getCeOverrides() {
return this.ceOverrides!=null?this.ceOverrides.build():null;
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides buildCeOverrides() {
return this.ceOverrides!=null?this.ceOverrides.build():null;
}
public A withCeOverrides(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides ceOverrides) {
_visitables.get("ceOverrides").remove(this.ceOverrides);
if (ceOverrides!=null){ this.ceOverrides= new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder(ceOverrides); _visitables.get("ceOverrides").add(this.ceOverrides);} return (A) this;
}
public java.lang.Boolean hasCeOverrides() {
return this.ceOverrides != null;
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.CeOverridesNested withNewCeOverrides() {
return new io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluentImpl.CeOverridesNestedImpl();
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.CeOverridesNested withNewCeOverridesLike(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides item) {
return new io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluentImpl.CeOverridesNestedImpl(item);
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.CeOverridesNested editCeOverrides() {
return withNewCeOverridesLike(getCeOverrides());
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.CeOverridesNested editOrNewCeOverrides() {
return withNewCeOverridesLike(getCeOverrides() != null ? getCeOverrides(): new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder().build());
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.CeOverridesNested editOrNewCeOverridesLike(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides item) {
return withNewCeOverridesLike(getCeOverrides() != null ? getCeOverrides(): item);
}
public A addToEventTypes(java.lang.Integer index,java.lang.String item) {
if (this.eventTypes == null) {this.eventTypes = new java.util.ArrayList();}
this.eventTypes.add(index, item);
return (A)this;
}
public A setToEventTypes(java.lang.Integer index,java.lang.String item) {
if (this.eventTypes == null) {this.eventTypes = new java.util.ArrayList();}
this.eventTypes.set(index, item); return (A)this;
}
public A addToEventTypes(java.lang.String... items) {
if (this.eventTypes == null) {this.eventTypes = new java.util.ArrayList();}
for (java.lang.String item : items) {this.eventTypes.add(item);} return (A)this;
}
public A addAllToEventTypes(java.util.Collection items) {
if (this.eventTypes == null) {this.eventTypes = new java.util.ArrayList();}
for (java.lang.String item : items) {this.eventTypes.add(item);} return (A)this;
}
public A removeFromEventTypes(java.lang.String... items) {
for (java.lang.String item : items) {if (this.eventTypes!= null){ this.eventTypes.remove(item);}} return (A)this;
}
public A removeAllFromEventTypes(java.util.Collection items) {
for (java.lang.String item : items) {if (this.eventTypes!= null){ this.eventTypes.remove(item);}} return (A)this;
}
public java.util.List getEventTypes() {
return this.eventTypes;
}
public java.lang.String getEventType(java.lang.Integer index) {
return this.eventTypes.get(index);
}
public java.lang.String getFirstEventType() {
return this.eventTypes.get(0);
}
public java.lang.String getLastEventType() {
return this.eventTypes.get(eventTypes.size() - 1);
}
public java.lang.String getMatchingEventType(java.util.function.Predicate predicate) {
for (java.lang.String item: eventTypes) { if(predicate.test(item)){ return item;} } return null;
}
public java.lang.Boolean hasMatchingEventType(java.util.function.Predicate predicate) {
for (java.lang.String item: eventTypes) { if(predicate.test(item)){ return true;} } return false;
}
public A withEventTypes(java.util.List eventTypes) {
if (eventTypes != null) {this.eventTypes = new java.util.ArrayList(); for (java.lang.String item : eventTypes){this.addToEventTypes(item);}} else { this.eventTypes = null;} return (A) this;
}
public A withEventTypes(java.lang.String... eventTypes) {
if (this.eventTypes != null) {this.eventTypes.clear();}
if (eventTypes != null) {for (java.lang.String item :eventTypes){ this.addToEventTypes(item);}} return (A) this;
}
public java.lang.Boolean hasEventTypes() {
return eventTypes != null && !eventTypes.isEmpty();
}
public A addNewEventType(java.lang.String arg0) {
return (A)addToEventTypes(new String(arg0));
}
public java.lang.String getGithubAPIURL() {
return this.githubAPIURL;
}
public A withGithubAPIURL(java.lang.String githubAPIURL) {
this.githubAPIURL=githubAPIURL; return (A) this;
}
public java.lang.Boolean hasGithubAPIURL() {
return this.githubAPIURL != null;
}
/**
* Method is deprecated. use withGithubAPIURL instead.
*/
@java.lang.Deprecated
public A withNewGithubAPIURL(java.lang.String arg0) {
return (A)withGithubAPIURL(new String(arg0));
}
public java.lang.String getOwnerAndRepository() {
return this.ownerAndRepository;
}
public A withOwnerAndRepository(java.lang.String ownerAndRepository) {
this.ownerAndRepository=ownerAndRepository; return (A) this;
}
public java.lang.Boolean hasOwnerAndRepository() {
return this.ownerAndRepository != null;
}
/**
* Method is deprecated. use withOwnerAndRepository instead.
*/
@java.lang.Deprecated
public A withNewOwnerAndRepository(java.lang.String arg0) {
return (A)withOwnerAndRepository(new String(arg0));
}
/**
* This method has been deprecated, please use method buildSecretToken instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource getSecretToken() {
return this.secretToken!=null?this.secretToken.build():null;
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource buildSecretToken() {
return this.secretToken!=null?this.secretToken.build():null;
}
public A withSecretToken(io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource secretToken) {
_visitables.get("secretToken").remove(this.secretToken);
if (secretToken!=null){ this.secretToken= new io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder(secretToken); _visitables.get("secretToken").add(this.secretToken);} return (A) this;
}
public java.lang.Boolean hasSecretToken() {
return this.secretToken != null;
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SecretTokenNested withNewSecretToken() {
return new io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluentImpl.SecretTokenNestedImpl();
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SecretTokenNested withNewSecretTokenLike(io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource item) {
return new io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluentImpl.SecretTokenNestedImpl(item);
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SecretTokenNested editSecretToken() {
return withNewSecretTokenLike(getSecretToken());
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SecretTokenNested editOrNewSecretToken() {
return withNewSecretTokenLike(getSecretToken() != null ? getSecretToken(): new io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder().build());
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SecretTokenNested editOrNewSecretTokenLike(io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource item) {
return withNewSecretTokenLike(getSecretToken() != null ? getSecretToken(): item);
}
public java.lang.Boolean getSecure() {
return this.secure;
}
public A withSecure(java.lang.Boolean secure) {
this.secure=secure; return (A) this;
}
public java.lang.Boolean hasSecure() {
return this.secure != null;
}
public java.lang.String getServiceAccountName() {
return this.serviceAccountName;
}
public A withServiceAccountName(java.lang.String serviceAccountName) {
this.serviceAccountName=serviceAccountName; return (A) this;
}
public java.lang.Boolean hasServiceAccountName() {
return this.serviceAccountName != null;
}
/**
* Method is deprecated. use withServiceAccountName instead.
*/
@java.lang.Deprecated
public A withNewServiceAccountName(java.lang.String arg0) {
return (A)withServiceAccountName(new String(arg0));
}
/**
* This method has been deprecated, please use method buildSink instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public io.fabric8.knative.internal.pkg.apis.duck.v1.Destination getSink() {
return this.sink!=null?this.sink.build():null;
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.Destination buildSink() {
return this.sink!=null?this.sink.build():null;
}
public A withSink(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination sink) {
_visitables.get("sink").remove(this.sink);
if (sink!=null){ this.sink= new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder(sink); _visitables.get("sink").add(this.sink);} return (A) this;
}
public java.lang.Boolean hasSink() {
return this.sink != null;
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SinkNested withNewSink() {
return new io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluentImpl.SinkNestedImpl();
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SinkNested withNewSinkLike(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
return new io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluentImpl.SinkNestedImpl(item);
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SinkNested editSink() {
return withNewSinkLike(getSink());
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SinkNested editOrNewSink() {
return withNewSinkLike(getSink() != null ? getSink(): new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder().build());
}
public io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SinkNested editOrNewSinkLike(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
return withNewSinkLike(getSink() != null ? getSink(): item);
}
public boolean equals(java.lang.Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
GitHubSourceSpecFluentImpl that = (GitHubSourceSpecFluentImpl) o;
if (accessToken != null ? !accessToken.equals(that.accessToken) :that.accessToken != null) return false;
if (ceOverrides != null ? !ceOverrides.equals(that.ceOverrides) :that.ceOverrides != null) return false;
if (eventTypes != null ? !eventTypes.equals(that.eventTypes) :that.eventTypes != null) return false;
if (githubAPIURL != null ? !githubAPIURL.equals(that.githubAPIURL) :that.githubAPIURL != null) return false;
if (ownerAndRepository != null ? !ownerAndRepository.equals(that.ownerAndRepository) :that.ownerAndRepository != null) return false;
if (secretToken != null ? !secretToken.equals(that.secretToken) :that.secretToken != null) return false;
if (secure != null ? !secure.equals(that.secure) :that.secure != null) return false;
if (serviceAccountName != null ? !serviceAccountName.equals(that.serviceAccountName) :that.serviceAccountName != null) return false;
if (sink != null ? !sink.equals(that.sink) :that.sink != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(accessToken, ceOverrides, eventTypes, githubAPIURL, ownerAndRepository, secretToken, secure, serviceAccountName, sink, super.hashCode());
}
public class AccessTokenNestedImpl extends io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceFluentImpl> implements io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.AccessTokenNested,io.fabric8.kubernetes.api.builder.Nested{
AccessTokenNestedImpl(io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource item) {
this.builder = new io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder(this, item);
}
AccessTokenNestedImpl() {
this.builder = new io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder(this);
}
io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder builder;
public N and() {
return (N) GitHubSourceSpecFluentImpl.this.withAccessToken(builder.build());
}
public N endAccessToken() {
return and();
}
}
public class CeOverridesNestedImpl extends io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesFluentImpl> implements io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.CeOverridesNested,io.fabric8.kubernetes.api.builder.Nested{
CeOverridesNestedImpl(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides item) {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder(this, item);
}
CeOverridesNestedImpl() {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder(this);
}
io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder builder;
public N and() {
return (N) GitHubSourceSpecFluentImpl.this.withCeOverrides(builder.build());
}
public N endCeOverrides() {
return and();
}
}
public class SecretTokenNestedImpl extends io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceFluentImpl> implements io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SecretTokenNested,io.fabric8.kubernetes.api.builder.Nested{
SecretTokenNestedImpl(io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSource item) {
this.builder = new io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder(this, item);
}
SecretTokenNestedImpl() {
this.builder = new io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder(this);
}
io.fabric8.knative.eventing.contrib.github.v1alpha1.SecretValueFromSourceBuilder builder;
public N and() {
return (N) GitHubSourceSpecFluentImpl.this.withSecretToken(builder.build());
}
public N endSecretToken() {
return and();
}
}
public class SinkNestedImpl extends io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluentImpl> implements io.fabric8.knative.eventing.contrib.github.v1alpha1.GitHubSourceSpecFluent.SinkNested,io.fabric8.kubernetes.api.builder.Nested{
SinkNestedImpl(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder(this, item);
}
SinkNestedImpl() {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder(this);
}
io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder builder;
public N and() {
return (N) GitHubSourceSpecFluentImpl.this.withSink(builder.build());
}
public N endSink() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy