Skip to content

Commit f581cbc

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@61bd39f7.
1 parent 01d846e commit f581cbc

File tree

5 files changed

+215
-25
lines changed

5 files changed

+215
-25
lines changed

Segment.PublicApi.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
# Visual Studio 2012
33
VisualStudioVersion = 12.0.0.0
44
MinimumVisualStudioVersion = 10.0.0.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Segment.PublicApi", "src\Segment.PublicApi\Segment.PublicApi.csproj", "{F2944E33-7924-4EC3-91A7-57D2641A0950}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Segment.PublicApi", "src\Segment.PublicApi\Segment.PublicApi.csproj", "{CC5BF383-9D5D-4E2D-965D-1882C672855E}"
66
EndProject
77
Global
88
GlobalSection(SolutionConfigurationPlatforms) = preSolution
99
Debug|Any CPU = Debug|Any CPU
1010
Release|Any CPU = Release|Any CPU
1111
EndGlobalSection
1212
GlobalSection(ProjectConfigurationPlatforms) = postSolution
13-
{F2944E33-7924-4EC3-91A7-57D2641A0950}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14-
{F2944E33-7924-4EC3-91A7-57D2641A0950}.Debug|Any CPU.Build.0 = Debug|Any CPU
15-
{F2944E33-7924-4EC3-91A7-57D2641A0950}.Release|Any CPU.ActiveCfg = Release|Any CPU
16-
{F2944E33-7924-4EC3-91A7-57D2641A0950}.Release|Any CPU.Build.0 = Release|Any CPU
13+
{CC5BF383-9D5D-4E2D-965D-1882C672855E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14+
{CC5BF383-9D5D-4E2D-965D-1882C672855E}.Debug|Any CPU.Build.0 = Debug|Any CPU
15+
{CC5BF383-9D5D-4E2D-965D-1882C672855E}.Release|Any CPU.ActiveCfg = Release|Any CPU
16+
{CC5BF383-9D5D-4E2D-965D-1882C672855E}.Release|Any CPU.Build.0 = Release|Any CPU
1717
EndGlobalSection
1818
GlobalSection(SolutionProperties) = preSolution
1919
HideSolutionNode = FALSE

src/Segment.PublicApi/Model/AddDestinationToAudienceAlphaInput.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ protected AddDestinationToAudienceAlphaInput() { }
4141
/// Initializes a new instance of the <see cref="AddDestinationToAudienceAlphaInput" /> class.
4242
/// </summary>
4343
/// <param name="destination">destination (required).</param>
44-
/// <param name="idSyncConfiguration">The identifier sync configuration input..</param>
44+
/// <param name="idSyncConfiguration">Identifier sync configuration - array of external IDs to sync with their strategies. Maximum 5 items allowed..</param>
4545
/// <param name="connectionSettings">The settings that a Destination requires to create audiences on a third-party platform. These settings are Destination-specific and thus are best defined as unknown..</param>
46-
public AddDestinationToAudienceAlphaInput(DestinationInput destination = default(DestinationInput), Object idSyncConfiguration = default(Object), Object connectionSettings = default(Object))
46+
public AddDestinationToAudienceAlphaInput(DestinationInput destination = default(DestinationInput), List<IDSyncConfigurationInput> idSyncConfiguration = default(List<IDSyncConfigurationInput>), Object connectionSettings = default(Object))
4747
{
4848
// to ensure "destination" is required (not null)
4949
if (destination == null)
@@ -62,11 +62,11 @@ protected AddDestinationToAudienceAlphaInput() { }
6262
public DestinationInput Destination { get; set; }
6363

6464
/// <summary>
65-
/// The identifier sync configuration input.
65+
/// Identifier sync configuration - array of external IDs to sync with their strategies. Maximum 5 items allowed.
6666
/// </summary>
67-
/// <value>The identifier sync configuration input.</value>
67+
/// <value>Identifier sync configuration - array of external IDs to sync with their strategies. Maximum 5 items allowed.</value>
6868
[DataMember(Name = "idSyncConfiguration", EmitDefaultValue = false)]
69-
public Object IdSyncConfiguration { get; set; }
69+
public List<IDSyncConfigurationInput> IdSyncConfiguration { get; set; }
7070

7171
/// <summary>
7272
/// The settings that a Destination requires to create audiences on a third-party platform. These settings are Destination-specific and thus are best defined as unknown.
@@ -128,8 +128,9 @@ public bool Equals(AddDestinationToAudienceAlphaInput input)
128128
) &&
129129
(
130130
this.IdSyncConfiguration == input.IdSyncConfiguration ||
131-
(this.IdSyncConfiguration != null &&
132-
this.IdSyncConfiguration.Equals(input.IdSyncConfiguration))
131+
this.IdSyncConfiguration != null &&
132+
input.IdSyncConfiguration != null &&
133+
this.IdSyncConfiguration.SequenceEqual(input.IdSyncConfiguration)
133134
) &&
134135
(
135136
this.ConnectionSettings == input.ConnectionSettings ||

src/Segment.PublicApi/Model/AddDestinationToAudienceAlphaOutput.cs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,21 @@ protected AddDestinationToAudienceAlphaOutput() { }
4141
/// Initializes a new instance of the <see cref="AddDestinationToAudienceAlphaOutput" /> class.
4242
/// </summary>
4343
/// <param name="connection">connection (required).</param>
44-
public AddDestinationToAudienceAlphaOutput(Connection connection = default(Connection))
44+
/// <param name="idSyncConfiguration">The id sync configuration for the Destination - array of external ids with their strategies. (required).</param>
45+
public AddDestinationToAudienceAlphaOutput(Connection connection = default(Connection), List<IDSyncConfigurationInput> idSyncConfiguration = default(List<IDSyncConfigurationInput>))
4546
{
4647
// to ensure "connection" is required (not null)
4748
if (connection == null)
4849
{
4950
throw new ArgumentNullException("connection is a required property for AddDestinationToAudienceAlphaOutput and cannot be null");
5051
}
5152
this.Connection = connection;
53+
// to ensure "idSyncConfiguration" is required (not null)
54+
if (idSyncConfiguration == null)
55+
{
56+
throw new ArgumentNullException("idSyncConfiguration is a required property for AddDestinationToAudienceAlphaOutput and cannot be null");
57+
}
58+
this.IdSyncConfiguration = idSyncConfiguration;
5259
}
5360

5461
/// <summary>
@@ -57,6 +64,13 @@ protected AddDestinationToAudienceAlphaOutput() { }
5764
[DataMember(Name = "connection", IsRequired = true, EmitDefaultValue = true)]
5865
public Connection Connection { get; set; }
5966

67+
/// <summary>
68+
/// The id sync configuration for the Destination - array of external ids with their strategies.
69+
/// </summary>
70+
/// <value>The id sync configuration for the Destination - array of external ids with their strategies.</value>
71+
[DataMember(Name = "idSyncConfiguration", IsRequired = true, EmitDefaultValue = true)]
72+
public List<IDSyncConfigurationInput> IdSyncConfiguration { get; set; }
73+
6074
/// <summary>
6175
/// Returns the string presentation of the object
6276
/// </summary>
@@ -66,6 +80,7 @@ public override string ToString()
6680
StringBuilder sb = new StringBuilder();
6781
sb.Append("class AddDestinationToAudienceAlphaOutput {\n");
6882
sb.Append(" Connection: ").Append(Connection).Append("\n");
83+
sb.Append(" IdSyncConfiguration: ").Append(IdSyncConfiguration).Append("\n");
6984
sb.Append("}\n");
7085
return sb.ToString();
7186
}
@@ -105,6 +120,12 @@ public bool Equals(AddDestinationToAudienceAlphaOutput input)
105120
this.Connection == input.Connection ||
106121
(this.Connection != null &&
107122
this.Connection.Equals(input.Connection))
123+
) &&
124+
(
125+
this.IdSyncConfiguration == input.IdSyncConfiguration ||
126+
this.IdSyncConfiguration != null &&
127+
input.IdSyncConfiguration != null &&
128+
this.IdSyncConfiguration.SequenceEqual(input.IdSyncConfiguration)
108129
);
109130
}
110131

