-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from orkes-io/task_search
Task search api
- Loading branch information
Showing
8 changed files
with
537 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
189 changes: 87 additions & 102 deletions
189
src/main/java/io/orkes/conductor/client/model/SearchResultTaskSummary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,117 +1,102 @@ | ||
/* | ||
* Copyright 2022 Orkes, Inc. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
package io.orkes.conductor.client.model; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
import com.netflix.conductor.common.run.TaskSummary; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
/** | ||
* SearchResultTaskSummary | ||
*/ | ||
|
||
/** SearchResultTaskSummary */ | ||
public class SearchResultTaskSummary { | ||
@SerializedName("results") | ||
private List<TaskSummary> results = null; | ||
|
||
@SerializedName("totalHits") | ||
private Long totalHits = null; | ||
|
||
public SearchResultTaskSummary results(List<TaskSummary> results) { | ||
this.results = results; | ||
return this; | ||
} | ||
|
||
public SearchResultTaskSummary addResultsItem(TaskSummary resultsItem) { | ||
if (this.results == null) { | ||
this.results = new ArrayList<TaskSummary>(); | ||
} | ||
this.results.add(resultsItem); | ||
return this; | ||
} | ||
|
||
/** | ||
* Get results | ||
* | ||
* @return results | ||
*/ | ||
@Schema(description = "") | ||
public List<TaskSummary> getResults() { | ||
return results; | ||
} | ||
private List<TaskSummary> results = null; | ||
|
||
public void setResults(List<TaskSummary> results) { | ||
this.results = results; | ||
} | ||
|
||
public SearchResultTaskSummary totalHits(Long totalHits) { | ||
this.totalHits = totalHits; | ||
return this; | ||
} | ||
private Long totalHits = null; | ||
|
||
/** | ||
* Get totalHits | ||
* | ||
* @return totalHits | ||
*/ | ||
@Schema(description = "") | ||
public Long getTotalHits() { | ||
return totalHits; | ||
} | ||
public SearchResultTaskSummary results(List<TaskSummary> results) { | ||
this.results = results; | ||
return this; | ||
} | ||
|
||
public void setTotalHits(Long totalHits) { | ||
this.totalHits = totalHits; | ||
public SearchResultTaskSummary addResultsItem(TaskSummary resultsItem) { | ||
if (this.results == null) { | ||
this.results = new ArrayList<TaskSummary>(); | ||
} | ||
|
||
@Override | ||
public boolean equals(java.lang.Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
SearchResultTaskSummary searchResultTaskSummary = (SearchResultTaskSummary) o; | ||
return Objects.equals(this.results, searchResultTaskSummary.results) | ||
&& Objects.equals(this.totalHits, searchResultTaskSummary.totalHits); | ||
this.results.add(resultsItem); | ||
return this; | ||
} | ||
|
||
/** | ||
* Get results | ||
* @return results | ||
**/ | ||
@Schema(description = "") | ||
public List<TaskSummary> getResults() { | ||
return results; | ||
} | ||
|
||
public void setResults(List<TaskSummary> results) { | ||
this.results = results; | ||
} | ||
|
||
public SearchResultTaskSummary totalHits(Long totalHits) { | ||
this.totalHits = totalHits; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get totalHits | ||
* @return totalHits | ||
**/ | ||
@Schema(description = "") | ||
public Long getTotalHits() { | ||
return totalHits; | ||
} | ||
|
||
public void setTotalHits(Long totalHits) { | ||
this.totalHits = totalHits; | ||
} | ||
|
||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(results, totalHits); | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class SearchResultTaskSummary {\n"); | ||
|
||
sb.append(" results: ").append(toIndentedString(results)).append("\n"); | ||
sb.append(" totalHits: ").append(toIndentedString(totalHits)).append("\n"); | ||
sb.append("}"); | ||
return sb.toString(); | ||
SearchResultTaskSummary searchResultTaskSummary = (SearchResultTaskSummary) o; | ||
return Objects.equals(this.results, searchResultTaskSummary.results) && | ||
Objects.equals(this.totalHits, searchResultTaskSummary.totalHits); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(results, totalHits); | ||
} | ||
|
||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class SearchResultTaskSummary {\n"); | ||
|
||
sb.append(" results: ").append(toIndentedString(results)).append("\n"); | ||
sb.append(" totalHits: ").append(toIndentedString(totalHits)).append("\n"); | ||
sb.append("}"); | ||
return sb.toString(); | ||
} | ||
|
||
/** | ||
* Convert the given object to string with each line indented by 4 spaces | ||
* (except the first line). | ||
*/ | ||
private String toIndentedString(Object o) { | ||
if (o == null) { | ||
return "null"; | ||
} | ||
return o.toString().replace("\n", "\n "); | ||
} | ||
|
||
/** | ||
* Convert the given object to string with each line indented by 4 spaces (except the first | ||
* line). | ||
*/ | ||
private String toIndentedString(java.lang.Object o) { | ||
if (o == null) { | ||
return "null"; | ||
} | ||
return o.toString().replace("\n", "\n "); | ||
} | ||
} |
Oops, something went wrong.