-
Notifications
You must be signed in to change notification settings - Fork 14
/
BannerImage.cs
100 lines (89 loc) · 2.44 KB
/
BannerImage.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//
// 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.Search;
/// <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 List<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 && input.Urls != null && Urls.SequenceEqual(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;
}
}
}