@@ -121,6 +142,10 @@ public override int GetHashCode()
121142
{
122143
hashCode = (hashCode * 59) + this.Connection.GetHashCode();
123144
}
145+
if (this.IdSyncConfiguration != null)
146+
{
147+
hashCode = (hashCode * 59) + this.IdSyncConfiguration.GetHashCode();
148+
}
124149
return hashCode;
125150
}
126151
}
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
/*
2+
* Segment Public API
3+
*
4+
* The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
5+
*
6+
* The version of the OpenAPI document: 61.1.4
7+
* Contact: friends@segment.com
8+
* Generated by: https://github.com/openapitools/openapi-generator.git
9+
*/
10+
11+
12+
using System;
13+
using System.Collections;
14+
using System.Collections.Generic;
15+
using System.Collections.ObjectModel;
16+
using System.Linq;
17+
using System.IO;
18+
using System.Runtime.Serialization;
19+
using System.Text;
20+
using System.Text.RegularExpressions;
21+
using Newtonsoft.Json;
22+
using Newtonsoft.Json.Converters;
23+
using Newtonsoft.Json.Linq;
24+
using System.ComponentModel.DataAnnotations;
25+
using OpenAPIDateConverter = Segment.PublicApi.Client.OpenAPIDateConverter;
26+
27+
namespace Segment.PublicApi.Model
28+
{
29+
/// <summary>
30+
/// The identifier sync configuration input.
31+
/// </summary>
32+
[DataContract(Name = "IDSyncConfigurationInput")]
33+
public partial class IDSyncConfigurationInput : IEquatable<IDSyncConfigurationInput>, IValidatableObject
34+
{
35+
/// <summary>
36+
/// Initializes a new instance of the <see cref="IDSyncConfigurationInput" /> class.
37+
/// </summary>
38+
[JsonConstructorAttribute]
39+
protected IDSyncConfigurationInput() { }
40+
/// <summary>
41+
/// Initializes a new instance of the <see cref="IDSyncConfigurationInput" /> class.
42+
/// </summary>
43+
/// <param name="externalId">The external id to sync, for example \&quot;user_id\&quot; or \&quot;email\&quot;. (required).</param>
44+
/// <param name="strategy">The strategy for syncing this identifier. Valid values: \&quot;first\&quot;, \&quot;last\&quot;, \&quot;all\&quot;. (required).</param>
45+
public IDSyncConfigurationInput(string externalId = default(string), string strategy = default(string))
46+
{
47+
// to ensure "externalId" is required (not null)
48+
if (externalId == null)
49+
{
50+
throw new ArgumentNullException("externalId is a required property for IDSyncConfigurationInput and cannot be null");
51+
}
52+
this.ExternalId = externalId;
53+
// to ensure "strategy" is required (not null)
54+
if (strategy == null)
55+
{
56+
throw new ArgumentNullException("strategy is a required property for IDSyncConfigurationInput and cannot be null");
57+
}
58+
this.Strategy = strategy;
59+
}
60+
61+
/// <summary>
62+
/// The external id to sync, for example \&quot;user_id\&quot; or \&quot;email\&quot;.
63+
/// </summary>
64+
/// <value>The external id to sync, for example \&quot;user_id\&quot; or \&quot;email\&quot;.</value>
65+
[DataMember(Name = "externalId", IsRequired = true, EmitDefaultValue = true)]
66+
public string ExternalId { get; set; }
67+
68+
/// <summary>
69+
/// The strategy for syncing this identifier. Valid values: \&quot;first\&quot;, \&quot;last\&quot;, \&quot;all\&quot;.
70+
/// </summary>
71+
/// <value>The strategy for syncing this identifier. Valid values: \&quot;first\&quot;, \&quot;last\&quot;, \&quot;all\&quot;.</value>
72+
[DataMember(Name = "strategy", IsRequired = true, EmitDefaultValue = true)]
73+
public string Strategy { get; set; }
74+
75+
/// <summary>
76+
/// Returns the string presentation of the object
77+
/// </summary>
78+
/// <returns>String presentation of the object</returns>
79+
public override string ToString()
80+
{
81+
StringBuilder sb = new StringBuilder();
82+
sb.Append("class IDSyncConfigurationInput {\n");
83+
sb.Append(" ExternalId: ").Append(ExternalId).Append("\n");
84+
sb.Append(" Strategy: ").Append(Strategy).Append("\n");
85+
sb.Append("}\n");
86+
return sb.ToString();
87+
}
88+
89+
/// <summary>
90+
/// Returns the JSON string presentation of the object
91+
/// </summary>
92+
/// <returns>JSON string presentation of the object</returns>
93+
public virtual string ToJson()
94+
{
95+
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
96+
}
97+
98+
/// <summary>
99+
/// Returns true if objects are equal
100+
/// </summary>
101+
/// <param name="input">Object to be compared</param>
102+
/// <returns>Boolean</returns>
103+
public override bool Equals(object input)
104+
{
105+
return this.Equals(input as IDSyncConfigurationInput);
106+
}
107+
108+
/// <summary>
109+
/// Returns true if IDSyncConfigurationInput instances are equal
110+
/// </summary>
111+
/// <param name="input">Instance of IDSyncConfigurationInput to be compared</param>
112+
/// <returns>Boolean</returns>
113+
public bool Equals(IDSyncConfigurationInput input)
114+
{
115+
if (input == null)
116+
{
117+
return false;
118+
}
119+
return
120+
(
121+
this.ExternalId == input.ExternalId ||
122+
(this.ExternalId != null &&
123+
this.ExternalId.Equals(input.ExternalId))
124+
) &&
125+
(
126+
this.Strategy == input.Strategy ||
127+
(this.Strategy != null &&
128+
this.Strategy.Equals(input.Strategy))
129+
);
130+
}
131+
132+
/// <summary>
133+
/// Gets the hash code
134+
/// </summary>
135+
/// <returns>Hash code</returns>
136+
public override int GetHashCode()
137+
{
138+
unchecked // Overflow is fine, just wrap
139+
{
140+
int hashCode = 41;
141+
if (this.ExternalId != null)
142+
{
143+
hashCode = (hashCode * 59) + this.ExternalId.GetHashCode();
144+
}
145+
if (this.Strategy != null)
146+
{
147+
hashCode = (hashCode * 59) + this.Strategy.GetHashCode();
148+
}
149+
return hashCode;
150+
}
151+
}
152+
153+
/// <summary>
154+
/// To validate all properties of the instance
155+
/// </summary>
156+
/// <param name="validationContext">Validation context</param>
157+
/// <returns>Validation Result</returns>
158+
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
159+
{
160+
yield break;
161+
}
162+
}
163+
164+
}

