|
| 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 | +usingSystem; |
| 13 | +usingSystem.Collections; |
| 14 | +usingSystem.Collections.Generic; |
| 15 | +usingSystem.Collections.ObjectModel; |
| 16 | +usingSystem.Linq; |
| 17 | +usingSystem.IO; |
| 18 | +usingSystem.Runtime.Serialization; |
| 19 | +usingSystem.Text; |
| 20 | +usingSystem.Text.RegularExpressions; |
| 21 | +usingNewtonsoft.Json; |
| 22 | +usingNewtonsoft.Json.Converters; |
| 23 | +usingNewtonsoft.Json.Linq; |
| 24 | +usingSystem.ComponentModel.DataAnnotations; |
| 25 | +usingOpenAPIDateConverter=Segment.PublicApi.Client.OpenAPIDateConverter; |
| 26 | + |
| 27 | +namespaceSegment.PublicApi.Model |
| 28 | +{ |
| 29 | +/// <summary> |
| 30 | +/// The identifier sync configuration input. |
| 31 | +/// </summary> |
| 32 | +[DataContract(Name="IDSyncConfigurationInput")] |
| 33 | +publicpartialclassIDSyncConfigurationInput:IEquatable<IDSyncConfigurationInput>,IValidatableObject |
| 34 | +{ |
| 35 | +/// <summary> |
| 36 | +/// Initializes a new instance of the <see cref="IDSyncConfigurationInput" /> class. |
| 37 | +/// </summary> |
| 38 | +[JsonConstructorAttribute] |
| 39 | +protectedIDSyncConfigurationInput(){} |
| 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 \"user_id\" or \"email\". (required).</param> |
| 44 | +/// <param name="strategy">The strategy for syncing this identifier. Valid values: \"first\", \"last\", \"all\". (required).</param> |
| 45 | +publicIDSyncConfigurationInput(stringexternalId=default(string),stringstrategy=default(string)) |
| 46 | +{ |
| 47 | +// to ensure "externalId" is required (not null) |
| 48 | +if(externalId==null) |
| 49 | +{ |
| 50 | +thrownewArgumentNullException("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 | +thrownewArgumentNullException("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 \"user_id\" or \"email\". |
| 63 | +/// </summary> |
| 64 | +/// <value>The external id to sync, for example \"user_id\" or \"email\".</value> |
| 65 | +[DataMember(Name="externalId",IsRequired=true,EmitDefaultValue=true)] |
| 66 | +publicstringExternalId{get;set;} |
| 67 | + |
| 68 | +/// <summary> |
| 69 | +/// The strategy for syncing this identifier. Valid values: \"first\", \"last\", \"all\". |
| 70 | +/// </summary> |
| 71 | +/// <value>The strategy for syncing this identifier. Valid values: \"first\", \"last\", \"all\".</value> |
| 72 | +[DataMember(Name="strategy",IsRequired=true,EmitDefaultValue=true)] |
| 73 | +publicstringStrategy{get;set;} |
| 74 | + |
| 75 | +/// <summary> |
| 76 | +/// Returns the string presentation of the object |
| 77 | +/// </summary> |
| 78 | +/// <returns>String presentation of the object</returns> |
| 79 | +publicoverridestringToString() |
| 80 | +{ |
| 81 | +StringBuildersb=newStringBuilder(); |
| 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 | +returnsb.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 | +publicvirtualstringToJson() |
| 94 | +{ |
| 95 | +returnNewtonsoft.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 | +publicoverrideboolEquals(objectinput) |
| 104 | +{ |
| 105 | +returnthis.Equals(inputasIDSyncConfigurationInput); |
| 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 | +publicboolEquals(IDSyncConfigurationInputinput) |
| 114 | +{ |
| 115 | +if(input==null) |
| 116 | +{ |
| 117 | +returnfalse; |
| 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 | +publicoverrideintGetHashCode() |
| 137 | +{ |
| 138 | +unchecked// Overflow is fine, just wrap |
| 139 | +{ |
| 140 | +inthashCode=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 | +returnhashCode; |
| 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(ValidationContextvalidationContext) |
| 159 | +{ |
| 160 | +yieldbreak; |
| 161 | +} |
| 162 | +} |
| 163 | + |
| 164 | +} |