Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to extend broker responses #363

Open
wants to merge 3 commits into
base: 4.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public static CreateServiceInstanceBindingRequestBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -305,7 +305,7 @@ public final boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), serviceDefinitionId, serviceInstanceId, planId, bindingId,
appGuid, bindResource, serviceDefinition, plan);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static DeleteServiceInstanceBindingRequestBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -210,7 +210,7 @@ public final boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), serviceInstanceId, bindingId,
serviceDefinitionId, planId, serviceDefinition, plan);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static GetLastServiceBindingOperationRequestBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -173,7 +173,7 @@ public final boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), serviceInstanceId, bindingId, serviceDefinitionId, planId, operation);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,32 @@ public static GetLastServiceBindingOperationResponseBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof GetLastServiceBindingOperationResponse)) {
return false;
}
GetLastServiceBindingOperationResponse that = (GetLastServiceBindingOperationResponse) o;
return deleteOperation == that.deleteOperation &&
return that.canEqual(this) &&
deleteOperation == that.deleteOperation &&
state == that.state &&
Objects.equals(description, that.description);
}

/**
* Is another object type compatible with this object
*
* @param other the other object
* @return true of compatible
*/
public boolean canEqual(Object other) {
return other instanceof GetLastServiceBindingOperationResponse;
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(state, description, deleteOperation);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static GetServiceInstanceBindingRequestBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -153,7 +153,7 @@ public final boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), serviceInstanceId, bindingId, serviceDefinitionId, planId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,29 @@ public List<ServiceDefinition> getServiceDefinitions() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Catalog)) {
return false;
}
Catalog catalog = (Catalog) o;
return Objects.equals(serviceDefinitions, catalog.serviceDefinitions);
return catalog.canEqual(this) && Objects.equals(serviceDefinitions, catalog.serviceDefinitions);
}

/**
* Is another object type compatible with this object
*
* @param other the other object
* @return true of compatible
*/
public boolean canEqual(Object other) {
return other instanceof Catalog;
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(serviceDefinitions);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,16 @@ public static ServiceDefinitionBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ServiceDefinition)) {
return false;
}
ServiceDefinition that = (ServiceDefinition) o;
return bindable == that.bindable &&
return that.canEqual(this) &&
bindable == that.bindable &&
Objects.equals(planUpdateable, that.planUpdateable) &&
Objects.equals(instancesRetrievable, that.instancesRetrievable) &&
Objects.equals(bindingsRetrievable, that.bindingsRetrievable) &&
Expand All @@ -274,8 +275,18 @@ public final boolean equals(Object o) {
Objects.equals(dashboardClient, that.dashboardClient);
}

/**
* Is another object type compatible with this object
*
* @param other the other object
* @return true of compatible
*/
public boolean canEqual(Object other) {
return other instanceof ServiceDefinition;
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(id, name, description, bindable, planUpdateable,
instancesRetrievable, bindingsRetrievable, allowContextUpdates,
plans, tags, metadata, requires, dashboardClient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public static CreateServiceInstanceRequestBuilder builder() {
* {@inheritDoc}
*/
@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -352,7 +352,7 @@ public boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), serviceDefinitionId, planId,
organizationGuid, spaceGuid, serviceInstanceId, serviceDefinition, plan, maintenanceInfo);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static CreateServiceInstanceResponseBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -133,7 +133,7 @@ public boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), dashboardUrl, instanceExisted, metadata);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public static DeleteServiceInstanceRequestBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -193,7 +193,7 @@ public final boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), serviceInstanceId,
serviceDefinitionId, planId, serviceDefinition, plan);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static GetLastServiceOperationRequestBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -154,7 +154,7 @@ public final boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), serviceInstanceId, serviceDefinitionId, planId, operation);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,35 @@ public static GetLastServiceOperationResponseBuilder builder() {
return new GetLastServiceOperationResponseBuilder();
}

/**
* Is another object type compatible with this object
*
* @param other the other object
* @return true of compatible
*/
public boolean canEqual(Object other) {
return other instanceof GetLastServiceOperationResponse;
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof GetLastServiceOperationResponse)) {
return false;
}
GetLastServiceOperationResponse that = (GetLastServiceOperationResponse) o;
return state == that.state &&
return that.canEqual(this) &&
state == that.state &&
Objects.equals(description, that.description) &&
Objects.equals(instanceUsable, that.instanceUsable) &&
Objects.equals(updateRepeatable, that.updateRepeatable) &&
deleteOperation == that.deleteOperation;
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(state, description, instanceUsable, updateRepeatable, deleteOperation);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static GetServiceInstanceRequestBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -134,7 +134,7 @@ public final boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), serviceInstanceId, serviceDefinitionId, planId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static GetServiceInstanceResponseBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -146,7 +146,7 @@ public final boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(serviceDefinitionId, planId, dashboardUrl, parameters);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public static UpdateServiceInstanceRequestBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -267,7 +267,7 @@ public final boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), serviceDefinitionId, planId, previousValues,
serviceInstanceId, serviceDefinition, plan, maintenanceInfo);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static UpdateServiceInstanceResponseBuilder builder() {
}

@Override
public final boolean equals(Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand All @@ -115,7 +115,7 @@ public boolean canEqual(Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return Objects.hash(super.hashCode(), dashboardUrl, metadata);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ public interface CatalogService {
*
* @return the catalog of services
*/
Mono<Catalog> getCatalog();
<T extends Catalog> Mono<T> getCatalog();

/**
* Get a service definition from the catalog by ID.
*
* @param serviceId The ID of the service definition in the catalog
* @return the service definition, or null if it doesn't exist
*/
Mono<ServiceDefinition> getServiceDefinition(String serviceId);
<T extends ServiceDefinition> Mono<T> getServiceDefinition(String serviceId);

/**
* Return the {@link ResponseEntity} with catalog of services provided by the service broker. Implementing
Expand Down
Loading