Skip to content

Commit 9cfae3a

Browse files
committed
Add structs replacing enums
1 parent 055e43c commit 9cfae3a

26 files changed

Lines changed: 836 additions & 0 deletions
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
//----------------------
2+
// <auto-generated>
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
4+
// </auto-generated>
5+
//----------------------
6+
7+
8+
using StreamChat.Core.InternalDTO.Responses;
9+
using StreamChat.Core.InternalDTO.Requests;
10+
using StreamChat.Core.InternalDTO.Events;
11+
12+
namespace StreamChat.Core.InternalDTO.Models
13+
{
14+
using System = global::System;
15+
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
17+
18+
internal readonly struct AutomodBehaviourTypeInternalDTO : System.IEquatable<AutomodBehaviourTypeInternalDTO>, StreamChat.Core.LowLevelClient.IEnumeratedStruct<AutomodBehaviourTypeInternalDTO>
19+
{
20+
public string Value { get; }
21+
22+
public static readonly AutomodBehaviourTypeInternalDTO Flag = new AutomodBehaviourTypeInternalDTO("flag");
23+
public static readonly AutomodBehaviourTypeInternalDTO Block = new AutomodBehaviourTypeInternalDTO("block");
24+
public static readonly AutomodBehaviourTypeInternalDTO ShadowBlock = new AutomodBehaviourTypeInternalDTO("shadow_block");
25+
26+
public AutomodBehaviourTypeInternalDTO(string value)
27+
{
28+
Value = value ?? throw new System.ArgumentNullException(nameof(value));
29+
}
30+
31+
public AutomodBehaviourTypeInternalDTO Parse(string value) => new AutomodBehaviourTypeInternalDTO(value);
32+
33+
public override string ToString() => Value;
34+
35+
public bool Equals(AutomodBehaviourTypeInternalDTO other) => Value == other.Value;
36+
37+
public override bool Equals(object obj) => obj is AutomodBehaviourTypeInternalDTO other && Equals(other);
38+
39+
public override int GetHashCode() => Value.GetHashCode();
40+
41+
public static bool operator ==(AutomodBehaviourTypeInternalDTO left, AutomodBehaviourTypeInternalDTO right) => left.Equals(right);
42+
43+
public static bool operator !=(AutomodBehaviourTypeInternalDTO left, AutomodBehaviourTypeInternalDTO right) => !left.Equals(right);
44+
45+
public static implicit operator AutomodBehaviourTypeInternalDTO(string value) => new AutomodBehaviourTypeInternalDTO(value);
46+
47+
public static implicit operator string(AutomodBehaviourTypeInternalDTO type) => type.Value;
48+
}
49+
}

Assets/Plugins/StreamChat/Core/InternalDTO/Models/AutomodBehaviourTypeInternalDTO.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
//----------------------
2+
// <auto-generated>
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
4+
// </auto-generated>
5+
//----------------------
6+
7+
8+
using StreamChat.Core.InternalDTO.Responses;
9+
using StreamChat.Core.InternalDTO.Requests;
10+
using StreamChat.Core.InternalDTO.Events;
11+
12+
namespace StreamChat.Core.InternalDTO.Models
13+
{
14+
using System = global::System;
15+
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
17+
18+
internal readonly struct AutomodTypeInternalDTO : System.IEquatable<AutomodTypeInternalDTO>, StreamChat.Core.LowLevelClient.IEnumeratedStruct<AutomodTypeInternalDTO>
19+
{
20+
public string Value { get; }
21+
22+
public static readonly AutomodTypeInternalDTO Disabled = new AutomodTypeInternalDTO("disabled");
23+
public static readonly AutomodTypeInternalDTO Simple = new AutomodTypeInternalDTO("simple");
24+
public static readonly AutomodTypeInternalDTO AI = new AutomodTypeInternalDTO("AI");
25+
26+
public AutomodTypeInternalDTO(string value)
27+
{
28+
Value = value ?? throw new System.ArgumentNullException(nameof(value));
29+
}
30+
31+
public AutomodTypeInternalDTO Parse(string value) => new AutomodTypeInternalDTO(value);
32+
33+
public override string ToString() => Value;
34+
35+
public bool Equals(AutomodTypeInternalDTO other) => Value == other.Value;
36+
37+
public override bool Equals(object obj) => obj is AutomodTypeInternalDTO other && Equals(other);
38+
39+
public override int GetHashCode() => Value.GetHashCode();
40+
41+
public static bool operator ==(AutomodTypeInternalDTO left, AutomodTypeInternalDTO right) => left.Equals(right);
42+
43+
public static bool operator !=(AutomodTypeInternalDTO left, AutomodTypeInternalDTO right) => !left.Equals(right);
44+
45+
public static implicit operator AutomodTypeInternalDTO(string value) => new AutomodTypeInternalDTO(value);
46+
47+
public static implicit operator string(AutomodTypeInternalDTO type) => type.Value;
48+
}
49+
}

