-
Notifications
You must be signed in to change notification settings - Fork 61
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
53d04e7
commit 6974514
Showing
14 changed files
with
1,130 additions
and
2 deletions.
There are no files selected for viewing
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,100 @@ | ||
// | ||
// 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. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Recommend; | ||
|
||
/// <summary> | ||
/// a search banner with image and url. | ||
/// </summary> | ||
public partial class Banner | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the Banner class. | ||
/// </summary> | ||
public Banner() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Gets or Sets Image | ||
/// </summary> | ||
[JsonPropertyName("image")] | ||
public BannerImage Image { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets Link | ||
/// </summary> | ||
[JsonPropertyName("link")] | ||
public BannerLink Link { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.Append("class Banner {\n"); | ||
sb.Append(" Image: ").Append(Image).Append("\n"); | ||
sb.Append(" Link: ").Append(Link).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public virtual string ToJson() | ||
{ | ||
return JsonSerializer.Serialize(this, JsonConfig.Options); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is not Banner input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(Image == input.Image || (Image != null && Image.Equals(input.Image))) && | ||
(Link == input.Link || (Link != null && Link.Equals(input.Link))); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (Image != null) | ||
{ | ||
hashCode = (hashCode * 59) + Image.GetHashCode(); | ||
} | ||
if (Link != null) | ||
{ | ||
hashCode = (hashCode * 59) + Link.GetHashCode(); | ||
} | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
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,100 @@ | ||
// | ||
// 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. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Recommend; | ||
|
||
/// <summary> | ||
/// image of a search banner. | ||
/// </summary> | ||
public partial class BannerImage | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the BannerImage class. | ||
/// </summary> | ||
public BannerImage() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Gets or Sets Urls | ||
/// </summary> | ||
[JsonPropertyName("urls")] | ||
public BannerImageUrl Urls { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or Sets Title | ||
/// </summary> | ||
[JsonPropertyName("title")] | ||
public string Title { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.Append("class BannerImage {\n"); | ||
sb.Append(" Urls: ").Append(Urls).Append("\n"); | ||
sb.Append(" Title: ").Append(Title).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public virtual string ToJson() | ||
{ | ||
return JsonSerializer.Serialize(this, JsonConfig.Options); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is not BannerImage input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(Urls == input.Urls || (Urls != null && Urls.Equals(input.Urls))) && | ||
(Title == input.Title || (Title != null && Title.Equals(input.Title))); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (Urls != null) | ||
{ | ||
hashCode = (hashCode * 59) + Urls.GetHashCode(); | ||
} | ||
if (Title != null) | ||
{ | ||
hashCode = (hashCode * 59) + Title.GetHashCode(); | ||
} | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
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,88 @@ | ||
// | ||
// 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. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Recommend; | ||
|
||
/// <summary> | ||
/// url for a search banner image. | ||
/// </summary> | ||
public partial class BannerImageUrl | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the BannerImageUrl class. | ||
/// </summary> | ||
public BannerImageUrl() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Gets or Sets Url | ||
/// </summary> | ||
[JsonPropertyName("url")] | ||
public string Url { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.Append("class BannerImageUrl {\n"); | ||
sb.Append(" Url: ").Append(Url).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public virtual string ToJson() | ||
{ | ||
return JsonSerializer.Serialize(this, JsonConfig.Options); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is not BannerImageUrl input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(Url == input.Url || (Url != null && Url.Equals(input.Url))); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (Url != null) | ||
{ | ||
hashCode = (hashCode * 59) + Url.GetHashCode(); | ||
} | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
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,88 @@ | ||
// | ||
// 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. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Recommend; | ||
|
||
/// <summary> | ||
/// link for a banner defined in merchandising studio. | ||
/// </summary> | ||
public partial class BannerLink | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the BannerLink class. | ||
/// </summary> | ||
public BannerLink() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Gets or Sets Url | ||
/// </summary> | ||
[JsonPropertyName("url")] | ||
public string Url { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.Append("class BannerLink {\n"); | ||
sb.Append(" Url: ").Append(Url).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public virtual string ToJson() | ||
{ | ||
return JsonSerializer.Serialize(this, JsonConfig.Options); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is not BannerLink input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(Url == input.Url || (Url != null && Url.Equals(input.Url))); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (Url != null) | ||
{ | ||
hashCode = (hashCode * 59) + Url.GetHashCode(); | ||
} | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.