Skip to content

Commit a45fc67

Browse files
committed
Update samples
1 parent 6d63499 commit a45fc67

File tree

1,270 files changed

+53712
-1244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,270 files changed

+53712
-1244
lines changed

samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Adult.cs

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Org.OpenAPITools.Model
2727
/// <summary>
2828
/// A representation of an adult
2929
/// </summary>
30-
public partial class Adult : Person, IValidatableObject
30+
public partial class Adult : Person, IEquatable<Adult>, IValidatableObject
3131
{
3232
/// <summary>
3333
/// Initializes a new instance of the <see cref="Adult" /> class.
@@ -70,6 +70,52 @@ public override string ToString()
7070
sb.Append("}\n");
7171
return sb.ToString();
7272
}
73+
74+
/// <summary>
75+
/// Returns true if objects are equal
76+
/// </summary>
77+
/// <param name="input">Object to be compared</param>
78+
/// <returns>Boolean</returns>
79+
public override bool Equals(object input)
80+
{
81+
return OpenAPIClientUtils.compareLogic.Compare(this, input as Adult).AreEqual;
82+
}
83+
84+
/// <summary>
85+
/// Returns true if Adult instances are equal
86+
/// </summary>
87+
/// <param name="input">Instance of Adult to be compared</param>
88+
/// <returns>Boolean</returns>
89+
public bool Equals(Adult input)
90+
{
91+
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
92+
}
93+
94+
/// <summary>
95+
/// Gets the hash code
96+
/// </summary>
97+
/// <returns>Hash code</returns>
98+
public override int GetHashCode()
99+
{
100+
unchecked // Overflow is fine, just wrap
101+
{
102+
int hashCode = base.GetHashCode();
103+
if (Children != null)
104+
hashCode = (hashCode * 59) + Children.GetHashCode();
105+
106+
if (FirstName != null)
107+
hashCode = (hashCode * 59) + FirstName.GetHashCode();
108+
109+
if (LastName != null)
110+
hashCode = (hashCode * 59) + LastName.GetHashCode();
111+
112+
if (Type != null)
113+
hashCode = (hashCode * 59) + Type.GetHashCode();
114+
115+
116+
return hashCode;
117+
}
118+
}
73119
}
74120

75121
/// <summary>

samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Org.OpenAPITools.Model
2727
/// <summary>
2828
/// A representation of a child
2929
/// </summary>
30-
public partial class Child : Person, IValidatableObject
30+
public partial class Child : Person, IEquatable<Child>, IValidatableObject
3131
{
3232
/// <summary>
3333
/// Initializes a new instance of the <see cref="Child" /> class.
@@ -86,6 +86,55 @@ public override string ToString()
8686
sb.Append("}\n");
8787
return sb.ToString();
8888
}
89+
90+
/// <summary>
91+
/// Returns true if objects are equal
92+
/// </summary>
93+
/// <param name="input">Object to be compared</param>
94+
/// <returns>Boolean</returns>
95+
public override bool Equals(object input)
96+
{
97+
return OpenAPIClientUtils.compareLogic.Compare(this, input as Child).AreEqual;
98+
}
99+
100+
/// <summary>
101+
/// Returns true if Child instances are equal
102+
/// </summary>
103+
/// <param name="input">Instance of Child to be compared</param>
104+
/// <returns>Boolean</returns>
105+
public bool Equals(Child input)
106+
{
107+
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
108+
}
109+
110+
/// <summary>
111+
/// Gets the hash code
112+
/// </summary>
113+
/// <returns>Hash code</returns>
114+
public override int GetHashCode()
115+
{
116+
unchecked // Overflow is fine, just wrap
117+
{
118+
int hashCode = base.GetHashCode();
119+
if (Age != null)
120+
hashCode = (hashCode * 59) + Age.GetHashCode();
121+
122+
if (FirstName != null)
123+
hashCode = (hashCode * 59) + FirstName.GetHashCode();
124+
125+
if (LastName != null)
126+
hashCode = (hashCode * 59) + LastName.GetHashCode();
127+
128+
if (Type != null)
129+
hashCode = (hashCode * 59) + Type.GetHashCode();
130+
131+
if (BoosterSeat != null)
132+
hashCode = (hashCode * 59) + BoosterSeat.GetHashCode();
133+
134+
135+
return hashCode;
136+
}
137+
}
89138
}
90139

91140
/// <summary>

samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Person.cs

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Org.OpenAPITools.Model
2727
/// <summary>
2828
/// Person
2929
/// </summary>
30-
public partial class Person : IValidatableObject
30+
public partial class Person : IEquatable<Person>, IValidatableObject
3131
{
3232
/// <summary>
3333
/// Initializes a new instance of the <see cref="Person" /> class.
@@ -99,6 +99,50 @@ public override string ToString()
9999
return sb.ToString();
100100
}
101101

102+
/// <summary>
103+
/// Returns true if objects are equal
104+
/// </summary>
105+
/// <param name="input">Object to be compared</param>
106+
/// <returns>Boolean</returns>
107+
public override bool Equals(object input)
108+
{
109+
return OpenAPIClientUtils.compareLogic.Compare(this, input as Person).AreEqual;
110+
}
111+
112+
/// <summary>
113+
/// Returns true if Person instances are equal
114+
/// </summary>
115+
/// <param name="input">Instance of Person to be compared</param>
116+
/// <returns>Boolean</returns>
117+
public bool Equals(Person input)
118+
{
119+
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
120+
}
121+
122+
/// <summary>
123+
/// Gets the hash code
124+
/// </summary>
125+
/// <returns>Hash code</returns>
126+
public override int GetHashCode()
127+
{
128+
unchecked // Overflow is fine, just wrap
129+
{
130+
int hashCode = 41;
131+
if (FirstName != null)
132+
hashCode = (hashCode * 59) + FirstName.GetHashCode();
133+
134+
if (LastName != null)
135+
hashCode = (hashCode * 59) + LastName.GetHashCode();
136+
137+
if (Type != null)
138+
hashCode = (hashCode * 59) + Type.GetHashCode();
139+
140+
hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
141+
142+
return hashCode;
143+
}
144+
}
145+
102146
/// <summary>
103147
/// To validate all properties of the instance
104148
/// </summary>

samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Apple.cs

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Org.OpenAPITools.Model
2727
/// <summary>
2828
/// Apple
2929
/// </summary>
30-
public partial class Apple : IValidatableObject
30+
public partial class Apple : IEquatable<Apple>, IValidatableObject
3131
{
3232
/// <summary>
3333
/// Initializes a new instance of the <see cref="Apple" /> class.
@@ -75,6 +75,44 @@ public override string ToString()
7575
return sb.ToString();
7676
}
7777

78+
/// <summary>
79+
/// Returns true if objects are equal
80+
/// </summary>
81+
/// <param name="input">Object to be compared</param>
82+
/// <returns>Boolean</returns>
83+
public override bool Equals(object input)
84+
{
85+
return OpenAPIClientUtils.compareLogic.Compare(this, input as Apple).AreEqual;
86+
}
87+
88+
/// <summary>
89+
/// Returns true if Apple instances are equal
90+
/// </summary>
91+
/// <param name="input">Instance of Apple to be compared</param>
92+
/// <returns>Boolean</returns>
93+
public bool Equals(Apple input)
94+
{
95+
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
96+
}
97+
98+
/// <summary>
99+
/// Gets the hash code
100+
/// </summary>
101+
/// <returns>Hash code</returns>
102+
public override int GetHashCode()
103+
{
104+
unchecked // Overflow is fine, just wrap
105+
{
106+
int hashCode = 41;
107+
if (Kind != null)
108+
hashCode = (hashCode * 59) + Kind.GetHashCode();
109+
110+
hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
111+
112+
return hashCode;
113+
}
114+
}
115+
78116
/// <summary>
79117
/// To validate all properties of the instance
80118
/// </summary>

samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Banana.cs

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Org.OpenAPITools.Model
2727
/// <summary>
2828
/// Banana
2929
/// </summary>
30-
public partial class Banana : IValidatableObject
30+
public partial class Banana : IEquatable<Banana>, IValidatableObject
3131
{
3232
/// <summary>
3333
/// Initializes a new instance of the <see cref="Banana" /> class.
@@ -75,6 +75,44 @@ public override string ToString()
7575
return sb.ToString();
7676
}
7777

78+
/// <summary>
79+
/// Returns true if objects are equal
80+
/// </summary>
81+
/// <param name="input">Object to be compared</param>
82+
/// <returns>Boolean</returns>
83+
public override bool Equals(object input)
84+
{
85+
return OpenAPIClientUtils.compareLogic.Compare(this, input as Banana).AreEqual;
86+
}
87+
88+
/// <summary>
89+
/// Returns true if Banana instances are equal
90+
/// </summary>
91+
/// <param name="input">Instance of Banana to be compared</param>
92+
/// <returns>Boolean</returns>
93+
public bool Equals(Banana input)
94+
{
95+
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
96+
}
97+
98+
/// <summary>
99+
/// Gets the hash code
100+
/// </summary>
101+
/// <returns>Hash code</returns>
102+
public override int GetHashCode()
103+
{
104+
unchecked // Overflow is fine, just wrap
105+
{
106+
int hashCode = 41;
107+
if (Count != null)
108+
hashCode = (hashCode * 59) + Count.GetHashCode();
109+
110+
hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
111+
112+
return hashCode;
113+
}
114+
}
115+
78116
/// <summary>
79117
/// To validate all properties of the instance
80118
/// </summary>

samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Org.OpenAPITools.Model
2727
/// <summary>
2828
/// Fruit
2929
/// </summary>
30-
public partial class Fruit : IValidatableObject
30+
public partial class Fruit : IEquatable<Fruit>, IValidatableObject
3131
{
3232
/// <summary>
3333
/// Initializes a new instance of the <see cref="Fruit" /> class.
@@ -102,6 +102,44 @@ public override string ToString()
102102
return sb.ToString();
103103
}
104104

105+
/// <summary>
106+
/// Returns true if objects are equal
107+
/// </summary>
108+
/// <param name="input">Object to be compared</param>
109+
/// <returns>Boolean</returns>
110+
public override bool Equals(object input)
111+
{
112+
return OpenAPIClientUtils.compareLogic.Compare(this, input as Fruit).AreEqual;
113+
}
114+
115+
/// <summary>
116+
/// Returns true if Fruit instances are equal
117+
/// </summary>
118+
/// <param name="input">Instance of Fruit to be compared</param>
119+
/// <returns>Boolean</returns>
120+
public bool Equals(Fruit input)
121+
{
122+
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
123+
}
124+
125+
/// <summary>
126+
/// Gets the hash code
127+
/// </summary>
128+
/// <returns>Hash code</returns>
129+
public override int GetHashCode()
130+
{
131+
unchecked // Overflow is fine, just wrap
132+
{
133+
int hashCode = 41;
134+
if (Color != null)
135+
hashCode = (hashCode * 59) + Color.GetHashCode();
136+
137+
hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
138+
139+
return hashCode;
140+
}
141+
}
142+
105143
/// <summary>
106144
/// To validate all properties of the instance
107145
/// </summary>

0 commit comments

Comments
 (0)