src/Segment.PublicApi/Model/SimpleDestination.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ protected SimpleDestination() { }
4949
/// <param name="settings">The Destination settings. (required).</param>
5050
/// <param name="destinationId">The Destination id. (required).</param>
5151
/// <param name="metadata">metadata.</param>
52-
/// <param name="idSync">idSync.</param>
53-
public SimpleDestination(string id = default(string), string name = default(string), string sourceId = default(string), bool enabled = default(bool), string createdAt = default(string), string updatedAt = default(string), Dictionary<string, Object> settings = default(Dictionary<string, Object>), string destinationId = default(string), Metadata metadata = default(Metadata), IDSyncOptions idSync = default(IDSyncOptions))
52+
/// <param name="idSyncConfiguration">idSyncConfiguration.</param>
53+
public SimpleDestination(string id = default(string), string name = default(string), string sourceId = default(string), bool enabled = default(bool), string createdAt = default(string), string updatedAt = default(string), Dictionary<string, Object> settings = default(Dictionary<string, Object>), string destinationId = default(string), Metadata metadata = default(Metadata), IDSyncOptions idSyncConfiguration = default(IDSyncOptions))
5454
{
5555
// to ensure "id" is required (not null)
5656
if (id == null)
@@ -91,7 +91,7 @@ protected SimpleDestination() { }
9191
this.DestinationId = destinationId;
9292
this.Name = name;
9393
this.Metadata = metadata;
94-
this.IdSync = idSync;
94+
this.IdSyncConfiguration = idSyncConfiguration;
9595
}
9696

