Skip to content

Commit 6974514

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 53d04e7 commit 6974514

File tree

14 files changed

+1130
-2
lines changed

14 files changed

+1130
-2
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
//
2+
// 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.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Recommend;
13+
14+
/// <summary>
15+
/// a search banner with image and url.
16+
/// </summary>
17+
public partial class Banner
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the Banner class.
21+
/// </summary>
22+
public Banner()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// Gets or Sets Image
28+
/// </summary>
29+
[JsonPropertyName("image")]
30+
public BannerImage Image { get; set; }
31+
32+
/// <summary>
33+
/// Gets or Sets Link
34+
/// </summary>
35+
[JsonPropertyName("link")]
36+
public BannerLink Link { get; set; }
37+
38+
/// <summary>
39+
/// Returns the string presentation of the object
40+
/// </summary>
41+
/// <returns>String presentation of the object</returns>
42+
public override string ToString()
43+
{
44+
StringBuilder sb = new StringBuilder();
45+
sb.Append("class Banner {\n");
46+
sb.Append(" Image: ").Append(Image).Append("\n");
47+
sb.Append(" Link: ").Append(Link).Append("\n");
48+
sb.Append("}\n");
49+
return sb.ToString();
50+
}
51+
52+
/// <summary>
53+
/// Returns the JSON string presentation of the object
54+
/// </summary>
55+
/// <returns>JSON string presentation of the object</returns>
56+
public virtual string ToJson()
57+
{
58+
return JsonSerializer.Serialize(this, JsonConfig.Options);
59+
}
60+
61+
/// <summary>
62+
/// Returns true if objects are equal
63+
/// </summary>
64+
/// <param name="obj">Object to be compared</param>
65+
/// <returns>Boolean</returns>
66+
public override bool Equals(object obj)
67+
{
68+
if (obj is not Banner input)
69+
{
70+
return false;
71+
}
72+
73+
return
74+
(Image == input.Image || (Image != null && Image.Equals(input.Image))) &&
75+
(Link == input.Link || (Link != null && Link.Equals(input.Link)));
76+
}
77+
78+
/// <summary>
79+
/// Gets the hash code
80+
/// </summary>
81+
/// <returns>Hash code</returns>
82+
public override int GetHashCode()
83+
{
84+
unchecked // Overflow is fine, just wrap
85+
{
86+
int hashCode = 41;
87+
if (Image != null)
88+
{
89+
hashCode = (hashCode * 59) + Image.GetHashCode();
90+
}
91+
if (Link != null)
92+
{
93+
hashCode = (hashCode * 59) + Link.GetHashCode();
94+
}
95+
return hashCode;
96+
}
97+
}
98+
99+
}
100+
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
//
2+
// 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.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Recommend;
13+
14+
/// <summary>
15+
/// image of a search banner.
16+
/// </summary>
17+
public partial class BannerImage
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the BannerImage class.
21+
/// </summary>
22+
public BannerImage()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// Gets or Sets Urls
28+
/// </summary>
29+
[JsonPropertyName("urls")]
30+
public BannerImageUrl Urls { get; set; }
31+
32+
/// <summary>
33+
/// Gets or Sets Title
34+
/// </summary>
35+
[JsonPropertyName("title")]
36+
public string Title { get; set; }
37+
38+
/// <summary>
39+
/// Returns the string presentation of the object
40+
/// </summary>
41+
/// <returns>String presentation of the object</returns>
42+
public override string ToString()
43+
{
44+
StringBuilder sb = new StringBuilder();
45+
sb.Append("class BannerImage {\n");
46+
sb.Append(" Urls: ").Append(Urls).Append("\n");
47+
sb.Append(" Title: ").Append(Title).Append("\n");
48+
sb.Append("}\n");
49+
return sb.ToString();
50+
}
51+
52+
/// <summary>
53+
/// Returns the JSON string presentation of the object
54+
/// </summary>
55+
/// <returns>JSON string presentation of the object</returns>
56+
public virtual string ToJson()
57+
{
58+
return JsonSerializer.Serialize(this, JsonConfig.Options);
59+
}
60+
61+
/// <summary>
62+
/// Returns true if objects are equal
63+
/// </summary>
64+
/// <param name="obj">Object to be compared</param>
65+
/// <returns>Boolean</returns>
66+
public override bool Equals(object obj)
67+
{
68+
if (obj is not BannerImage input)
69+
{
70+
return false;
71+
}
72+
73+
return
74+
(Urls == input.Urls || (Urls != null && Urls.Equals(input.Urls))) &&
75+
(Title == input.Title || (Title != null && Title.Equals(input.Title)));
76+
}
77+
78+
/// <summary>
79+
/// Gets the hash code
80+
/// </summary>
81+
/// <returns>Hash code</returns>
82+
public override int GetHashCode()
83+
{
84+
unchecked // Overflow is fine, just wrap
85+
{
86+
int hashCode = 41;
87+
if (Urls != null)
88+
{
89+
hashCode = (hashCode * 59) + Urls.GetHashCode();
90+
}
91+
if (Title != null)
92+
{
93+
hashCode = (hashCode * 59) + Title.GetHashCode();
94+
}
95+
return hashCode;
96+
}
97+
}
98+
99+
}
100+
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
//
2+
// 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.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Recommend;
13+
14+
/// <summary>
15+
/// url for a search banner image.
16+
/// </summary>
17+
public partial class BannerImageUrl
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the BannerImageUrl class.
21+
/// </summary>
22+
public BannerImageUrl()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// Gets or Sets Url
28+
/// </summary>
29+
[JsonPropertyName("url")]
30+
public string Url { get; set; }
31+
32+
/// <summary>
33+
/// Returns the string presentation of the object
34+
/// </summary>
35+
/// <returns>String presentation of the object</returns>
36+
public override string ToString()
37+
{
38+
StringBuilder sb = new StringBuilder();
39+
sb.Append("class BannerImageUrl {\n");
40+
sb.Append(" Url: ").Append(Url).Append("\n");
41+
sb.Append("}\n");
42+
return sb.ToString();
43+
}
44+
45+
/// <summary>
46+
/// Returns the JSON string presentation of the object
47+
/// </summary>
48+
/// <returns>JSON string presentation of the object</returns>
49+
public virtual string ToJson()
50+
{
51+
return JsonSerializer.Serialize(this, JsonConfig.Options);
52+
}
53+
54+
/// <summary>
55+
/// Returns true if objects are equal
56+
/// </summary>
57+
/// <param name="obj">Object to be compared</param>
58+
/// <returns>Boolean</returns>
59+
public override bool Equals(object obj)
60+
{
61+
if (obj is not BannerImageUrl input)
62+
{
63+
return false;
64+
}
65+
66+
return
67+
(Url == input.Url || (Url != null && Url.Equals(input.Url)));
68+
}
69+
70+
/// <summary>
71+
/// Gets the hash code
72+
/// </summary>
73+
/// <returns>Hash code</returns>
74+
public override int GetHashCode()
75+
{
76+
unchecked // Overflow is fine, just wrap
77+
{
78+
int hashCode = 41;
79+
if (Url != null)
80+
{
81+
hashCode = (hashCode * 59) + Url.GetHashCode();
82+
}
83+
return hashCode;
84+
}
85+
}
86+
87+
}
88+
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
//
2+
// 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.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Recommend;
13+
14+
/// <summary>
15+
/// link for a banner defined in merchandising studio.
16+
/// </summary>
17+
public partial class BannerLink
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the BannerLink class.
21+
/// </summary>
22+
public BannerLink()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// Gets or Sets Url
28+
/// </summary>
29+
[JsonPropertyName("url")]
30+
public string Url { get; set; }
31+
32+
/// <summary>
33+
/// Returns the string presentation of the object
34+
/// </summary>
35+
/// <returns>String presentation of the object</returns>
36+
public override string ToString()
37+
{
38+
StringBuilder sb = new StringBuilder();
39+
sb.Append("class BannerLink {\n");
40+
sb.Append(" Url: ").Append(Url).Append("\n");
41+
sb.Append("}\n");
42+
return sb.ToString();
43+
}
44+
45+
/// <summary>
46+
/// Returns the JSON string presentation of the object
47+
/// </summary>
48+
/// <returns>JSON string presentation of the object</returns>
49+
public virtual string ToJson()
50+
{
51+
return JsonSerializer.Serialize(this, JsonConfig.Options);
52+
}
53+
54+
/// <summary>
55+
/// Returns true if objects are equal
56+
/// </summary>
57+
/// <param name="obj">Object to be compared</param>
58+
/// <returns>Boolean</returns>
59+
public override bool Equals(object obj)
60+
{
61+
if (obj is not BannerLink input)
62+
{
63+
return false;
64+
}
65+
66+
return
67+
(Url == input.Url || (Url != null && Url.Equals(input.Url)));
68+
}
69+
70+
/// <summary>
71+
/// Gets the hash code
72+
/// </summary>
73+
/// <returns>Hash code</returns>
74+
public override int GetHashCode()
75+
{
76+
unchecked // Overflow is fine, just wrap
77+
{
78+
int hashCode = 41;
79+
if (Url != null)
80+
{
81+
hashCode = (hashCode * 59) + Url.GetHashCode();
82+
}
83+
return hashCode;
84+
}
85+
}
86+
87+
}
88+

0 commit comments

Comments
 (0)