Assets/Plugins/StreamChat/Core/InternalDTO/Models/AutomodTypeInternalDTO.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
//----------------------
2+
// <auto-generated>
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
4+
// </auto-generated>
5+
//----------------------
6+
7+
8+
using StreamChat.Core.InternalDTO.Responses;
9+
using StreamChat.Core.InternalDTO.Requests;
10+
using StreamChat.Core.InternalDTO.Events;
11+
12+
namespace StreamChat.Core.InternalDTO.Models
13+
{
14+
using System = global::System;
15+
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
17+
18+
internal readonly struct BlockListOptionsBehaviorInternalDTO : System.IEquatable<BlockListOptionsBehaviorInternalDTO>, StreamChat.Core.LowLevelClient.IEnumeratedStruct<BlockListOptionsBehaviorInternalDTO>
19+
{
20+
public string Value { get; }
21+
22+
public static readonly BlockListOptionsBehaviorInternalDTO Flag = new BlockListOptionsBehaviorInternalDTO("flag");
23+
public static readonly BlockListOptionsBehaviorInternalDTO Block = new BlockListOptionsBehaviorInternalDTO("block");
24+
public static readonly BlockListOptionsBehaviorInternalDTO ShadowBlock = new BlockListOptionsBehaviorInternalDTO("shadow_block");
25+
26+
public BlockListOptionsBehaviorInternalDTO(string value)
27+
{
28+
Value = value ?? throw new System.ArgumentNullException(nameof(value));
29+
}
30+
31+
public BlockListOptionsBehaviorInternalDTO Parse(string value) => new BlockListOptionsBehaviorInternalDTO(value);
32+
33+
public override string ToString() => Value;
34+
35+
public bool Equals(BlockListOptionsBehaviorInternalDTO other) => Value == other.Value;
36+
37+
public override bool Equals(object obj) => obj is BlockListOptionsBehaviorInternalDTO other && Equals(other);
38+
39+
public override int GetHashCode() => Value.GetHashCode();
40+
41+
public static bool operator ==(BlockListOptionsBehaviorInternalDTO left, BlockListOptionsBehaviorInternalDTO right) => left.Equals(right);
42+
43+
public static bool operator !=(BlockListOptionsBehaviorInternalDTO left, BlockListOptionsBehaviorInternalDTO right) => !left.Equals(right);
44+
45+
public static implicit operator BlockListOptionsBehaviorInternalDTO(string value) => new BlockListOptionsBehaviorInternalDTO(value);
46+
47+
public static implicit operator string(BlockListOptionsBehaviorInternalDTO type) => type.Value;
48+
}
49+
}

