Skip to content

Commit

Permalink
ran spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Calum Murray <cmurray@redhat.com>
  • Loading branch information
Cali0707 committed Jul 28, 2023
1 parent f6c9f16 commit 7364576
Show file tree
Hide file tree
Showing 6 changed files with 319 additions and 308 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import io.fabric8.kubernetes.api.model.Namespaced;
import io.fabric8.kubernetes.client.CustomResource;
import io.fabric8.kubernetes.model.annotation.Group;
import io.fabric8.kubernetes.model.annotation.Version;
import io.fabric8.kubernetes.model.annotation.Kind;
import io.fabric8.kubernetes.model.annotation.Version;

@Group("eventing.knative.dev")
@Version("v1beta2")
@Kind("EventType")
public class EventType extends CustomResource<EventTypeSpec, EventTypeStatus> implements Namespaced { }
public class EventType extends CustomResource<EventTypeSpec, EventTypeStatus> implements Namespaced {}
Original file line number Diff line number Diff line change
Expand Up @@ -20,57 +20,57 @@

public class EventTypeBuilder {

private final EventTypeSpec spec;
private final ObjectMetaBuilder objectMetaBuilder;
private final EventTypeSpec spec;
private final ObjectMetaBuilder objectMetaBuilder;

public EventTypeBuilder() {
this.spec = new EventTypeSpec();
this.objectMetaBuilder = new ObjectMetaBuilder();
}
public EventTypeBuilder() {
this.spec = new EventTypeSpec();
this.objectMetaBuilder = new ObjectMetaBuilder();
}

public EventType build() {
var eventType = new EventType();
eventType.setSpec(this.getSpec());
eventType.setMetadata(this.objectMetaBuilder.build());
return eventType;
}
public EventType build() {
var eventType = new EventType();
eventType.setSpec(this.getSpec());
eventType.setMetadata(this.objectMetaBuilder.build());
return eventType;
}

private EventTypeSpec getSpec() {
return this.spec;
}
private EventTypeSpec getSpec() {
return this.spec;
}

public EventTypeBuilder withBroker(String broker) {
this.spec.setBroker(broker);
return this;
}
public EventTypeBuilder withBroker(String broker) {
this.spec.setBroker(broker);
return this;
}

public EventTypeBuilder withReference(KReference reference) {
this.spec.setReference(reference);
return this;
}
public EventTypeBuilder withReference(KReference reference) {
this.spec.setReference(reference);
return this;
}

public EventTypeBuilder withDescription(String description) {
this.spec.setDescription(description);
return this;
}
public EventTypeBuilder withDescription(String description) {
this.spec.setDescription(description);
return this;
}

public EventTypeBuilder withSchema(String schema) {
this.spec.setSchema(schema);
return this;
}
public EventTypeBuilder withSchema(String schema) {
this.spec.setSchema(schema);
return this;
}

public EventTypeBuilder withName(String name) {
this.objectMetaBuilder.withName(name);
return this;
}
public EventTypeBuilder withName(String name) {
this.objectMetaBuilder.withName(name);
return this;
}

public EventTypeBuilder withNamespace(String namespace) {
this.objectMetaBuilder.withNamespace(namespace);
return this;
}
public EventTypeBuilder withNamespace(String namespace) {
this.objectMetaBuilder.withNamespace(namespace);
return this;
}

public EventTypeBuilder withSchemaDescription(String schemaDescription) {
this.spec.setSchemaDescription(schemaDescription);
return this;
}
public EventTypeBuilder withSchemaDescription(String schemaDescription) {
this.spec.setSchemaDescription(schemaDescription);
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,107 +21,117 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.fabric8.kubernetes.api.model.KubernetesResource;
import io.fabric8.kubernetes.api.model.autoscaling.v2.CrossVersionObjectReference;

import java.util.Objects;

@JsonDeserialize
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({"broker", "reference", "description", "schema", "schemaData"})
public class EventTypeSpec implements KubernetesResource {
@JsonProperty("broker")
private String broker;

@JsonProperty("reference")
private KReference reference;

@JsonProperty("description")
private String description;

@JsonProperty("schema")
private String schema;

@JsonProperty("schemaDescription")
private String schemaDescription;

public EventTypeSpec() {}

public EventTypeSpec(String broker, KReference reference, String description, String schema, String schemaDescription) {
this.broker = broker;
this.reference = reference;
this.description = description;
this.schema = schema;
this.schemaDescription = schemaDescription;
}

@JsonProperty("broker")
public String getBroker() {
return this.broker;
}

@JsonProperty("broker")
public void setBroker(String broker) {
this.broker = broker;
}

@JsonProperty("reference")
public KReference getReference() {
return this.reference;
}

@JsonProperty("reference")
public void setReference(KReference reference) {
this.reference = reference;
}

@JsonProperty("description")
public String getDescription() {
return this.description;
}

@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}

@JsonProperty("schema")
public String getSchema() {
return this.schema;
}

@JsonProperty("schema")
public void setSchema(String schema) {
this.schema = schema;
}

@JsonProperty("schemaDescription")
public String getSchemaDescription() {
return this.schemaDescription;
}

@JsonProperty("schemaDescription")
public void setSchemaDescription(String schemaDescription) {
this.schemaDescription = schemaDescription;
}

public String toString() {
return "EventType{broker: " + this.getBroker() + ", " + "reference: " + this.getReference().toString() + ", description: " + this.getDescription() + ", schema: " + this.getSchema() + ", schemaDescription:" + this.getSchemaDescription();
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof EventTypeSpec)) return false;
EventTypeSpec that = (EventTypeSpec) o;
return Objects.equals(this.getBroker(), that.getBroker()) && Objects.equals(this.getReference(), that.getReference()) && Objects.equals(this.getDescription(), that.getDescription()) && Objects.equals(this.getSchema(), that.getSchema()) && Objects.equals(this.getSchemaDescription(), that.getSchemaDescription());
}

