Skip to content

Commit

Permalink
feat(specs): add support for widgets / banners in search for the csha…
Browse files Browse the repository at this point in the history
…rp client (generated)

algolia/api-clients-automation#3870

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Jonas <42573917+Kalmar99@users.noreply.github.com>
Co-authored-by: Jonas Kalmar Rønning <jonaskalmar.ronning@komplett.com>
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
  • Loading branch information
4 people committed Oct 6, 2024
1 parent 1cef26d commit 2efca0f
Show file tree
Hide file tree
Showing 14 changed files with 846 additions and 4 deletions.
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 ");
}
}
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 ");
}
}
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 ");
}
}
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 ");
}
}
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 ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public class RenderingContent {
@JsonProperty("redirect")
private RedirectURL redirect;

@JsonProperty("widgets")
private Widgets widgets;

public RenderingContent setFacetOrdering(FacetOrdering facetOrdering) {
this.facetOrdering = facetOrdering;
return this;
Expand All @@ -41,6 +44,17 @@ public RedirectURL getRedirect() {
return redirect;
}

public RenderingContent setWidgets(Widgets widgets) {
this.widgets = widgets;
return this;
}

/** Get widgets */
@javax.annotation.Nullable
public Widgets getWidgets() {
return widgets;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -50,12 +64,16 @@ public boolean equals(Object o) {
return false;
}
RenderingContent renderingContent = (RenderingContent) o;
return Objects.equals(this.facetOrdering, renderingContent.facetOrdering) && Objects.equals(this.redirect, renderingContent.redirect);
return (
Objects.equals(this.facetOrdering, renderingContent.facetOrdering) &&
Objects.equals(this.redirect, renderingContent.redirect) &&
Objects.equals(this.widgets, renderingContent.widgets)
);
}

@Override
public int hashCode() {
return Objects.hash(facetOrdering, redirect);
return Objects.hash(facetOrdering, redirect, widgets);
}

@Override
Expand All @@ -64,6 +82,7 @@ public String toString() {
sb.append("class RenderingContent {\n");
sb.append(" facetOrdering: ").append(toIndentedString(facetOrdering)).append("\n");
sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n");
sb.append(" widgets: ").append(toIndentedString(widgets)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
Loading

0 comments on commit 2efca0f

Please sign in to comment.