-
Notifications
You must be signed in to change notification settings - Fork 33
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 support for widgets / banners in search for the csha…
…rp client (generated) algolia/api-clients-automation#3870 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Jonas <[email protected]> Co-authored-by: Jonas Kalmar Rønning <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
- Loading branch information
1 parent
1cef26d
commit 2efca0f
Showing
14 changed files
with
846 additions
and
4 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
algoliasearch/src/main/java/com/algolia/model/recommend/Banner.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,77 @@ | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost | ||
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
|
||
package com.algolia.model.recommend; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
import java.util.Objects; | ||
|
||
/** a search banner with image and url. */ | ||
public class Banner { | ||
|
||
@JsonProperty("image") | ||
private BannerImage image; | ||
|
||
@JsonProperty("link") | ||
private BannerLink link; | ||
|
||
public Banner setImage(BannerImage image) { | ||
this.image = image; | ||
return this; | ||
} | ||
|
||
/** Get image */ | ||
@javax.annotation.Nullable | ||
public BannerImage getImage() { | ||
return image; | ||
} | ||
|
||
public Banner setLink(BannerLink link) { | ||
this.link = link; | ||
return this; | ||
} | ||
|
||
/** Get link */ | ||
@javax.annotation.Nullable | ||
public BannerLink getLink() { | ||
return link; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
Banner banner = (Banner) o; | ||
return Objects.equals(this.image, banner.image) && Objects.equals(this.link, banner.link); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(image, link); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class Banner {\n"); | ||
sb.append(" image: ").append(toIndentedString(image)).append("\n"); | ||
sb.append(" link: ").append(toIndentedString(link)).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 "); | ||
} | ||
} |
77 changes: 77 additions & 0 deletions
77
algoliasearch/src/main/java/com/algolia/model/recommend/BannerImage.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,77 @@ | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost | ||
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
|
||
package com.algolia.model.recommend; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
import java.util.Objects; | ||
|
||
/** image of a search banner. */ | ||
public class BannerImage { | ||
|
||
@JsonProperty("urls") | ||
private BannerImageUrl urls; | ||
|
||
@JsonProperty("title") | ||
private String title; | ||
|
||
public BannerImage setUrls(BannerImageUrl urls) { | ||
this.urls = urls; | ||
return this; | ||
} | ||
|
||
/** Get urls */ | ||
@javax.annotation.Nullable | ||
public BannerImageUrl getUrls() { | ||
return urls; | ||
} | ||
|
||
public BannerImage setTitle(String title) { | ||
this.title = title; | ||
return this; | ||
} | ||
|
||
/** Get title */ | ||
@javax.annotation.Nullable | ||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
BannerImage bannerImage = (BannerImage) o; | ||
return Objects.equals(this.urls, bannerImage.urls) && Objects.equals(this.title, bannerImage.title); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(urls, title); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class BannerImage {\n"); | ||
sb.append(" urls: ").append(toIndentedString(urls)).append("\n"); | ||
sb.append(" title: ").append(toIndentedString(title)).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 "); | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
algoliasearch/src/main/java/com/algolia/model/recommend/BannerImageUrl.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,62 @@ | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost | ||
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
|
||
package com.algolia.model.recommend; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
import java.util.Objects; | ||
|
||
/** url for a search banner image. */ | ||
public class BannerImageUrl { | ||
|
||
@JsonProperty("url") | ||
private String url; | ||
|
||
public BannerImageUrl setUrl(String url) { | ||
this.url = url; | ||
return this; | ||
} | ||
|
||
/** Get url */ | ||
@javax.annotation.Nullable | ||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
BannerImageUrl bannerImageUrl = (BannerImageUrl) o; | ||
return Objects.equals(this.url, bannerImageUrl.url); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(url); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class BannerImageUrl {\n"); | ||
sb.append(" url: ").append(toIndentedString(url)).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 "); | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
algoliasearch/src/main/java/com/algolia/model/recommend/BannerLink.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,62 @@ | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost | ||
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
|
||
package com.algolia.model.recommend; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
import java.util.Objects; | ||
|
||
/** link for a banner defined in merchandising studio. */ | ||
public class BannerLink { | ||
|
||
@JsonProperty("url") | ||
private String url; | ||
|
||
public BannerLink setUrl(String url) { | ||
this.url = url; | ||
return this; | ||
} | ||
|
||
/** Get url */ | ||
@javax.annotation.Nullable | ||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
BannerLink bannerLink = (BannerLink) o; | ||
return Objects.equals(this.url, bannerLink.url); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(url); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class BannerLink {\n"); | ||
sb.append(" url: ").append(toIndentedString(url)).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 "); | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
algoliasearch/src/main/java/com/algolia/model/recommend/Banners.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,62 @@ | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost | ||
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
|
||
package com.algolia.model.recommend; | ||
|
||
import com.fasterxml.jackson.annotation.*; | ||
import com.fasterxml.jackson.databind.annotation.*; | ||
import java.util.Objects; | ||
|
||
/** banners defined in the merchandising studio for the given search. */ | ||
public class Banners { | ||
|
||
@JsonProperty("banners") | ||
private Banner banners; | ||
|
||
public Banners setBanners(Banner banners) { | ||
this.banners = banners; | ||
return this; | ||
} | ||
|
||
/** Get banners */ | ||
@javax.annotation.Nullable | ||
public Banner getBanners() { | ||
return banners; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
Banners banners = (Banners) o; | ||
return Objects.equals(this.banners, banners.banners); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(banners); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class Banners {\n"); | ||
sb.append(" banners: ").append(toIndentedString(banners)).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 "); | ||
} | ||
} |
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
Oops, something went wrong.