Skip to content

Commit 2efca0f

Browse files
algolia-botKalmar99Jonas Kalmar Rønningmillotp
committed
feat(specs): add support for widgets / banners in search for the csharp 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]>
1 parent 1cef26d commit 2efca0f

File tree

14 files changed

+846
-4
lines changed

14 files changed

+846
-4
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.recommend;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.Objects;
9+
10+
/** a search banner with image and url. */
11+
public class Banner {
12+
13+
@JsonProperty("image")
14+
private BannerImage image;
15+
16+
@JsonProperty("link")
17+
private BannerLink link;
18+
19+
public Banner setImage(BannerImage image) {
20+
this.image = image;
21+
return this;
22+
}
23+
24+
/** Get image */
25+
@javax.annotation.Nullable
26+
public BannerImage getImage() {
27+
return image;
28+
}
29+
30+
public Banner setLink(BannerLink link) {
31+
this.link = link;
32+
return this;
33+
}
34+
35+
/** Get link */
36+
@javax.annotation.Nullable
37+
public BannerLink getLink() {
38+
return link;
39+
}
40+
41+
@Override
42+
public boolean equals(Object o) {
43+
if (this == o) {
44+
return true;
45+
}
46+
if (o == null || getClass() != o.getClass()) {
47+
return false;
48+
}
49+
Banner banner = (Banner) o;
50+
return Objects.equals(this.image, banner.image) && Objects.equals(this.link, banner.link);
51+
}
52+
53+
@Override
54+
public int hashCode() {
55+
return Objects.hash(image, link);
56+
}
57+
58+
@Override
59+
public String toString() {
60+
StringBuilder sb = new StringBuilder();
61+
sb.append("class Banner {\n");
62+
sb.append(" image: ").append(toIndentedString(image)).append("\n");
63+
sb.append(" link: ").append(toIndentedString(link)).append("\n");
64+
sb.append("}");
65+
return sb.toString();
66+
}
67+
68+
/**
69+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
70+
*/
71+
private String toIndentedString(Object o) {
72+
if (o == null) {
73+
return "null";
74+
}
75+
return o.toString().replace("\n", "\n ");
76+
}
77+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.recommend;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.Objects;
9+
10+
/** image of a search banner. */
11+
public class BannerImage {
12+
13+
@JsonProperty("urls")
14+
private BannerImageUrl urls;
15+
16+
@JsonProperty("title")
17+
private String title;
18+
19+
public BannerImage setUrls(BannerImageUrl urls) {
20+
this.urls = urls;
21+
return this;
22+
}
23+
24+
/** Get urls */
25+
@javax.annotation.Nullable
26+
public BannerImageUrl getUrls() {
27+
return urls;
28+
}
29+
30+
public BannerImage setTitle(String title) {
31+
this.title = title;
32+
return this;
33+
}
34+
35+
/** Get title */
36+
@javax.annotation.Nullable
37+
public String getTitle() {
38+
return title;
39+
}
40+
41+
@Override
42+
public boolean equals(Object o) {
43+
if (this == o) {
44+
return true;
45+
}
46+
if (o == null || getClass() != o.getClass()) {
47+
return false;
48+
}
49+
BannerImage bannerImage = (BannerImage) o;
50+
return Objects.equals(this.urls, bannerImage.urls) && Objects.equals(this.title, bannerImage.title);
51+
}
52+
53+
@Override
54+
public int hashCode() {
55+
return Objects.hash(urls, title);
56+
}
57+
58+
@Override
59+
public String toString() {
60+
StringBuilder sb = new StringBuilder();
61+
sb.append("class BannerImage {\n");
62+
sb.append(" urls: ").append(toIndentedString(urls)).append("\n");
63+
sb.append(" title: ").append(toIndentedString(title)).append("\n");
64+
sb.append("}");
65+
return sb.toString();
66+
}
67+
68+
/**
69+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
70+
*/
71+
private String toIndentedString(Object o) {
72+
if (o == null) {
73+
return "null";
74+
}
75+
return o.toString().replace("\n", "\n ");
76+
}
77+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.recommend;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.Objects;
9+
10+
/** url for a search banner image. */
11+
public class BannerImageUrl {
12+
13+
@JsonProperty("url")
14+
private String url;
15+
16+
public BannerImageUrl setUrl(String url) {
17+
this.url = url;
18+
return this;
19+
}
20+
21+
/** Get url */
22+
@javax.annotation.Nullable
23+
public String getUrl() {
24+
return url;
25+
}
26+
27+
@Override
28+
public boolean equals(Object o) {
29+
if (this == o) {
30+
return true;
31+
}
32+
if (o == null || getClass() != o.getClass()) {
33+
return false;
34+
}
35+
BannerImageUrl bannerImageUrl = (BannerImageUrl) o;
36+
return Objects.equals(this.url, bannerImageUrl.url);
37+
}
38+
39+
@Override
40+
public int hashCode() {
41+
return Objects.hash(url);
42+
}
43+
44+
@Override
45+
public String toString() {
46+
StringBuilder sb = new StringBuilder();
47+
sb.append("class BannerImageUrl {\n");
48+
sb.append(" url: ").append(toIndentedString(url)).append("\n");
49+
sb.append("}");
50+
return sb.toString();
51+
}
52+
53+
/**
54+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
55+
*/
56+
private String toIndentedString(Object o) {
57+
if (o == null) {
58+
return "null";
59+
}
60+
return o.toString().replace("\n", "\n ");
61+
}
62+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.recommend;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.Objects;
9+
10+
/** link for a banner defined in merchandising studio. */
11+
public class BannerLink {
12+
13+
@JsonProperty("url")
14+
private String url;
15+
16+
public BannerLink setUrl(String url) {
17+
this.url = url;
18+
return this;
19+
}
20+
21+
/** Get url */
22+
@javax.annotation.Nullable
23+
public String getUrl() {
24+
return url;
25+
}
26+
27+
@Override
28+
public boolean equals(Object o) {
29+
if (this == o) {
30+
return true;
31+
}
32+
if (o == null || getClass() != o.getClass()) {
33+
return false;
34+
}
35+
BannerLink bannerLink = (BannerLink) o;
36+
return Objects.equals(this.url, bannerLink.url);
37+
}
38+
39+
@Override
40+
public int hashCode() {
41+
return Objects.hash(url);
42+
}
43+
44+
@Override
45+
public String toString() {
46+
StringBuilder sb = new StringBuilder();
47+
sb.append("class BannerLink {\n");
48+
sb.append(" url: ").append(toIndentedString(url)).append("\n");
49+
sb.append("}");
50+
return sb.toString();
51+
}
52+
53+
/**
54+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
55+
*/
56+
private String toIndentedString(Object o) {
57+
if (o == null) {
58+
return "null";
59+
}
60+
return o.toString().replace("\n", "\n ");
61+
}
62+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.recommend;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.Objects;
9+
10+
/** banners defined in the merchandising studio for the given search. */
11+
public class Banners {
12+
13+
@JsonProperty("banners")
14+
private Banner banners;
15+
16+
public Banners setBanners(Banner banners) {
17+
this.banners = banners;
18+
return this;
19+
}
20+
21+
/** Get banners */
22+
@javax.annotation.Nullable
23+
public Banner getBanners() {
24+
return banners;
25+
}
26+
27+
@Override
28+
public boolean equals(Object o) {
29+
if (this == o) {
30+
return true;
31+
}
32+
if (o == null || getClass() != o.getClass()) {
33+
return false;
34+
}
35+
Banners banners = (Banners) o;
36+
return Objects.equals(this.banners, banners.banners);
37+
}
38+
39+
@Override
40+
public int hashCode() {
41+
return Objects.hash(banners);
42+
}
43+
44+
@Override
45+
public String toString() {
46+
StringBuilder sb = new StringBuilder();
47+
sb.append("class Banners {\n");
48+
sb.append(" banners: ").append(toIndentedString(banners)).append("\n");
49+
sb.append("}");
50+
return sb.toString();
51+
}
52+
53+
/**
54+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
55+
*/
56+
private String toIndentedString(Object o) {
57+
if (o == null) {
58+
return "null";
59+
}
60+
return o.toString().replace("\n", "\n ");
61+
}
62+
}

algoliasearch/src/main/java/com/algolia/model/recommend/RenderingContent.java

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public class RenderingContent {
1919
@JsonProperty("redirect")
2020
private RedirectURL redirect;
2121

22+
@JsonProperty("widgets")
23+
private Widgets widgets;
24+
2225
public RenderingContent setFacetOrdering(FacetOrdering facetOrdering) {
2326
this.facetOrdering = facetOrdering;
2427
return this;
@@ -41,6 +44,17 @@ public RedirectURL getRedirect() {
4144
return redirect;
4245
}
4346

47+
public RenderingContent setWidgets(Widgets widgets) {
48+
this.widgets = widgets;
49+
return this;
50+
}
51+
52+
/** Get widgets */
53+
@javax.annotation.Nullable
54+
public Widgets getWidgets() {
55+
return widgets;
56+
}
57+
4458
@Override
4559
public boolean equals(Object o) {
4660
if (this == o) {
@@ -50,12 +64,16 @@ public boolean equals(Object o) {
5064
return false;
5165
}
5266
RenderingContent renderingContent = (RenderingContent) o;
53-
return Objects.equals(this.facetOrdering, renderingContent.facetOrdering) && Objects.equals(this.redirect, renderingContent.redirect);
67+
return (
68+
Objects.equals(this.facetOrdering, renderingContent.facetOrdering) &&
69+
Objects.equals(this.redirect, renderingContent.redirect) &&
70+
Objects.equals(this.widgets, renderingContent.widgets)
71+
);
5472
}
5573

5674
@Override
5775
public int hashCode() {
58-
return Objects.hash(facetOrdering, redirect);
76+
return Objects.hash(facetOrdering, redirect, widgets);
5977
}
6078

6179
@Override
@@ -64,6 +82,7 @@ public String toString() {
6482
sb.append("class RenderingContent {\n");
6583
sb.append(" facetOrdering: ").append(toIndentedString(facetOrdering)).append("\n");
6684
sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n");
85+
sb.append(" widgets: ").append(toIndentedString(widgets)).append("\n");
6786
sb.append("}");
6887
return sb.toString();
6988
}

0 commit comments

Comments
 (0)