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

feat(specs): add search endpoints #50

Merged
merged 1 commit into from
Dec 28, 2021
Merged
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
@@ -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