Skip to content

Commit

Permalink
feat(specs): add search endpoints (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Dec 28, 2021
1 parent 6587e94 commit 81d5915
Show file tree
Hide file tree
Showing 28 changed files with 2,236 additions and 22 deletions.
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 ");
}
}
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 ");
}
}
Loading

0 comments on commit 81d5915

Please sign in to comment.