-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specs): add
search
endpoints (#50)
- Loading branch information
Showing
28 changed files
with
2,236 additions
and
22 deletions.
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
.../algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BaseBrowseResponse.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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package com.algolia.model; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import java.util.Objects; | ||
|
||
/** BaseBrowseResponse */ | ||
public class BaseBrowseResponse { | ||
|
||
public static final String SERIALIZED_NAME_CURSOR = "cursor"; | ||
|
||
@SerializedName(SERIALIZED_NAME_CURSOR) | ||
private String cursor; | ||
|
||
public BaseBrowseResponse cursor(String cursor) { | ||
this.cursor = cursor; | ||
return this; | ||
} | ||
|
||
/** | ||
* Cursor indicating the location to resume browsing from. Must match the value returned by the | ||
* previous call. | ||
* | ||
* @return cursor | ||
*/ | ||
@javax.annotation.Nonnull | ||
@ApiModelProperty( | ||
example = "jMDY3M2MwM2QwMWUxMmQwYWI0ZTN", | ||
required = true, | ||
value = "Cursor indicating the location to resume browsing from. Must match the value returned by" + | ||
" the previous call." | ||
) | ||
public String getCursor() { | ||
return cursor; | ||
} | ||
|
||
public void setCursor(String cursor) { | ||
this.cursor = cursor; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
BaseBrowseResponse baseBrowseResponse = (BaseBrowseResponse) o; | ||
return Objects.equals(this.cursor, baseBrowseResponse.cursor); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(cursor); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class BaseBrowseResponse {\n"); | ||
sb.append(" cursor: ").append(toIndentedString(cursor)).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 "); | ||
} | ||
} |
104 changes: 104 additions & 0 deletions
104
clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/BrowseRequest.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 |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package com.algolia.model; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import java.util.Objects; | ||
|
||
/** BrowseRequest */ | ||
public class BrowseRequest { | ||
|
||
public static final String SERIALIZED_NAME_PARAMS = "params"; | ||
|
||
@SerializedName(SERIALIZED_NAME_PARAMS) | ||
private String params = ""; | ||
|
||
public static final String SERIALIZED_NAME_CURSOR = "cursor"; | ||
|
||
@SerializedName(SERIALIZED_NAME_CURSOR) | ||
private String cursor; | ||
|
||
public BrowseRequest params(String params) { | ||
this.params = params; | ||
return this; | ||
} | ||
|
||
/** | ||
* Search parameters as URL-encoded query string. | ||
* | ||
* @return params | ||
*/ | ||
@javax.annotation.Nullable | ||
@ApiModelProperty(value = "Search parameters as URL-encoded query string.") | ||
public String getParams() { | ||
return params; | ||
} | ||
|
||
public void setParams(String params) { | ||
this.params = params; | ||
} | ||
|
||
public BrowseRequest cursor(String cursor) { | ||
this.cursor = cursor; | ||
return this; | ||
} | ||
|
||
/** | ||
* Cursor indicating the location to resume browsing from. Must match the value returned by the | ||
* previous call. | ||
* | ||
* @return cursor | ||
*/ | ||
@javax.annotation.Nullable | ||
@ApiModelProperty( | ||
example = "jMDY3M2MwM2QwMWUxMmQwYWI0ZTN", | ||
value = "Cursor indicating the location to resume browsing from. Must match the value returned by" + | ||
" the previous call." | ||
) | ||
public String getCursor() { | ||
return cursor; | ||
} | ||
|
||
public void setCursor(String cursor) { | ||
this.cursor = cursor; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
BrowseRequest browseRequest = (BrowseRequest) o; | ||
return ( | ||
Objects.equals(this.params, browseRequest.params) && | ||
Objects.equals(this.cursor, browseRequest.cursor) | ||
); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(params, cursor); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class BrowseRequest {\n"); | ||
sb.append(" params: ").append(toIndentedString(params)).append("\n"); | ||
sb.append(" cursor: ").append(toIndentedString(cursor)).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 "); | ||
} | ||
} |
Oops, something went wrong.