Skip to content

Commit

Permalink
move model to package search
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp committed Feb 25, 2022
1 parent b7b1c59 commit 1f79eda
Show file tree
Hide file tree
Showing 117 changed files with 780 additions and 110 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.math.BigDecimal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** The `batchDictionaryEntries` parameters. */
public class BatchDictionaryEntriesParams {

@SerializedName("clearExistingDictionaryEntries")
private Boolean clearExistingDictionaryEntries = false;

@SerializedName("requests")
private List<BatchDictionaryEntriesRequest> requests = new ArrayList<>();

public BatchDictionaryEntriesParams clearExistingDictionaryEntries(
Boolean clearExistingDictionaryEntries
) {
this.clearExistingDictionaryEntries = clearExistingDictionaryEntries;
return this;
}

/**
* When `true`, start the batch by removing all the custom entries from the dictionary.
*
* @return clearExistingDictionaryEntries
*/
@javax.annotation.Nullable
public Boolean getClearExistingDictionaryEntries() {
return clearExistingDictionaryEntries;
}

public void setClearExistingDictionaryEntries(
Boolean clearExistingDictionaryEntries
) {
this.clearExistingDictionaryEntries = clearExistingDictionaryEntries;
}

public BatchDictionaryEntriesParams requests(
List<BatchDictionaryEntriesRequest> requests
) {
this.requests = requests;
return this;
}

public BatchDictionaryEntriesParams addRequestsItem(
BatchDictionaryEntriesRequest requestsItem
) {
this.requests.add(requestsItem);
return this;
}

/**
* List of operations to batch. Each operation is described by an `action` and a `body`.
*
* @return requests
*/
@javax.annotation.Nonnull
public List<BatchDictionaryEntriesRequest> getRequests() {
return requests;
}

public void setRequests(List<BatchDictionaryEntriesRequest> requests) {
this.requests = requests;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BatchDictionaryEntriesParams batchDictionaryEntriesParams = (BatchDictionaryEntriesParams) o;
return (
Objects.equals(
this.clearExistingDictionaryEntries,
batchDictionaryEntriesParams.clearExistingDictionaryEntries
) &&
Objects.equals(this.requests, batchDictionaryEntriesParams.requests)
);
}

@Override
public int hashCode() {
return Objects.hash(clearExistingDictionaryEntries, requests);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BatchDictionaryEntriesParams {\n");
sb
.append(" clearExistingDictionaryEntries: ")
.append(toIndentedString(clearExistingDictionaryEntries))
.append("\n");
sb.append(" requests: ").append(toIndentedString(requests)).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,113 @@
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** The `batchDictionaryEntries` parameters. */
public class BatchDictionaryEntriesParams {

@SerializedName("clearExistingDictionaryEntries")
private Boolean clearExistingDictionaryEntries = false;

@SerializedName("requests")
private List<BatchDictionaryEntriesRequest> requests = new ArrayList<>();

public BatchDictionaryEntriesParams clearExistingDictionaryEntries(
Boolean clearExistingDictionaryEntries
) {
this.clearExistingDictionaryEntries = clearExistingDictionaryEntries;
return this;
}

/**
* When `true`, start the batch by removing all the custom entries from the dictionary.
*
* @return clearExistingDictionaryEntries
*/
@javax.annotation.Nullable
public Boolean getClearExistingDictionaryEntries() {
return clearExistingDictionaryEntries;
}

public void setClearExistingDictionaryEntries(
Boolean clearExistingDictionaryEntries
) {
this.clearExistingDictionaryEntries = clearExistingDictionaryEntries;
}

public BatchDictionaryEntriesParams requests(
List<BatchDictionaryEntriesRequest> requests
) {
this.requests = requests;
return this;
}

public BatchDictionaryEntriesParams addRequestsItem(
BatchDictionaryEntriesRequest requestsItem
) {
this.requests.add(requestsItem);
return this;
}

/**
* List of operations to batch. Each operation is described by an `action` and a `body`.
*
* @return requests
*/
@javax.annotation.Nonnull
public List<BatchDictionaryEntriesRequest> getRequests() {
return requests;
}

public void setRequests(List<BatchDictionaryEntriesRequest> requests) {
this.requests = requests;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BatchDictionaryEntriesParams batchDictionaryEntriesParams = (BatchDictionaryEntriesParams) o;
return (
Objects.equals(
this.clearExistingDictionaryEntries,
batchDictionaryEntriesParams.clearExistingDictionaryEntries
) &&
Objects.equals(this.requests, batchDictionaryEntriesParams.requests)
);
}

@Override
public int hashCode() {
return Objects.hash(clearExistingDictionaryEntries, requests);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BatchDictionaryEntriesParams {\n");
sb
.append(" clearExistingDictionaryEntries: ")
.append(toIndentedString(clearExistingDictionaryEntries))
.append("\n");
sb.append(" requests: ").append(toIndentedString(requests)).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
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.algolia.model;
package com.algolia.model.search;

import com.google.gson.annotations.SerializedName;
import java.util.Objects;
Expand Down
Loading

0 comments on commit 1f79eda

Please sign in to comment.