Assets/Plugins/StreamChat/Core/InternalDTO/Models/BlockListOptionsBehaviorInternalDTO.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//----------------------
2+
// <auto-generated>
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
4+
// </auto-generated>
5+
//----------------------
6+
7+
8+
using StreamChat.Core.InternalDTO.Responses;
9+
using StreamChat.Core.InternalDTO.Requests;
10+
using StreamChat.Core.InternalDTO.Events;
11+
12+
namespace StreamChat.Core.InternalDTO.Models
13+
{
14+
using System = global::System;
15+
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
17+
18+
internal readonly struct ImageCropTypeInternalDTO : System.IEquatable<ImageCropTypeInternalDTO>, StreamChat.Core.LowLevelClient.IEnumeratedStruct<ImageCropTypeInternalDTO>
19+
{
20+
public string Value { get; }
21+
22+
public static readonly ImageCropTypeInternalDTO Top = new ImageCropTypeInternalDTO("top");
23+
public static readonly ImageCropTypeInternalDTO Bottom = new ImageCropTypeInternalDTO("bottom");
24+
public static readonly ImageCropTypeInternalDTO Left = new ImageCropTypeInternalDTO("left");
25+
public static readonly ImageCropTypeInternalDTO Right = new ImageCropTypeInternalDTO("right");
26+
public static readonly ImageCropTypeInternalDTO Center = new ImageCropTypeInternalDTO("center");
27+
28+
public ImageCropTypeInternalDTO(string value)
29+
{
30+
Value = value ?? throw new System.ArgumentNullException(nameof(value));
31+
}
32+
33+
public ImageCropTypeInternalDTO Parse(string value) => new ImageCropTypeInternalDTO(value);
34+
35+
public override string ToString() => Value;
36+
37+
public bool Equals(ImageCropTypeInternalDTO other) => Value == other.Value;
38+
39+
public override bool Equals(object obj) => obj is ImageCropTypeInternalDTO other && Equals(other);
40+
41+
public override int GetHashCode() => Value.GetHashCode();
42+
43+
public static bool operator ==(ImageCropTypeInternalDTO left, ImageCropTypeInternalDTO right) => left.Equals(right);
44+
45+
public static bool operator !=(ImageCropTypeInternalDTO left, ImageCropTypeInternalDTO right) => !left.Equals(right);
46+
47+
public static implicit operator ImageCropTypeInternalDTO(string value) => new ImageCropTypeInternalDTO(value);
48+
49+
public static implicit operator string(ImageCropTypeInternalDTO type) => type.Value;
50+
}
51+
}

Assets/Plugins/StreamChat/Core/InternalDTO/Models/ImageCropTypeInternalDTO.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
//----------------------
2+
// <auto-generated>
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
4+
// </auto-generated>
5+
//----------------------
6+
7+
8+
using StreamChat.Core.InternalDTO.Responses;
9+
using StreamChat.Core.InternalDTO.Requests;
10+
using StreamChat.Core.InternalDTO.Events;
11+
12+
namespace StreamChat.Core.InternalDTO.Models
13+
{
14+
using System = global::System;
15+
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
17+
18+
internal readonly struct ImageResizeTypeInternalDTO : System.IEquatable<ImageResizeTypeInternalDTO>, StreamChat.Core.LowLevelClient.IEnumeratedStruct<ImageResizeTypeInternalDTO>
19+
{
20+
public string Value { get; }
21+
22+
public static readonly ImageResizeTypeInternalDTO Clip = new ImageResizeTypeInternalDTO("clip");
23+
public static readonly ImageResizeTypeInternalDTO Crop = new ImageResizeTypeInternalDTO("crop");
24+
public static readonly ImageResizeTypeInternalDTO Scale = new ImageResizeTypeInternalDTO("scale");
25+
public static readonly ImageResizeTypeInternalDTO Fill = new ImageResizeTypeInternalDTO("fill");
26+
27+
public ImageResizeTypeInternalDTO(string value)
28+
{
29+
Value = value ?? throw new System.ArgumentNullException(nameof(value));
30+
}
31+
32+
public ImageResizeTypeInternalDTO Parse(string value) => new ImageResizeTypeInternalDTO(value);
33+
34+
public override string ToString() => Value;
35+
36+
public bool Equals(ImageResizeTypeInternalDTO other) => Value == other.Value;
37+
38+
public override bool Equals(object obj) => obj is ImageResizeTypeInternalDTO other && Equals(other);
39+
40+
public override int GetHashCode() => Value.GetHashCode();
41+
42+
public static bool operator ==(ImageResizeTypeInternalDTO left, ImageResizeTypeInternalDTO right) => left.Equals(right);
43+
44+
public static bool operator !=(ImageResizeTypeInternalDTO left, ImageResizeTypeInternalDTO right) => !left.Equals(right);
45+
46+
public static implicit operator ImageResizeTypeInternalDTO(string value) => new ImageResizeTypeInternalDTO(value);
47+
48+
public static implicit operator string(ImageResizeTypeInternalDTO type) => type.Value;
49+
}
50+
}

Assets/Plugins/StreamChat/Core/InternalDTO/Models/ImageResizeTypeInternalDTO.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)