9797
/// <summary>
@@ -157,10 +157,10 @@ protected SimpleDestination() { }
157157
public Metadata Metadata { get; set; }
158158

159159
/// <summary>
160-
/// Gets or Sets IdSync
160+
/// Gets or Sets IdSyncConfiguration
161161
/// </summary>
162-
[DataMember(Name = "idSync", EmitDefaultValue = false)]
163-
public IDSyncOptions IdSync { get; set; }
162+
[DataMember(Name = "idSyncConfiguration", EmitDefaultValue = false)]
163+
public IDSyncOptions IdSyncConfiguration { get; set; }
164164

165165
/// <summary>
166166
/// Returns the string presentation of the object
@@ -179,7 +179,7 @@ public override string ToString()
179179
sb.Append(" Settings: ").Append(Settings).Append("\n");
180180
sb.Append(" DestinationId: ").Append(DestinationId).Append("\n");
181181
sb.Append(" Metadata: ").Append(Metadata).Append("\n");
182-
sb.Append(" IdSync: ").Append(IdSync).Append("\n");
182+
sb.Append(" IdSyncConfiguration: ").Append(IdSyncConfiguration).Append("\n");
183183
sb.Append("}\n");
184184
return sb.ToString();
185185
}
@@ -261,9 +261,9 @@ public bool Equals(SimpleDestination input)
261261
this.Metadata.Equals(input.Metadata))
262262
) &&
263263
(
264-
this.IdSync == input.IdSync ||
265-
(this.IdSync != null &&
266-
this.IdSync.Equals(input.IdSync))
264+
this.IdSyncConfiguration == input.IdSyncConfiguration ||
265+
(this.IdSyncConfiguration != null &&
266+
this.IdSyncConfiguration.Equals(input.IdSyncConfiguration))
267267
);
268268
}
269269

@@ -309,9 +309,9 @@ public override int GetHashCode()
309309
{
310310
hashCode = (hashCode * 59) + this.Metadata.GetHashCode();
311311
}
312-
if (this.IdSync != null)
312+
if (this.IdSyncConfiguration != null)
313313
{
314-
hashCode = (hashCode * 59) + this.IdSync.GetHashCode();
314+
hashCode = (hashCode * 59) + this.IdSyncConfiguration.GetHashCode();
315315
}
316316
return hashCode;
317317
}

0 commit comments

Comments
 (0)