protected boolean canEqual(Object o) {
return o instanceof EventTypeSpec;
}

@Override
public int hashCode() {
return Objects.hash(this.getBroker(), this.getReference(), this.getDescription(), this.getSchema(), this.getSchemaDescription());
}
@JsonProperty("broker")
private String broker;

@JsonProperty("reference")
private KReference reference;

@JsonProperty("description")
private String description;

@JsonProperty("schema")
private String schema;

@JsonProperty("schemaDescription")
private String schemaDescription;

public EventTypeSpec() {}

public EventTypeSpec(
String broker, KReference reference, String description, String schema, String schemaDescription) {
this.broker = broker;
this.reference = reference;
this.description = description;
this.schema = schema;
this.schemaDescription = schemaDescription;
}

@JsonProperty("broker")
public String getBroker() {
return this.broker;
}

@JsonProperty("broker")
public void setBroker(String broker) {
this.broker = broker;
}

@JsonProperty("reference")
public KReference getReference() {
return this.reference;
}

@JsonProperty("reference")
public void setReference(KReference reference) {
this.reference = reference;
}

@JsonProperty("description")
public String getDescription() {
return this.description;
}

@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}

@JsonProperty("schema")
public String getSchema() {
return this.schema;
}

@JsonProperty("schema")
public void setSchema(String schema) {
this.schema = schema;
}

@JsonProperty("schemaDescription")
public String getSchemaDescription() {
return this.schemaDescription;
}

@JsonProperty("schemaDescription")
public void setSchemaDescription(String schemaDescription) {
this.schemaDescription = schemaDescription;
}

public String toString() {
return "EventType{broker: " + this.getBroker() + ", " + "reference: "
+ this.getReference().toString() + ", description: " + this.getDescription() + ", schema: "
+ this.getSchema() + ", schemaDescription:" + this.getSchemaDescription();
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof EventTypeSpec)) return false;
EventTypeSpec that = (EventTypeSpec) o;
return Objects.equals(this.getBroker(), that.getBroker())
&& Objects.equals(this.getReference(), that.getReference())
&& Objects.equals(this.getDescription(), that.getDescription())
&& Objects.equals(this.getSchema(), that.getSchema())
&& Objects.equals(this.getSchemaDescription(), that.getSchemaDescription());
}

protected boolean canEqual(Object o) {
return o instanceof EventTypeSpec;
}

@Override
public int hashCode() {
return Objects.hash(
this.getBroker(),
this.getReference(),
this.getDescription(),
this.getSchema(),
this.getSchemaDescription());
}
}
Loading

0 comments on commit 7364576

Please sign in to comment.